25 #include <Eigen/Dense>    35 template <
class MAT33, 
class MAT66>
    36 void cov2to3(
const MAT33& c2d, MAT66& c3d)
    39     c3d.asEigen().template block<2, 2>(0, 0) =
    40         c2d.asEigen().template block<2, 2>(0, 0);
    41     c3d(3, 3) = c2d(2, 2);
    42     c3d(0, 3) = c3d(3, 0) = c2d(0, 2);
    43     c3d(1, 3) = c3d(3, 1) = c2d(1, 2);
    58         newObj->mean = 
CPose3D(obj->mean);
    68         newObj->mean = 
CPose3D(obj->mean);
    69         cov2to3(obj->cov_inv, newObj->cov_inv);
    78         CPosePDFParticles::CParticleList::const_iterator it1;
    79         CPose3DPDFParticles::CParticleList::iterator it2;
    80         for (it1 = obj->m_particles.begin(), it2 = newObj->m_particles.begin();
    81              it1 != obj->m_particles.end(); ++it1, ++it2)
    83             it2->log_w = it1->log_w;
    91         const auto* obj = 
dynamic_cast<const CPosePDFSOG*
>(&o);
    98         for (it1 = obj->begin(), it2 = newObj->begin(); it1 != obj->end();
   101             it2->log_w = it1->log_w;
   102             it2->val.mean.setFromValues(
   103                 it1->mean.x(), it1->mean.y(), 0, it1->mean.phi(), 0, 0);
   105             it2->val.cov.setZero();
   107             it2->val.cov(0, 0) = it1->cov(0, 0);
   108             it2->val.cov(1, 1) = it1->cov(1, 1);
   109             it2->val.cov(3, 3) = it1->cov(2, 2);  
   111             it2->val.cov(0, 1) = it2->val.cov(1, 0) = it1->cov(0, 1);
   113             it2->val.cov(0, 3) = it2->val.cov(3, 0) = it1->cov(0, 2);
   115             it2->val.cov(1, 3) = it2->val.cov(3, 1) = it1->cov(1, 2);
   165         J_E2Q_dx(0, 0) = J_E2Q_dx(1, 1) = J_E2Q_dx(2, 2) = 1;
   175         J_E2Q_du(0, 0) = J_E2Q_du(1, 1) = J_E2Q_du(2, 2) = 1;
   188         quat_df_dx, quat_df_du);
   196     J_Q2E(0, 0) = J_Q2E(1, 1) = J_Q2E(2, 2) = 1;
   211         dr_dq_sub.
asEigen() = dr_dq_sub_aux * dnorm_dq;
 void rpy_and_jacobian(T &roll, T &pitch, T &yaw, MATRIXLIKE *out_dr_dq=nullptr, bool resize_out_dr_dq_to3x4=true) const
Return the yaw, pitch & roll angles associated to quaternion, and (optionally) the 3x4 Jacobian of th...
 
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE(class_name, base_class, NS)
This must be inserted as implementation of some required members for virtual CSerializable classes: ...
 
mrpt::math::CQuaternionDouble & quat()
Read/Write access to the quaternion representing the 3D rotation. 
 
A compile-time fixed-size numeric matrix container. 
 
#define THROW_EXCEPTION(msg)
 
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
 
CListGaussianModes::const_iterator const_iterator
 
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. 
 
static CPose3DPDF * createFrom2D(const CPosePDF &o)
This is a static transformation method from 2D poses to 3D PDFs, preserving the representation type (...
 
Declares a class that represents a Probability Density function (PDF) of a 3D(6D) pose ...
 
void insertMatrix(const int row_start, const int col_start, const OTHERMATVEC &submat)
Copies the given input submatrix/vector into this matrix/vector, starting at the given top-left coord...
 
void getAsQuaternion(mrpt::math::CQuaternionDouble &q, mrpt::optional_ref< mrpt::math::CMatrixDouble43 > out_dq_dr=std::nullopt) const
Returns the quaternion associated to the rotation of this object (NOTE: XYZ translation is ignored)  ...
 
#define ASSERT_(f)
Defines an assertion mechanism. 
 
This base provides a set of functions for maths stuff. 
 
#define CLASS_ID(T)
Access to runtime class ID for a defined class name. 
 
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
 
void crossProduct(const CQuaternion &q1, const CQuaternion &q2)
Calculate the "cross" product (or "composed rotation") of two quaternion: this = q1 x q2 After the op...
 
virtual const mrpt::rtti::TRuntimeClassId * GetRuntimeClass() const override
Returns information about the class of an object in runtime. 
 
Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x...
 
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz). 
 
Declares a class that represents a probability density function (pdf) of a 2D pose (x...
 
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
 
A Probability Density function (PDF) of a 2D pose  as a Gaussian with a mean and the inverse of the c...
 
void normalizationJacobian(MATRIXLIKE &J) const
Calculate the 4x4 Jacobian of the normalization operation of this quaternion. 
 
A class used to store a 3D pose (a 3D translation + a rotation in 3D). 
 
TModesList::iterator iterator
 
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates). 
 
Declares a class that represents a Probability Density function (PDF) of a 3D pose  as a Gaussian des...
 
EIGEN_MAP asEigen()
Get as an Eigen-compatible Eigen::Map object. 
 
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
 
void cov2to3(const MAT33 &c2d, MAT66 &c3d)
 
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector ...
 
static void jacobiansPoseComposition(const CPose3DQuat &x, const CPose3DQuat &u, mrpt::math::CMatrixDouble77 &df_dx, mrpt::math::CMatrixDouble77 &df_du, CPose3DQuat *out_x_oplus_u=nullptr)
This static method computes the two Jacobians of a pose composition operation $f(x,u)= x  u$. 
 
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
 
Declares a class that represents a Probability Density function (PDF) of a 3D pose.