#include <GridIndexLookup.h>
Public Member Functions | |
| void | ComputeOffsets (LocalizedLaserScan *pScan, kt_double angleCenter, kt_double angleOffset, kt_double angleResolution) |
| const List< kt_double > & | GetAngles () const |
| const LookupArray * | GetLookupArray (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_double > | m_Angles |
| kt_int32u | m_Capacity |
| Grid< T > * | m_pGrid |
| LookupArray ** | m_ppLookupArray |
| kt_int32u | m_Size |
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.
| karto::GridIndexLookup< T >::GridIndexLookup | ( | Grid< T > * | pGrid | ) | [inline] |
Construct a GridIndexLookup with a grid
| pGrid | grid pointer |
Definition at line 143 of file GridIndexLookup.h.
| virtual karto::GridIndexLookup< T >::~GridIndexLookup | ( | ) | [inline, virtual] |
Destructor
Definition at line 154 of file GridIndexLookup.h.
| 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
| pScan | scan |
| angleCenter | angle at center |
| angleOffset | computes lookup arrays for the angles within this offset around angleCenter |
| angleResolution | how fine a granularity to compute lookup arrays in the angular space |
Definition at line 188 of file GridIndexLookup.h.
| void karto::GridIndexLookup< T >::ComputeOffsets | ( | kt_int32u | angleIndex, |
| kt_double | angle, | ||
| const Pose2List & | rLocalPoints | ||
| ) | [inline, private] |
Computes lookup value of points for given angle
| angleIndex | angle index |
| angle | angle |
| rLocalPoints | points in local coordinates |
Definition at line 231 of file GridIndexLookup.h.
| void karto::GridIndexLookup< T >::DestroyArrays | ( | ) | [inline, private] |
Delete the arrays
Definition at line 301 of file GridIndexLookup.h.
| const List<kt_double>& karto::GridIndexLookup< T >::GetAngles | ( | ) | const [inline] |
| const LookupArray* karto::GridIndexLookup< T >::GetLookupArray | ( | kt_int32u | index | ) | const [inline] |
Gets the lookup array for a particular angle index
| index | angle index |
Definition at line 165 of file GridIndexLookup.h.
| void karto::GridIndexLookup< T >::SetSize | ( | kt_int32u | size | ) | [inline, private] |
Sets size of lookup table (resize if not big enough)
| size | new size |
Definition at line 274 of file GridIndexLookup.h.
List<kt_double> karto::GridIndexLookup< T >::m_Angles [private] |
Definition at line 321 of file GridIndexLookup.h.
kt_int32u karto::GridIndexLookup< T >::m_Capacity [private] |
Definition at line 315 of file GridIndexLookup.h.
Grid<T>* karto::GridIndexLookup< T >::m_pGrid [private] |
Definition at line 313 of file GridIndexLookup.h.
LookupArray** karto::GridIndexLookup< T >::m_ppLookupArray [private] |
Definition at line 318 of file GridIndexLookup.h.
kt_int32u karto::GridIndexLookup< T >::m_Size [private] |
Definition at line 316 of file GridIndexLookup.h.