23 CSinCosLookUpTableFor2DScans::getSinCosForScan(
28 return getSinCosForScan(scan_prop);
36 CSinCosLookUpTableFor2DScans::getSinCosForScan(
40 m_cache.find(scan_prop);
41 if (it != m_cache.end())
53 if (m_cache.size() > 20) m_cache.clear();
62 new_entry.
ccos.resize(scan_prop.
nRays + 4);
63 new_entry.
csin.resize(scan_prop.
nRays + 4);
66 if (scan_prop.
nRays > 0)
70 const double dA = (scan_prop.
rightToLeft ? 1.0 : -1.0) *
73 for (
size_t i = 0; i < scan_prop.
nRays; i++)
75 new_entry.
ccos[i] = cos(Ang);
76 new_entry.
csin[i] = sin(Ang);
void getScanProperties(T2DScanProperties &p) const
Fill out a T2DScanProperties structure with the parameters of this scan.
mrpt::math::CVectorFloat ccos
#define ASSERT_(f)
Defines an assertion mechanism.
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.
const Scalar * const_iterator