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 5950 of file Karto.h.


Constructor & Destructor Documentation

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

Definition at line 5953 of file Karto.h.

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

Destructor

Definition at line 5964 of file Karto.h.


Member Function Documentation

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 6037 of file Karto.h.

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:
pScan the scan
angleCenter 
angleOffset computes lookup arrays for the angles within this offset around angleStart
angleResolution how fine a granularity to compute lookup arrays in the angular space

Definition at line 5994 of file Karto.h.

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

Delete the arrays

Definition at line 6107 of file Karto.h.

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

Definition at line 5982 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 5975 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 6080 of file Karto.h.


Member Data Documentation

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

Definition at line 6127 of file Karto.h.

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

Definition at line 6121 of file Karto.h.

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

Definition at line 6119 of file Karto.h.

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

Definition at line 6124 of file Karto.h.

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

Definition at line 6122 of file Karto.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


karto
Author(s): SRI International (package maintained by Brian Gerkey)
autogenerated on Fri Jan 11 10:07:05 2013