template class mrpt::poses::CPose3DGridTemplate
Overview
This is a template class for storing a 6-dimensional grid, with components corresponding to Euler angle parameterization of SE(3) poses.
poses_pdf_grp
#include <mrpt/poses/CPose3DGridTemplate.h> template <class T> class CPose3DGridTemplate { public: // construction 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) ); // methods void setSize( const mrpt::math::TPose3D& bb_min, const mrpt::math::TPose3D& bb_max, double resolution_XYZ, double resolution_YPR ); const T* getByPos(double x, double y, double z, double yaw, double pitch, double roll) const; const T* getByIndex(int cx, int cy, int cz, int cY, int cP, int cR) const; template <class MATRIXLIKE> void getAsMatrix( MATRIXLIKE& outMat, const double z, const double yaw, const double pitch, const double roll ) const; mrpt::math::TPose3D getMinBoundingBox() const; }; // direct descendants class CPose3DPDFGrid;
Construction
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:
Methods
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:
const T* getByPos( double x, double y, double z, double yaw, double pitch, double roll ) const
Reads the contents of a cell.
const T* getByIndex(int cx, int cy, int cz, int cY, int cP, int cR) const
Reads the contents of a cell.
template <class MATRIXLIKE> 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.
mrpt::math::TPose3D getMinBoundingBox() const
Get info about the 6D grid.