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.
Definition at line 41 of file CPose3DQuatPDF.h.
#include <mrpt/poses/CPose3DQuatPDF.h>
Public Types | |
typedef CPose3DQuat | type_value |
The type of the state the PDF represents. More... | |
Public Member Functions | |
virtual void | copyFrom (const CPose3DQuatPDF &o)=0 |
Copy operator, translating if necesary (for example, between particles and gaussian representations) More... | |
virtual void | inverse (CPose3DQuatPDF &o) const =0 |
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF. More... | |
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) More... | |
template<class OPENGL_SETOFOBJECTSPTR > | |
OPENGL_SETOFOBJECTSPTR | getAs3DObject () const |
Returns a 3D representation of this PDF. More... | |
virtual void | getMean (CPose3DQuat &mean_point) const=0 |
Returns the mean, or mathematical expectation of the probability density distribution (PDF). More... | |
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. More... | |
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. More... | |
CPose3DQuat | getMeanVal () const |
Returns the mean, or mathematical expectation of the probability density distribution (PDF). More... | |
void | getCovariance (mrpt::math::CMatrixDouble &cov) const |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) More... | |
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) More... | |
mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > | getCovariance () const |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) More... | |
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. More... | |
virtual void | saveToTextFile (const std::string &file) const=0 |
Save PDF's particles to a text file. More... | |
virtual void | drawSingleSample (CPose3DQuat &outPart) const=0 |
Draws a single sample from the distribution. More... | |
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. More... | |
virtual void | changeCoordinatesReference (const mrpt::poses::CPose3D &newReferenceBase)=0 |
this = p (+) this. More... | |
double | getCovarianceEntropy () const |
Compute the entropy of the estimated covariance matrix. More... | |
Static Public Member Functions | |
static CPose3DQuatPDF * | createFrom2D (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. More... | |
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$. More... | |
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). More... | |
RTTI stuff <br> | |
static const mrpt::utils::TRuntimeClassId | classCPose3DQuatPDF |
class | mrpt::utils::CStream |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const MRPT_OVERRIDE |
|
inherited |
The type of the state the PDF represents.
Definition at line 32 of file CProbabilityDensityFunction.h.
|
staticprotected |
|
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.
|
pure virtual |
Copy operator, translating if necesary (for example, between particles and gaussian representations)
Implemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.
|
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.
|
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.
|
pure virtualinherited |
Draws a single sample from the distribution.
|
inline |
Returns a 3D representation of this PDF.
Definition at line 88 of file CPose3DQuatPDF.h.
|
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)
Definition at line 79 of file CPose3DQuatPDF.h.
|
inlineinherited |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 85 of file CProbabilityDensityFunction.h.
|
inlineinherited |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 67 of file CProbabilityDensityFunction.h.
|
inlineinherited |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 76 of file CProbabilityDensityFunction.h.
|
pure virtualinherited |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
|
inlineinherited |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
Definition at line 47 of file CProbabilityDensityFunction.h.
|
inlineinherited |
Compute the entropy of the estimated covariance matrix.
Definition at line 136 of file CProbabilityDensityFunction.h.
|
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.
Definition at line 98 of file CProbabilityDensityFunction.h.
|
pure virtualinherited |
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
|
inlineinherited |
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
Definition at line 57 of file CProbabilityDensityFunction.h.
|
virtual |
Reimplemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.
|
pure virtual |
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
Implemented in mrpt::poses::CPose3DQuatPDFGaussian, and mrpt::poses::CPose3DQuatPDFGaussianInf.
|
static |
This static method computes the two Jacobians of a pose composition operation $f(x,u)= x \oplus u$.
out_x_oplus_u | If 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().
|
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.
|
friend |
Definition at line 45 of file CPose3DQuatPDF.h.
|
static |
Definition at line 45 of file CPose3DQuatPDF.h.
|
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.5 for MRPT 1.4.0 SVN: at Tue Dec 27 00:54:45 UTC 2022 |