Public Member Functions | Private Member Functions | Private Attributes
karto::GridIndexLookup< T > Class Template Reference

#include <Karto.h>

List of all members.

Public Member Functions

void ComputeOffsets (LocalizedRangeScan *pScan, kt_double angleCenter, kt_double angleOffset, kt_double angleResolution)
const std::vector< kt_double > & GetAngles () const
const LookupArrayGetLookupArray (kt_int32u index) const
 GridIndexLookup (Grid< T > *pGrid)
virtual ~GridIndexLookup ()

Private Member Functions

void ComputeOffsets (kt_int32u angleIndex, kt_double angle, const Pose2Vector &rLocalPoints)
void DestroyArrays ()
void SetSize (kt_int32u size)

Private Attributes

std::vector< kt_doublem_Angles
kt_int32u m_Capacity
Grid< T > * m_pGrid
LookupArray ** m_ppLookupArray
kt_int32u m_Size

Detailed Description

template<typename T>
class karto::GridIndexLookup< T >

Create lookup tables for point readings at varying angles in grid. For each angle, grid indexes are calculated for each range reading. This is to speed up finding best angle/position for a localized range scan

Used heavily in mapper and localizer.

In the localizer, this is a huge speed up for calculating possible position. For each particle, a probability is calculated. The range scan is the same, but all grid indexes at all possible angles are calculated. So when calculating the particle probability at a specific angle, the index table is used to look up probability in probability grid!

Definition at line 6235 of file Karto.h.


Constructor & Destructor Documentation

template<typename T>
karto::GridIndexLookup< T >::GridIndexLookup ( Grid< T > *  pGrid) [inline]

Construct a GridIndexLookup with a grid

Parameters:
pGrid

Definition at line 6242 of file Karto.h.

template<typename T>
virtual karto::GridIndexLookup< T >::~GridIndexLookup ( ) [inline, virtual]

Destructor

Definition at line 6253 of file Karto.h.


Member Function Documentation

template<typename T>
void karto::GridIndexLookup< T >::ComputeOffsets ( LocalizedRangeScan pScan,
kt_double  angleCenter,
kt_double  angleOffset,
kt_double  angleResolution 
) [inline]

Compute lookup table of the points of the given scan for the given angular space

Parameters:
pScanthe scan
angleCenter
angleOffsetcomputes lookup arrays for the angles within this offset around angleStart
angleResolutionhow fine a granularity to compute lookup arrays in the angular space

Definition at line 6287 of file Karto.h.

template<typename T>
void karto::GridIndexLookup< T >::ComputeOffsets ( kt_int32u  angleIndex,
kt_double  angle,
const Pose2Vector rLocalPoints 
) [inline, private]

Compute lookup value of points for given angle

Parameters:
angleIndex
angle
rLocalPoints

Definition at line 6333 of file Karto.h.

template<typename T>
void karto::GridIndexLookup< T >::DestroyArrays ( ) [inline, private]

Delete the arrays

Definition at line 6403 of file Karto.h.

template<typename T>
const std::vector<kt_double>& karto::GridIndexLookup< T >::GetAngles ( ) const [inline]

Get angles

Returns:
std::vector<kt_double>& angles

Definition at line 6275 of file Karto.h.

template<typename T>
const LookupArray* karto::GridIndexLookup< T >::GetLookupArray ( kt_int32u  index) const [inline]

Gets the lookup array for a particular angle index

Parameters:
index
Returns:
lookup array

Definition at line 6264 of file Karto.h.

template<typename T>
void karto::GridIndexLookup< T >::SetSize ( kt_int32u  size) [inline, private]

Sets size of lookup table (resize if not big enough)

Parameters:
size

Definition at line 6376 of file Karto.h.


Member Data Documentation

template<typename T>
std::vector<kt_double> karto::GridIndexLookup< T >::m_Angles [private]

Definition at line 6423 of file Karto.h.

template<typename T>
kt_int32u karto::GridIndexLookup< T >::m_Capacity [private]

Definition at line 6417 of file Karto.h.

template<typename T>
Grid<T>* karto::GridIndexLookup< T >::m_pGrid [private]

Definition at line 6415 of file Karto.h.

template<typename T>
LookupArray** karto::GridIndexLookup< T >::m_ppLookupArray [private]

Definition at line 6420 of file Karto.h.

template<typename T>
kt_int32u karto::GridIndexLookup< T >::m_Size [private]

Definition at line 6418 of file Karto.h.


The documentation for this class was generated from the following file:


open_karto
Author(s):
autogenerated on Thu Aug 27 2015 14:14:06