Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
karto::GridIndexLookup< T > Class Template Reference

#include <Karto.h>

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 ()
 
 GridIndexLookup (Grid< T > *pGrid)
 
virtual ~GridIndexLookup ()
 

Private Member Functions

void ComputeOffsets (kt_int32u angleIndex, kt_double angle, const Pose2Vector &rLocalPoints, LocalizedRangeScan *pScan)
 
void DestroyArrays ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
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
 

Friends

class boost::serialization::access
 

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

Constructor & Destructor Documentation

◆ GridIndexLookup() [1/2]

template<typename T>
karto::GridIndexLookup< T >::GridIndexLookup ( )
inline

Construct a GridIndexLookup with a grid

Parameters
pGrid

Definition at line 6895 of file Karto.h.

◆ GridIndexLookup() [2/2]

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

Definition at line 6898 of file Karto.h.

◆ ~GridIndexLookup()

template<typename T>
virtual karto::GridIndexLookup< T >::~GridIndexLookup ( )
inlinevirtual

Destructor

Definition at line 6909 of file Karto.h.

Member Function Documentation

◆ ComputeOffsets() [1/2]

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

◆ ComputeOffsets() [2/2]

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

Compute lookup value of points for given angle

Parameters
angleIndex
angle
rLocalPoints

Definition at line 6989 of file Karto.h.

◆ DestroyArrays()

template<typename T>
void karto::GridIndexLookup< T >::DestroyArrays ( )
inlineprivate

Delete the arrays

Definition at line 7069 of file Karto.h.

◆ GetAngles()

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

◆ GetLookupArray()

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

◆ serialize()

template<typename T>
template<class Archive >
void karto::GridIndexLookup< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Definition at line 7097 of file Karto.h.

◆ SetSize()

template<typename T>
void karto::GridIndexLookup< T >::SetSize ( kt_int32u  size)
inlineprivate

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

Parameters
size

Definition at line 7042 of file Karto.h.

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename T>
friend class boost::serialization::access
friend

Definition at line 7095 of file Karto.h.

Member Data Documentation

◆ m_Angles

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

Definition at line 7094 of file Karto.h.

◆ m_Capacity

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

Definition at line 7088 of file Karto.h.

◆ m_pGrid

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

Definition at line 7086 of file Karto.h.

◆ m_ppLookupArray

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

Definition at line 7091 of file Karto.h.

◆ m_Size

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

Definition at line 7089 of file Karto.h.


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


slam_toolbox
Author(s): Steve Macenski
autogenerated on Mon Feb 28 2022 23:46:49