Go to the documentation of this file.
74 double resolution_XYZ = 0.10,
164 double resolution_XYZ,
double resolution_YPR)
207 double x,
double y,
double z,
double yaw,
double pitch,
216 double x,
double y,
double z,
double yaw,
double pitch,
double roll)
233 const T*
getByIndex(
int cx,
int cy,
int cz,
int cY,
int cP,
int cR)
const
236 cx <
static_cast<int>(
m_sizeX) && cy <
static_cast<int>(
m_sizeY) &&
237 cz <
static_cast<int>(
m_sizeZ) &&
246 T*
getByIndex(
int cx,
int cy,
int cz,
int cY,
int cP,
int cR)
249 cx, cy, cz, cY, cP, cR));
255 template <
class MATRIXLIKE>
257 MATRIXLIKE& outMat,
const double z,
const double yaw,
258 const double pitch,
const double roll)
const
268 for (uint32_t cy = 0; cy <
m_sizeY; cy++)
269 for (uint32_t cx = 0; cx <
m_sizeX; cx++)
270 outMat(cy, cx) = *
getByIndex(cx, cy, cz, cY, cP, cR);
double idx2x(uint32_t cx) const
#define ASSERT_ABOVE_(__A, __B)
const std::vector< T > & getData() const
double m_resolutionXYZ
Resolution of the grid.
double idx2yaw(uint32_t cY) const
auto getSizePitch() const
double idx2z(uint32_t cz) const
std::vector< T > & getData()
virtual ~CPose3DGridTemplate()=default
mrpt::math::TPose3D getMinBoundingBox() const
Get info about the 6D grid.
void setSize(const mrpt::math::TPose3D &bb_min, const mrpt::math::TPose3D &bb_max, double resolution_XYZ, double resolution_YPR)
Changes the limits and size of the grid, erasing previous contents:
#define ASSERT_(f)
Defines an assertion mechanism.
const T * getByIndex(int cx, int cy, int cz, int cY, int cP, int cR) const
Reads the contents of a cell.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
int yaw2idx(double yaw) const
double idx2roll(uint32_t cR) const
void update_cached_size_products()
int z2idx(double z) const
int pitch2idx(double pitch) const
int m_min_cidX
Minimum "cell indexes" for each coordinate.
#define ASSERT_BELOW_(__A, __B)
CPose3DGridTemplate(const mrpt::math::TPose3D &bb_min=mrpt::math::TPose3D(-1., -1., -1., -M_PI, -.5 *M_PI, -.5 *M_PI), const mrpt::math::TPose3D &bb_max=mrpt::math::TPose3D(1., 1., 1., M_PI,.5 *M_PI,.5 *M_PI), double resolution_XYZ=0.10, double resolution_YPR=mrpt::DEG2RAD(10.0))
Default constructor:
This is a template class for storing a 6-dimensional grid, with components corresponding to Euler ang...
T * getByPos(double x, double y, double z, double yaw, double pitch, double roll)
int round(const T value)
Returns the closer integer (int) to x.
void getAsMatrix(MATRIXLIKE &outMat, const double z, const double yaw, const double pitch, const double roll) const
Returns a XY slice of the grid, for given constant z,yaw, pitch and roll.
const T * getByPos(const mrpt::math::TPose3D &p) const
mrpt::math::TPose3D m_bb_max
int roll2idx(double roll) const
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
mrpt::math::TPose3D m_bb_min
int x2idx(double x) const
constexpr double DEG2RAD(const double x)
Degrees to radians
double getResolutionXYZ() const
double pitch
Pitch coordinate (rotation angle over Y axis).
int y2idx(double y) const
double yaw
Yaw coordinate (rotation angle over Z axis).
T * getByPos(const mrpt::math::TPose3D &p)
double roll
Roll coordinate (rotation angle over X coordinate).
const T * getByPos(double x, double y, double z, double yaw, double pitch, double roll) const
Reads the contents of a cell.
auto getTotalVoxelCount() const
mrpt::math::TPose3D getMaxBoundingBox() const
T * getByIndex(int cx, int cy, int cz, int cY, int cP, int cR)
double idx2pitch(uint32_t cP) const
double getResolutionAngles() const
std::vector< T > m_data
The data.
double idx2y(uint32_t cy) const
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |