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, LocalizedRangeScan *pScan)
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 6348 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 6355 of file Karto.h.

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

Destructor

Definition at line 6366 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 6400 of file Karto.h.

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

Compute lookup value of points for given angle

Parameters:
angleIndex
angle
rLocalPoints

Definition at line 6446 of file Karto.h.

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

Delete the arrays

Definition at line 6526 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 6388 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 6377 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 6499 of file Karto.h.


Member Data Documentation

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

Definition at line 6546 of file Karto.h.

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

Definition at line 6540 of file Karto.h.

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

Definition at line 6538 of file Karto.h.

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

Definition at line 6543 of file Karto.h.

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

Definition at line 6541 of file Karto.h.


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


open_karto
Author(s):
autogenerated on Tue May 2 2017 02:41:15