Declares a class that represents a probability density function (pdf) of a 2D pose (x,y,phi).
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 39 of file CPosePDF.h.
#include <mrpt/poses/CPosePDF.h>
Public Types | |
enum | { is_3D_val = 0 } |
enum | { is_PDF_val = 1 } |
typedef CPose2D | type_value |
The type of the state the PDF represents. | |
Public Member Functions | |
virtual void | copyFrom (const CPosePDF &o)=0 |
Copy operator, translating if necesary (for example, between particles and gaussian representations) | |
virtual void | bayesianFusion (const CPosePDF &p1, const CPosePDF &p2, const double &minMahalanobisDistToDrop=0)=0 |
Bayesian fusion of two pose distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!) | |
virtual void | inverse (CPosePDF &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 (CPose2D &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, CPose2D &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, CPose2D &mean_point) const |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once. | |
CPose2D | 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 (CPose2D &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 void | jacobiansPoseComposition (const CPose2D &x, const CPose2D &u, mrpt::math::CMatrixDouble33 &df_dx, mrpt::math::CMatrixDouble33 &df_du, const bool compute_df_dx=true, const bool compute_df_du=true) |
This static method computes the pose composition Jacobians, with these formulas: | |
static void | jacobiansPoseComposition (const CPosePDFGaussian &x, const CPosePDFGaussian &u, mrpt::math::CMatrixDouble33 &df_dx, mrpt::math::CMatrixDouble33 &df_du) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static bool | is_3D () |
static bool | is_PDF () |
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 | classCPosePDF |
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.
anonymous enum |
Enumerator | |
---|---|
is_3D_val |
Definition at line 91 of file CPosePDF.h.
anonymous enum |
Enumerator | |
---|---|
is_PDF_val |
Definition at line 93 of file CPosePDF.h.
|
staticprotected |
|
pure virtual |
Bayesian fusion of two pose distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!)
p1 | The first distribution to fuse |
p2 | The second distribution to fuse |
minMahalanobisDistToDrop | If set to different of 0, the result of very separate Gaussian modes (that will result in negligible components) in SOGs will be dropped to reduce the number of modes in the output. |
Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.
|
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::CPosePDFGaussian, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.
|
pure virtual |
Copy operator, translating if necesary (for example, between particles and gaussian representations)
Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.
|
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::CPosePDFGaussian, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFGrid, and mrpt::poses::CPosePDFSOG.
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 109 of file CPosePDF.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 100 of file CPosePDF.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 |
|
pure virtual |
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.
|
inlinestatic |
Definition at line 92 of file CPosePDF.h.
|
inlinestatic |
Definition at line 94 of file CPosePDF.h.
|
static |
This static method computes the pose composition Jacobians, with these formulas:
Referenced by mrpt::math::jacobians::jacobs_2D_pose_comp().
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
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::CPosePDFGrid, mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.
|
friend |
Definition at line 41 of file CPosePDF.h.
|
static |
Definition at line 41 of file CPosePDF.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.6 for MRPT 1.4.0 SVN: at Wed Mar 22 06:16:42 UTC 2023 |