Class CPose3DPDF

Inheritance Relationships

Base Types

  • public mrpt::serialization::CSerializable

  • public mrpt::math::CProbabilityDensityFunction< CPose3D, 6 >

  • public mrpt::Stringifyable

Derived Types

Class Documentation

class CPose3DPDF : public mrpt::serialization::CSerializable, public mrpt::math::CProbabilityDensityFunction<CPose3D, 6>, public mrpt::Stringifyable

A Probability Density Function (PDF) of a SE(3) pose. This class is just the base class for unifying many different 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.

For a similar class for 3D points (without attitude), see CPointPDF

See also: probabilistic spatial representations

Subclassed by mrpt::poses::CPose3DPDFGaussian, mrpt::poses::CPose3DPDFGaussianInf, mrpt::poses::CPose3DPDFGrid, mrpt::poses::CPose3DPDFParticles, mrpt::poses::CPose3DPDFSOG

Public Types

enum [anonymous]

Values:

enumerator is_3D_val
enum [anonymous]

Values:

enumerator is_PDF_val

Public Functions

virtual void printTo(std::ostream &out) const = 0

Write a human-readable description of this PDF to the given stream. Derived classes must override this method.

virtual std::string asString() const override

Returns a human-readable string representation of this PDF.

virtual void copyFrom(const CPose3DPDF &o) = 0

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

See also

createFrom2D

virtual void changeCoordinatesReference(const CPose3D &newReferenceBase) = 0
virtual void bayesianFusion(const CPose3DPDF &p1, const CPose3DPDF &p2) = 0

Bayesian fusion of two pose distributions, then save the result in this object (WARNING: Currently only distributions of the same class can be fused! eg, gaussian with gaussian,etc)

virtual void inverse(CPose3DPDF &o) const = 0

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

template<class OPENGL_SETOFOBJECTSPTR>
inline 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)

See also

mrpt::viz::CSetOfObjects::posePDF2opengl() for details on pose-to-opengl conversion

Note

Needs the mrpt-opengl library, and using mrpt::viz::CSetOfObjects::Ptr as template argument.

Note

By default, ellipsoids for the confidence intervals of “q=3” are drawn; for more mathematical details, see CGeneralizedEllipsoidTemplate::setQuantiles()

template<class OPENGL_SETOFOBJECTSPTR>
inline OPENGL_SETOFOBJECTSPTR getAs3DObject() const

Returns a 3D representation of this PDF.

Note

Needs the mrpt-opengl library, and using mrpt::viz::CSetOfObjects::Ptr as template argument.

Public Static Functions

static CPose3DPDF *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)

See also

copyFrom

Warning

It returns a new object of any of the derived classes of CPose3DPDF. This object must be deleted by the user when not required anymore.

static void jacobiansPoseComposition(const CPose3D &x, const CPose3D &u, mrpt::math::CMatrixDouble66 &df_dx, mrpt::math::CMatrixDouble66 &df_du)

This static method computes the pose composition Jacobians.

See this technical report: http:///www.mrpt.org/6D_poses:equivalences_compositions_and_uncertainty

Direct equations (for the covariances) in yaw-pitch-roll are too complex. Make a way around them and consider instead this path:

X(6D)       U(6D)
  |           |
  v           v
X(7D)       U(7D)
  |           |
  +--- (+) ---+
        |
        v
      RES(7D)
        |
        v
      RES(6D)

static inline constexpr bool is_3D()
static inline constexpr bool is_PDF()