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

#include <GridIndexLookup.h>

List of all members.

Public Member Functions

void ComputeOffsets (LocalizedLaserScan *pScan, kt_double angleCenter, kt_double angleOffset, kt_double angleResolution)
const List< 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 Pose2List &rLocalPoints)
void DestroyArrays ()
void SetSize (kt_int32u size)

Private Attributes

List< 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 point reading. This is to speed up finding best angle/position for a localized laser scan

Used heavily in mapper and localizer.

In the localizer, this is a huge speed up for calculating possible positions. For each particle, a probability is calculated. The laser 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 probabilities in the probability grid.

Definition at line 136 of file GridIndexLookup.h.


Constructor & Destructor Documentation

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

Construct a GridIndexLookup with a grid

Parameters:
pGridgrid pointer

Definition at line 143 of file GridIndexLookup.h.

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

Destructor

Definition at line 154 of file GridIndexLookup.h.


Member Function Documentation

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

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

Parameters:
pScanscan
angleCenterangle at center
angleOffsetcomputes lookup arrays for the angles within this offset around angleCenter
angleResolutionhow fine a granularity to compute lookup arrays in the angular space

Definition at line 188 of file GridIndexLookup.h.

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

Computes lookup value of points for given angle

Parameters:
angleIndexangle index
angleangle
rLocalPointspoints in local coordinates

Definition at line 231 of file GridIndexLookup.h.

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

Delete the arrays

Definition at line 301 of file GridIndexLookup.h.

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

Gets list of angles

Returns:
list of angles

Definition at line 176 of file GridIndexLookup.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:
indexangle index
Returns:
lookup array

Definition at line 165 of file GridIndexLookup.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:
sizenew size

Definition at line 274 of file GridIndexLookup.h.


Member Data Documentation

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

Definition at line 321 of file GridIndexLookup.h.

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

Definition at line 315 of file GridIndexLookup.h.

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

Definition at line 313 of file GridIndexLookup.h.

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

Definition at line 318 of file GridIndexLookup.h.

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

Definition at line 316 of file GridIndexLookup.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Mon Oct 6 2014 02:44:18