37 #define POSE_COLOR 0, 0, 1 38 #define POINT_COLOR 1, 0, 0 52 mrpt::make_aligned_shared<opengl::CSetOfLines>();
53 lins->setColor(0, 0, 1, 0.6);
59 mrpt::make_aligned_shared<opengl::CEllipsoid>();
62 ellip->setCovMatrix((it)->
cov, 2 );
64 ellip->setQuantiles(3);
65 ellip->enableDrawSolid3D(
false);
67 outObj->insert(ellip);
81 mrpt::make_aligned_shared<opengl::CSetOfLines>();
86 mrpt::make_aligned_shared<opengl::CEllipsoid>();
88 ellip->setPose(
CPose3D(
p->mean.x(),
p->mean.y(), 0));
89 ellip->setCovMatrix(
p->cov, 2 );
92 ellip->setQuantiles(3);
93 ellip->enableDrawSolid3D(
false);
95 outObj->insert(ellip);
98 p->mean.x(),
p->mean.y(), 0,
102 outObj->insert(lins);
109 mrpt::make_aligned_shared<opengl::CPointCloud>();
114 mrpt::make_aligned_shared<opengl::CSetOfLines>();
118 for (
size_t i = 0; i <
p->size(); ++i)
120 const auto po =
p->m_particles[i].d;
121 pnts->insertPoint(po.x, po.y, 0);
127 outObj->insert(pnts);
128 outObj->insert(lins);
147 it !=
p->end(); ++it)
150 mrpt::make_aligned_shared<opengl::CEllipsoid>();
152 obj->setPose(it->val.mean);
153 obj->setCovMatrix(it->val.cov, it->val.cov(2, 2) == 0 ? 2 : 3);
155 obj->setQuantiles(3);
156 obj->enableDrawSolid3D(
false);
167 obj->setLocation(
p->mean.x(),
p->mean.y(),
p->mean.z());
168 obj->setCovMatrix(
p->cov,
p->cov(2, 2) == 0 ? 2 : 3);
170 obj->setQuantiles(3);
171 obj->enableDrawSolid3D(
false);
180 mrpt::make_aligned_shared<mrpt::opengl::CPointCloud>();
181 const size_t N =
p->size();
185 for (
size_t i = 0; i < N; i++)
187 i,
p->m_particles[i].d->x,
p->m_particles[i].d->y,
188 p->m_particles[i].d->z);
211 mrpt::make_aligned_shared<opengl::CEllipsoid>();
213 obj->setPose(it->val.mean);
217 obj->setQuantiles(3);
218 obj->enableDrawSolid3D(
false);
225 axes->setPose(it->val.mean);
227 outObj->insert(axes);
236 mrpt::make_aligned_shared<opengl::CEllipsoid>();
238 obj->setPose(
p->mean);
241 obj->setQuantiles(3);
242 obj->enableDrawSolid3D(
false);
248 axes->setPose(
p->mean);
250 outObj->insert(axes);
257 for (
size_t i = 0; i <
p->size(); i++)
261 axes->setPose(
p->m_particles[i].d);
262 outObj->insert(axes);
282 mrpt::make_aligned_shared<opengl::CEllipsoid>();
287 obj->setQuantiles(3);
288 obj->enableDrawSolid3D(
false);
296 outObj->insert(axes);
const double POSE_TAIL_WIDTH
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
CListGaussianModes::const_iterator const_iterator
Declares a class that represents a Probability Density function (PDF) of a 3D point ...
Declares a class that represents a Probability Density function (PDF) of a 3D(6D) pose ...
const double POSE_TAIL_LENGTH
GLsizei GLsizei GLuint * obj
Declares a class that represents a Probability Density function (PDF) of a 3D pose using a quaternion...
const double POSE_AXIS_SCALE
This base provides a set of functions for maths stuff.
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
CMatrixTemplateNumeric< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).
const double POSE_POINT_SIZE
Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x...
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...
TModesList::const_iterator const_iterator
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CSetOfObjects::Ptr posePDF2opengl(const POSE_PDF &o)
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call...
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
CSetOfObjects::Ptr CornerXYZ(float scale=1.0)
Returns three arrows representing a X,Y,Z 3D corner.
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::rtti::CObject) is of the give...
CSetOfObjects::Ptr CornerXYZSimple(float scale=1.0, float lineWidth=1.0)
Returns three arrows representing a X,Y,Z 3D corner (just thick lines instead of complex arrows for f...
The namespace for 3D scene representation and rendering.
double mean(const CONTAINER &v)
Computes the mean value of a vector.
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
Eigen::Matrix< typename MATRIX::Scalar, MATRIX::ColsAtCompileTime, MATRIX::ColsAtCompileTime > cov(const MATRIX &v)
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample...
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x...
A probability distribution of a 2D/3D point, represented as a set of random samples (particles)...
const Scalar * const_iterator
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
A gaussian distribution for 3D points.
Declares a class that represents a Probability Density function (PDF) of a 3D pose.