24 CSinCosLookUpTableFor2DScans::getSinCosForScan(
29 return getSinCosForScan(scan_prop);
37 CSinCosLookUpTableFor2DScans::getSinCosForScan(
41 m_cache.find(scan_prop);
42 if (it != m_cache.end())
54 if (m_cache.size() > 20) m_cache.clear();
63 new_entry.
ccos.resize(scan_prop.
nRays + 4);
64 new_entry.
csin.resize(scan_prop.
nRays + 4);
67 if (scan_prop.
nRays > 0)
71 const double dA = (scan_prop.
rightToLeft ? 1.0 : -1.0) *
74 for (
size_t i = 0; i < scan_prop.
nRays; i++)
76 new_entry.
ccos[i] = cos(Ang);
77 new_entry.
csin[i] = sin(Ang);
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void getScanProperties(T2DScanProperties &p) const
Fill out a T2DScanProperties structure with the parameters of this scan.
const Scalar * const_iterator
mrpt::math::CVectorFloat ccos
Auxiliary struct that holds all the relevant geometry information about a 2D scan.
This namespace contains representation of robot actions and observations.
mrpt::math::CVectorFloat csin
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
A pair of vectors with the cos and sin values.
bool rightToLeft
Angles storage order: true=counterclockwise; false=clockwise.