48 COV(3, 3) = COV(2, 2);
50 COV(0, 3) = COV(3, 0) = COV(0, 2);
51 COV(0, 2) = COV(2, 0) = 0;
52 COV(1, 3) = COV(3, 1) = COV(1, 2);
53 COV(1, 2) = COV(2, 1) = 0;
70 COVINV(3, 3) = COVINV(2, 2);
72 COVINV(0, 3) = COVINV(3, 0) = COVINV(0, 2);
73 COVINV(0, 2) = COVINV(2, 0) = 0;
74 COVINV(1, 3) = COVINV(3, 1) = COVINV(1, 2);
75 COVINV(1, 2) = COVINV(2, 1) = 0;
89 for (it1 =
obj->m_particles.begin(), it2 = newObj->
m_particles.begin();
90 it1 !=
obj->m_particles.end(); ++it1, ++it2)
92 it2->log_w = it1->log_w;
106 for (it1 =
obj->begin(), it2 = newObj->
begin(); it1 !=
obj->end();
109 it2->log_w = it1->log_w;
110 it2->val.mean.setFromValues(
111 it1->mean.x(), it1->mean.y(), 0, it1->mean.phi(), 0, 0);
113 it2->val.cov.zeros();
115 it2->val.cov.get_unsafe(0, 0) = it1->cov.get_unsafe(0, 0);
116 it2->val.cov.get_unsafe(1, 1) = it1->cov.get_unsafe(1, 1);
117 it2->val.cov.get_unsafe(3, 3) =
118 it1->cov.get_unsafe(2, 2);
120 it2->val.cov.get_unsafe(0, 1) = it2->val.cov.get_unsafe(1, 0) =
121 it1->cov.get_unsafe(0, 1);
123 it2->val.cov.get_unsafe(0, 3) = it2->val.cov.get_unsafe(3, 0) =
124 it1->cov.get_unsafe(0, 2);
126 it2->val.cov.get_unsafe(1, 3) = it2->val.cov.get_unsafe(3, 1) =
127 it1->cov.get_unsafe(1, 2);
176 x.getAsQuaternion(q_dumm, &dq_dr_sub);
177 J_E2Q_dx.get_unsafe(0, 0) = J_E2Q_dx.get_unsafe(1, 1) =
178 J_E2Q_dx.get_unsafe(2, 2) = 1;
179 J_E2Q_dx.insertMatrix(3, 3, dq_dr_sub);
188 J_E2Q_du.get_unsafe(0, 0) = J_E2Q_du.get_unsafe(1, 1) =
189 J_E2Q_du.get_unsafe(2, 2) = 1;
190 J_E2Q_du.insertMatrix(3, 3, dq_dr_sub);
202 quat_df_dx, quat_df_du);
210 J_Q2E.get_unsafe(0, 0) = J_Q2E.get_unsafe(1, 1) = J_Q2E.get_unsafe(2, 2) =
226 dr_dq_sub.multiply(dr_dq_sub_aux, dnorm_dq);
228 J_Q2E.insertMatrix(3, 3, dr_dq_sub);
234 df_dx.multiply_ABC(J_Q2E, quat_df_dx, J_E2Q_dx);
235 df_du.multiply_ABC(J_Q2E, quat_df_du, J_E2Q_du);
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...
mrpt::math::CQuaternionDouble & quat()
Read/Write access to the quaternion representing the 3D rotation.
CPose3D mean
The mean value.
#define THROW_EXCEPTION(msg)
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
CParticleList m_particles
The array of particles.
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.
Declares a class that represents a Probability Density function (PDF) of a 3D(6D) pose ...
mrpt::math::CMatrixDouble66 cov_inv
The inverse of the 6x6 covariance matrix.
CMatrixFixedNumeric< double, 6, 6 > CMatrixDouble66
void getAsQuaternion(mrpt::math::CQuaternionDouble &q, mrpt::math::CMatrixFixedNumeric< double, 4, 3 > *out_dq_dr=nullptr) const
Returns the quaternion associated to the rotation of this object (NOTE: XYZ translation is ignored) ...
GLsizei GLsizei GLuint * obj
A numeric matrix of compile-time fixed size.
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...
CMatrixTemplateNumeric< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).
CPose3D mean
The mean value.
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...
mrpt::math::CMatrixDouble66 cov
The 6x6 covariance matrix.
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...
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
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$.
const Scalar * const_iterator
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE( class_name, base_class_name, NameSpace)
This must be inserted as implementation of some required members for virtual CSerializable classes: ...
Declares a class that represents a Probability Density function (PDF) of a 3D pose.