A smart look-up-table (LUT) of sin/cos values for 2D laser scans.
Refer to the main method CSinCosLookUpTableFor2DScans::getSinCosForScan()
This class is used in mrpt::maps::CPointsMap
Definition at line 29 of file CSinCosLookUpTableFor2DScans.h.
#include <mrpt/obs/CSinCosLookUpTableFor2DScans.h>
Classes | |
struct | TSinCosValues |
A pair of vectors with the cos and sin values. More... | |
Public Member Functions | |
const TSinCosValues & | getSinCosForScan (const CObservation2DRangeScan &scan) const |
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest. More... | |
const TSinCosValues & | getSinCosForScan (const T2DScanProperties &scan_prop) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Private Attributes | |
std::map< T2DScanProperties, TSinCosValues > | m_cache |
The cache of known scans and their sin/cos tables. More... | |
const CSinCosLookUpTableFor2DScans::TSinCosValues & CSinCosLookUpTableFor2DScans::getSinCosForScan | ( | const CObservation2DRangeScan & | scan | ) | const |
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest.
Usage:
Definition at line 23 of file CSinCosLookUpTableFor2DScans.cpp.
References mrpt::obs::CObservation2DRangeScan::getScanProperties().
Referenced by mrpt::nav::CHolonomicFullEval::evalSingleTarget(), and velodyne_scan_to_pointcloud().
const CSinCosLookUpTableFor2DScans::TSinCosValues & CSinCosLookUpTableFor2DScans::getSinCosForScan | ( | const T2DScanProperties & | scan_prop | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Return two vectors with the cos and the sin of the angles for each of the rays in a scan, computing them only the first time and returning a cached copy the rest.
Definition at line 36 of file CSinCosLookUpTableFor2DScans.cpp.
References mrpt::obs::T2DScanProperties::aperture, ASSERT_, mrpt::obs::CSinCosLookUpTableFor2DScans::TSinCosValues::ccos, mrpt::obs::CSinCosLookUpTableFor2DScans::TSinCosValues::csin, mrpt::obs::T2DScanProperties::nRays, and mrpt::obs::T2DScanProperties::rightToLeft.
|
mutableprivate |
The cache of known scans and their sin/cos tables.
Definition at line 58 of file CSinCosLookUpTableFor2DScans.h.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |