MRPT  2.0.0
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
mrpt::poses::CPose3DGridTemplate< T > Class Template Reference

Detailed Description

template<class T>
class mrpt::poses::CPose3DGridTemplate< T >

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

Definition at line 23 of file CPose3DGridTemplate.h.

#include <mrpt/poses/CPose3DGridTemplate.h>

Inheritance diagram for mrpt::poses::CPose3DGridTemplate< T >:

Public Member Functions

 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: More...
 
virtual ~CPose3DGridTemplate ()=default
 
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: More...
 
const T * getByPos (double x, double y, double z, double yaw, double pitch, double roll) const
 Reads the contents of a cell. More...
 
T * getByPos (double x, double y, double z, double yaw, double pitch, double roll)
 
const T * getByPos (const mrpt::math::TPose3D &p) const
 
T * getByPos (const mrpt::math::TPose3D &p)
 
const T * getByIndex (int cx, int cy, int cz, int cY, int cP, int cR) const
 Reads the contents of a cell. More...
 
T * getByIndex (int cx, int cy, int cz, int cY, int cP, int cR)
 
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. More...
 
mrpt::math::TPose3D getMinBoundingBox () const
 Get info about the 6D grid. More...
 
mrpt::math::TPose3D getMaxBoundingBox () const
 
double getResolutionXYZ () const
 
double getResolutionAngles () const
 
void fill (const T &val)
 
auto getSizeX () const
 
auto getSizeY () const
 
auto getSizeZ () const
 
auto getSizeYaw () const
 
auto getSizePitch () const
 
auto getSizeRoll () const
 
auto getTotalVoxelCount () const
 
const std::vector< T > & getData () const
 
std::vector< T > & getData ()
 
Return "indexes" from coordinates
int x2idx (double x) const
 
int y2idx (double y) const
 
int z2idx (double z) const
 
int yaw2idx (double yaw) const
 
int pitch2idx (double pitch) const
 
int roll2idx (double roll) const
 
Return coordinates from "indexes"
double idx2x (uint32_t cx) const
 
double idx2y (uint32_t cy) const
 
double idx2z (uint32_t cz) const
 
double idx2yaw (uint32_t cY) const
 
double idx2pitch (uint32_t cP) const
 
double idx2roll (uint32_t cR) const
 

Protected Types

using self_t = CPose3DGridTemplate< T >
 

Protected Member Functions

void update_cached_size_products ()
 

Protected Attributes

mrpt::math::TPose3D m_bb_min {-1., -1., -1., -M_PI, -.5 * M_PI, -.5 * M_PI}
 
mrpt::math::TPose3D m_bb_max {+1., +1., +1., +M_PI, +.5 * M_PI, +.5 * M_PI}
 
double m_resolutionXYZ {0.20}
 Resolution of the grid. More...
 
double m_resolutionYPR {mrpt::DEG2RAD(10.0)}
 
uint32_t m_sizeX {0}
 
uint32_t m_sizeY {0}
 
uint32_t m_sizeZ {0}
 
uint32_t m_sizeYaw {0}
 
uint32_t m_sizePitch {0}
 
uint32_t m_sizeRoll {0}
 
uint32_t m_size_xy
 
uint32_t m_size_xyz
 
uint32_t m_size_xyzY
 
uint32_t m_size_xyzYP
 
uint32_t m_size_xyzYPR
 
int m_min_cidX
 Minimum "cell indexes" for each coordinate. More...
 
int m_min_cidY
 
int m_min_cidZ
 
int m_min_cidYaw
 
int m_min_cidPitch
 
int m_min_cidRoll
 
std::vector< T > m_data
 The data. More...
 

Member Typedef Documentation

◆ self_t

template<class T>
using mrpt::poses::CPose3DGridTemplate< T >::self_t = CPose3DGridTemplate<T>
protected

Definition at line 26 of file CPose3DGridTemplate.h.

Constructor & Destructor Documentation

◆ CPose3DGridTemplate()

template<class T>
mrpt::poses::CPose3DGridTemplate< T >::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) 
)
inline

Default constructor:

Definition at line 69 of file CPose3DGridTemplate.h.

◆ ~CPose3DGridTemplate()

template<class T>
virtual mrpt::poses::CPose3DGridTemplate< T >::~CPose3DGridTemplate ( )
virtualdefault

Member Function Documentation

◆ fill()

template<class T>
void mrpt::poses::CPose3DGridTemplate< T >::fill ( const T &  val)
inline

Definition at line 281 of file CPose3DGridTemplate.h.

◆ getAsMatrix()

template<class T>
template<class MATRIXLIKE >
void mrpt::poses::CPose3DGridTemplate< T >::getAsMatrix ( MATRIXLIKE &  outMat,
const double  z,
const double  yaw,
const double  pitch,
const double  roll 
) const
inline

Returns a XY slice of the grid, for given constant z,yaw, pitch and roll.

Definition at line 256 of file CPose3DGridTemplate.h.

◆ getByIndex() [1/2]

template<class T>
const T* mrpt::poses::CPose3DGridTemplate< T >::getByIndex ( int  cx,
int  cy,
int  cz,
int  cY,
int  cP,
int  cR 
) const
inline

Reads the contents of a cell.

Definition at line 233 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose3DGridTemplate< double >::getByIndex(), and mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ getByIndex() [2/2]

template<class T>
T* mrpt::poses::CPose3DGridTemplate< T >::getByIndex ( int  cx,
int  cy,
int  cz,
int  cY,
int  cP,
int  cR 
)
inline

Definition at line 246 of file CPose3DGridTemplate.h.

◆ getByPos() [1/4]

template<class T>
const T* mrpt::poses::CPose3DGridTemplate< T >::getByPos ( double  x,
double  y,
double  z,
double  yaw,
double  pitch,
double  roll 
) const
inline

Reads the contents of a cell.

Definition at line 206 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ getByPos() [2/4]

template<class T>
T* mrpt::poses::CPose3DGridTemplate< T >::getByPos ( double  x,
double  y,
double  z,
double  yaw,
double  pitch,
double  roll 
)
inline

Definition at line 215 of file CPose3DGridTemplate.h.

◆ getByPos() [3/4]

template<class T>
const T* mrpt::poses::CPose3DGridTemplate< T >::getByPos ( const mrpt::math::TPose3D p) const
inline

Definition at line 222 of file CPose3DGridTemplate.h.

◆ getByPos() [4/4]

template<class T>
T* mrpt::poses::CPose3DGridTemplate< T >::getByPos ( const mrpt::math::TPose3D p)
inline

Definition at line 227 of file CPose3DGridTemplate.h.

◆ getData() [1/2]

template<class T>
const std::vector<T>& mrpt::poses::CPose3DGridTemplate< T >::getData ( ) const
inline

Definition at line 295 of file CPose3DGridTemplate.h.

◆ getData() [2/2]

template<class T>
std::vector<T>& mrpt::poses::CPose3DGridTemplate< T >::getData ( )
inline

Definition at line 296 of file CPose3DGridTemplate.h.

◆ getMaxBoundingBox()

template<class T>
mrpt::math::TPose3D mrpt::poses::CPose3DGridTemplate< T >::getMaxBoundingBox ( ) const
inline

Definition at line 276 of file CPose3DGridTemplate.h.

◆ getMinBoundingBox()

template<class T>
mrpt::math::TPose3D mrpt::poses::CPose3DGridTemplate< T >::getMinBoundingBox ( ) const
inline

Get info about the 6D grid.

Definition at line 275 of file CPose3DGridTemplate.h.

◆ getResolutionAngles()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::getResolutionAngles ( ) const
inline

Definition at line 279 of file CPose3DGridTemplate.h.

◆ getResolutionXYZ()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::getResolutionXYZ ( ) const
inline

Definition at line 278 of file CPose3DGridTemplate.h.

◆ getSizePitch()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getSizePitch ( ) const
inline

Definition at line 290 of file CPose3DGridTemplate.h.

◆ getSizeRoll()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getSizeRoll ( ) const
inline

Definition at line 291 of file CPose3DGridTemplate.h.

◆ getSizeX()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getSizeX ( ) const
inline

Definition at line 286 of file CPose3DGridTemplate.h.

◆ getSizeY()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getSizeY ( ) const
inline

Definition at line 287 of file CPose3DGridTemplate.h.

◆ getSizeYaw()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getSizeYaw ( ) const
inline

Definition at line 289 of file CPose3DGridTemplate.h.

◆ getSizeZ()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getSizeZ ( ) const
inline

Definition at line 288 of file CPose3DGridTemplate.h.

◆ getTotalVoxelCount()

template<class T>
auto mrpt::poses::CPose3DGridTemplate< T >::getTotalVoxelCount ( ) const
inline

Definition at line 293 of file CPose3DGridTemplate.h.

◆ idx2pitch()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::idx2pitch ( uint32_t  cP) const
inline

Definition at line 147 of file CPose3DGridTemplate.h.

◆ idx2roll()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::idx2roll ( uint32_t  cR) const
inline

Definition at line 152 of file CPose3DGridTemplate.h.

◆ idx2x()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::idx2x ( uint32_t  cx) const
inline

Definition at line 126 of file CPose3DGridTemplate.h.

◆ idx2y()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::idx2y ( uint32_t  cy) const
inline

Definition at line 131 of file CPose3DGridTemplate.h.

◆ idx2yaw()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::idx2yaw ( uint32_t  cY) const
inline

Definition at line 142 of file CPose3DGridTemplate.h.

◆ idx2z()

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::idx2z ( uint32_t  cz) const
inline

Definition at line 136 of file CPose3DGridTemplate.h.

◆ pitch2idx()

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::pitch2idx ( double  pitch) const
inline

Definition at line 109 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getAsMatrix(), and mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ roll2idx()

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::roll2idx ( double  roll) const
inline

Definition at line 115 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getAsMatrix(), and mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ setSize()

template<class T>
void mrpt::poses::CPose3DGridTemplate< T >::setSize ( const mrpt::math::TPose3D bb_min,
const mrpt::math::TPose3D bb_max,
double  resolution_XYZ,
double  resolution_YPR 
)
inline

Changes the limits and size of the grid, erasing previous contents:

Definition at line 162 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::CPose3DGridTemplate().

Here is the caller graph for this function:

◆ update_cached_size_products()

template<class T>
void mrpt::poses::CPose3DGridTemplate< T >::update_cached_size_products ( )
inlineprotected

Definition at line 40 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::setSize().

Here is the caller graph for this function:

◆ x2idx()

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::x2idx ( double  x) const
inline

Definition at line 85 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ y2idx()

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::y2idx ( double  y) const
inline

Definition at line 91 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ yaw2idx()

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::yaw2idx ( double  yaw) const
inline

Definition at line 103 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getAsMatrix(), and mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

◆ z2idx()

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::z2idx ( double  z) const
inline

Definition at line 97 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::getAsMatrix(), and mrpt::poses::CPose3DGridTemplate< double >::getByPos().

Here is the caller graph for this function:

Member Data Documentation

◆ m_bb_max

template<class T>
mrpt::math::TPose3D mrpt::poses::CPose3DGridTemplate< T >::m_bb_max {+1., +1., +1., +M_PI, +.5 * M_PI, +.5 * M_PI}
protected

◆ m_bb_min

template<class T>
mrpt::math::TPose3D mrpt::poses::CPose3DGridTemplate< T >::m_bb_min {-1., -1., -1., -M_PI, -.5 * M_PI, -.5 * M_PI}
protected

◆ m_data

template<class T>
std::vector<T> mrpt::poses::CPose3DGridTemplate< T >::m_data
protected

The data.

Stored in this order:

m_data[ ci_x

  • size_x * ci_y
  • size_xy * ci_z
  • size_xyz * ci_yaw
  • size_xyzy * ci_pitch
  • size_xyzyp * ci_roll ]

Definition at line 64 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::fill(), mrpt::poses::CPose3DGridTemplate< double >::getByIndex(), mrpt::poses::CPose3DGridTemplate< double >::getData(), and mrpt::poses::CPose3DGridTemplate< double >::setSize().

◆ m_min_cidPitch

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::m_min_cidPitch
protected

◆ m_min_cidRoll

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::m_min_cidRoll
protected

◆ m_min_cidX

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::m_min_cidX
protected

Minimum "cell indexes" for each coordinate.

Definition at line 50 of file CPose3DGridTemplate.h.

Referenced by mrpt::poses::CPose3DGridTemplate< double >::setSize().

◆ m_min_cidY

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::m_min_cidY
protected

◆ m_min_cidYaw

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::m_min_cidYaw
protected

◆ m_min_cidZ

template<class T>
int mrpt::poses::CPose3DGridTemplate< T >::m_min_cidZ
protected

◆ m_resolutionXYZ

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::m_resolutionXYZ {0.20}
protected

◆ m_resolutionYPR

template<class T>
double mrpt::poses::CPose3DGridTemplate< T >::m_resolutionYPR {mrpt::DEG2RAD(10.0)}
protected

◆ m_size_xy

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_size_xy
protected

◆ m_size_xyz

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_size_xyz
protected

◆ m_size_xyzY

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_size_xyzY
protected

◆ m_size_xyzYP

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_size_xyzYP
protected

◆ m_size_xyzYPR

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_size_xyzYPR
protected

◆ m_sizePitch

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_sizePitch {0}
protected

◆ m_sizeRoll

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_sizeRoll {0}
protected

◆ m_sizeX

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_sizeX {0}
protected

◆ m_sizeY

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_sizeY {0}
protected

◆ m_sizeYaw

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_sizeYaw {0}
protected

◆ m_sizeZ

template<class T>
uint32_t mrpt::poses::CPose3DGridTemplate< T >::m_sizeZ {0}
protected



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020