Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
mrpt::poses::CPose3DQuatPDF Class Referenceabstract

Detailed Description

Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually), by means of a 7-vector with a translation [x y z] and a quaternion [qr qx qy qz].

This class is just the base class for unifying many diferent ways this PDF can be implemented.

For convenience, a pose composition is also defined for any PDF derived class, changeCoordinatesReference, in the form of a method rather than an operator.

See also the tutorial on probabilistic spatial representations in the MRPT.

See also
CPose3DQuatPDF, CPose3DPDF

Definition at line 41 of file CPose3DQuatPDF.h.

#include <mrpt/poses/CPose3DQuatPDF.h>

Inheritance diagram for mrpt::poses::CPose3DQuatPDF:
Inheritance graph

Public Types

typedef CPose3DQuat type_value
 The type of the state the PDF represents.
 

Public Member Functions

virtual void copyFrom (const CPose3DQuatPDF &o)=0
 Copy operator, translating if necesary (for example, between particles and gaussian representations)
 
virtual void inverse (CPose3DQuatPDF &o) const =0
 Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
 
template<class OPENGL_SETOFOBJECTSPTR >
void getAs3DObject (OPENGL_SETOFOBJECTSPTR &out_obj) const
 Returns a 3D representation of this PDF (it doesn't clear the current contents of out_obj, but append new OpenGL objects to that list)
 
template<class OPENGL_SETOFOBJECTSPTR >
OPENGL_SETOFOBJECTSPTR getAs3DObject () const
 Returns a 3D representation of this PDF.
 
virtual void getMean (CPose3DQuat &mean_point) const=0
 Returns the mean, or mathematical expectation of the probability density distribution (PDF).
 
virtual void getCovarianceAndMean (mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov, CPose3DQuat &mean_point) const=0
 Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
 
void getCovarianceDynAndMean (mrpt::math::CMatrixDouble &cov, CPose3DQuat &mean_point) const
 Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
 
CPose3DQuat getMeanVal () const
 Returns the mean, or mathematical expectation of the probability density distribution (PDF).
 
void getCovariance (mrpt::math::CMatrixDouble &cov) const
 Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
 
void getCovariance (mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov) const
 Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
 
mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > getCovariance () const
 Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
 
virtual void getInformationMatrix (mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &inf) const
 Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix) Unless reimplemented in derived classes, this method first reads the covariance, then invert it.
 
virtual void saveToTextFile (const std::string &file) const=0
 Save PDF's particles to a text file.
 
virtual void drawSingleSample (CPose3DQuat &outPart) const=0
 Draws a single sample from the distribution.
 
virtual void drawManySamples (size_t N, std::vector< mrpt::math::CVectorDouble > &outSamples) const
 Draws a number of samples from the distribution, and saves as a list of 1xSTATE_LEN vectors, where each row contains a (x,y,z,yaw,pitch,roll) datum.
 
virtual void changeCoordinatesReference (const mrpt::poses::CPose3D &newReferenceBase)=0
 this = p (+) this.
 
double getCovarianceEntropy () const
 Compute the entropy of the estimated covariance matrix.
 

Static Public Member Functions

static CPose3DQuatPDFcreateFrom2D (const CPosePDF &o)
 This is a static transformation method from 2D poses to 3D PDFs, preserving the representation type (particles->particles, Gaussians->Gaussians,etc) It returns a new object of any of the derived classes of CPose3DQuatPDF.
 
static void jacobiansPoseComposition (const CPose3DQuat &x, const CPose3DQuat &u, mrpt::math::CMatrixDouble77 &df_dx, mrpt::math::CMatrixDouble77 &df_du, CPose3DQuat *out_x_oplus_u=NULL)
 This static method computes the two Jacobians of a pose composition operation $f(x,u)= x \oplus u$.
 

Static Public Attributes

static const size_t state_length
 The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll).
 

RTTI stuff <br>

static const mrpt::utils::TRuntimeClassId classCPose3DQuatPDF
 
class mrpt::utils::CStream
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const MRPT_OVERRIDE
 

Member Typedef Documentation

◆ type_value

typedef CPose3DQuat mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::type_value
inherited

The type of the state the PDF represents.

Definition at line 32 of file CProbabilityDensityFunction.h.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId * mrpt::poses::CPose3DQuatPDF::_GetBaseClass ( )
staticprotected

◆ changeCoordinatesReference()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::changeCoordinatesReference ( const mrpt::poses::CPose3D newReferenceBase)
pure virtualinherited

this = p (+) this.

This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf. Result PDF substituted the currently stored one in the object.

Implemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.

◆ copyFrom()

virtual void mrpt::poses::CPose3DQuatPDF::copyFrom ( const CPose3DQuatPDF o)
pure virtual

Copy operator, translating if necesary (for example, between particles and gaussian representations)

See also
createFrom2D

Implemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.

◆ createFrom2D()

static CPose3DQuatPDF * mrpt::poses::CPose3DQuatPDF::createFrom2D ( const CPosePDF o)
static

This is a static transformation method from 2D poses to 3D PDFs, preserving the representation type (particles->particles, Gaussians->Gaussians,etc) It returns a new object of any of the derived classes of CPose3DQuatPDF.

This object must be deleted by the user when not required anymore.

See also
copyFrom

◆ drawManySamples()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::drawManySamples ( size_t  N,
std::vector< mrpt::math::CVectorDouble > &  outSamples 
) const
inlinevirtualinherited

Draws a number of samples from the distribution, and saves as a list of 1xSTATE_LEN vectors, where each row contains a (x,y,z,yaw,pitch,roll) datum.

This base method just call N times to drawSingleSample, but derived classes should implemented optimized method for each particular PDF.

Reimplemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.

Definition at line 117 of file CProbabilityDensityFunction.h.

◆ drawSingleSample()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::drawSingleSample ( CPose3DQuat &  outPart) const
pure virtualinherited

Draws a single sample from the distribution.

◆ getAs3DObject() [1/2]

template<class OPENGL_SETOFOBJECTSPTR >
OPENGL_SETOFOBJECTSPTR mrpt::poses::CPose3DQuatPDF::getAs3DObject ( ) const
inline

Returns a 3D representation of this PDF.

Note
Needs the mrpt-opengl library, and using mrpt::opengl::CSetOfObjectsPtr as template argument.

Definition at line 88 of file CPose3DQuatPDF.h.

◆ getAs3DObject() [2/2]

template<class OPENGL_SETOFOBJECTSPTR >
void mrpt::poses::CPose3DQuatPDF::getAs3DObject ( OPENGL_SETOFOBJECTSPTR &  out_obj) const
inline

Returns a 3D representation of this PDF (it doesn't clear the current contents of out_obj, but append new OpenGL objects to that list)

Note
Needs the mrpt-opengl library, and using mrpt::opengl::CSetOfObjectsPtr as template argument.

Definition at line 79 of file CPose3DQuatPDF.h.

◆ getCovariance() [1/3]

mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getCovariance ( ) const
inlineinherited

Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)

See also
getMean, getInformationMatrix

Definition at line 85 of file CProbabilityDensityFunction.h.

◆ getCovariance() [2/3]

void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getCovariance ( mrpt::math::CMatrixDouble cov) const
inlineinherited

Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)

See also
getMean, getCovarianceAndMean, getInformationMatrix

Definition at line 67 of file CProbabilityDensityFunction.h.

◆ getCovariance() [3/3]

void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getCovariance ( mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &  cov) const
inlineinherited

Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)

See also
getMean, getCovarianceAndMean, getInformationMatrix

Definition at line 76 of file CProbabilityDensityFunction.h.

◆ getCovarianceAndMean()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getCovarianceAndMean ( mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &  cov,
CPose3DQuat &  mean_point 
) const
pure virtualinherited

Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.

See also
getMean, getInformationMatrix

◆ getCovarianceDynAndMean()

void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getCovarianceDynAndMean ( mrpt::math::CMatrixDouble cov,
CPose3DQuat &  mean_point 
) const
inlineinherited

Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.

See also
getMean, getInformationMatrix

Definition at line 47 of file CProbabilityDensityFunction.h.

◆ getCovarianceEntropy()

double mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getCovarianceEntropy ( ) const
inlineinherited

Compute the entropy of the estimated covariance matrix.

See also
http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Entropy

Definition at line 136 of file CProbabilityDensityFunction.h.

◆ getInformationMatrix()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getInformationMatrix ( mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &  inf) const
inlinevirtualinherited

Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix) Unless reimplemented in derived classes, this method first reads the covariance, then invert it.

See also
getMean, getCovarianceAndMean

Definition at line 98 of file CProbabilityDensityFunction.h.

◆ getMean()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getMean ( CPose3DQuat &  mean_point) const
pure virtualinherited

Returns the mean, or mathematical expectation of the probability density distribution (PDF).

See also
getCovarianceAndMean, getInformationMatrix

◆ getMeanVal()

CPose3DQuat mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::getMeanVal ( ) const
inlineinherited

Returns the mean, or mathematical expectation of the probability density distribution (PDF).

See also
getCovariance, getInformationMatrix

Definition at line 57 of file CProbabilityDensityFunction.h.

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId * mrpt::poses::CPose3DQuatPDF::GetRuntimeClass ( ) const
virtual

◆ inverse()

virtual void mrpt::poses::CPose3DQuatPDF::inverse ( CPose3DQuatPDF o) const
pure virtual

Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.

Implemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.

◆ jacobiansPoseComposition()

static void mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition ( const CPose3DQuat x,
const CPose3DQuat u,
mrpt::math::CMatrixDouble77 df_dx,
mrpt::math::CMatrixDouble77 df_du,
CPose3DQuat out_x_oplus_u = NULL 
)
static

This static method computes the two Jacobians of a pose composition operation $f(x,u)= x \oplus u$.

Parameters
out_x_oplus_uIf set to !=NULL, the result of "x+u" will be stored here (it will be computed internally anyway). To see the mathematical derivation of the formulas, refer to the technical report here:

Referenced by mrpt::math::jacobians::jacobs_6D_pose_comp().

◆ saveToTextFile()

virtual void mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::saveToTextFile ( const std::string &  file) const
pure virtualinherited

Save PDF's particles to a text file.

See derived classes for more information about the format of generated files.

Implemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.

Friends And Related Symbol Documentation

◆ mrpt::utils::CStream

friend class mrpt::utils::CStream
friend

Definition at line 45 of file CPose3DQuatPDF.h.

Member Data Documentation

◆ classCPose3DQuatPDF

const mrpt::utils::TRuntimeClassId mrpt::poses::CPose3DQuatPDF::classCPose3DQuatPDF
static

Definition at line 45 of file CPose3DQuatPDF.h.

◆ state_length

const size_t mrpt::utils::CProbabilityDensityFunction< CPose3DQuat , STATE_LEN >::state_length
staticinherited

The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll).

Definition at line 31 of file CProbabilityDensityFunction.h.




Page generated by Doxygen 1.9.8 for MRPT 1.4.0 SVN: at Thu Dec 14 17:13:25 UTC 2023