37 #define POSE_COLOR 0, 0, 1 38 #define POINT_COLOR 1, 0, 0 45 auto outObj = CSetOfObjects::Create();
53 lins->setColor(0, 0, 1, 0.6);
56 for (
const auto& it : *
p)
59 std::make_shared<opengl::CEllipsoid>();
61 ellip->setPose(
CPose3D(it.mean.x(), it.mean.y(), 0));
62 ellip->setCovMatrix(it.cov, 2 );
64 ellip->setQuantiles(3);
65 ellip->enableDrawSolid3D(
false);
67 outObj->insert(ellip);
70 it.mean.x(), it.mean.y(), 0,
87 ellip->setPose(
CPose3D(
p->mean.x(),
p->mean.y(), 0));
88 ellip->setCovMatrix(
p->cov, 2 );
91 ellip->setQuantiles(3);
92 ellip->enableDrawSolid3D(
false);
94 outObj->insert(ellip);
97 p->mean.x(),
p->mean.y(), 0,
101 outObj->insert(lins);
116 for (
size_t i = 0; i <
p->size(); ++i)
118 const auto po =
p->m_particles[i].d;
119 pnts->insertPoint(po.x, po.y, 0);
124 outObj->insert(pnts);
125 outObj->insert(lins);
144 for (
const auto& it : *
p)
147 std::make_shared<opengl::CEllipsoid>();
149 obj->setPose(it.val.mean);
150 obj->setCovMatrix(it.val.cov, it.val.cov(2, 2) == 0 ? 2 : 3);
152 obj->setQuantiles(3);
153 obj->enableDrawSolid3D(
false);
165 obj->setLocation(
p->mean.x(),
p->mean.y(),
p->mean.z());
166 obj->setCovMatrix(
p->cov,
p->cov(2, 2) == 0 ? 2 : 3);
168 obj->setQuantiles(3);
169 obj->enableDrawSolid3D(
false);
179 const size_t N =
p->size();
183 for (
size_t i = 0; i < N; i++)
185 i,
p->m_particles[i].d->x,
p->m_particles[i].d->y,
186 p->m_particles[i].d->z);
206 for (
const auto& it : *
p)
209 std::make_shared<opengl::CEllipsoid>();
211 obj->setPose(it.val.mean);
215 obj->setQuantiles(3);
216 obj->enableDrawSolid3D(
false);
223 axes->setPose(it.val.mean);
225 outObj->insert(axes);
235 obj->setPose(
p->mean);
238 obj->setQuantiles(3);
239 obj->enableDrawSolid3D(
false);
245 axes->setPose(
p->mean);
247 outObj->insert(axes);
254 for (
size_t i = 0; i <
p->size(); i++)
258 axes->setPose(
p->m_particles[i].d);
259 outObj->insert(axes);
283 obj->setQuantiles(3);
284 obj->enableDrawSolid3D(
false);
292 outObj->insert(axes);
const double POSE_TAIL_WIDTH
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
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...
static Ptr Create(Args &&... args)
const double POSE_AXIS_SCALE
#define ASSERT_(f)
Defines an assertion mechanism.
This base provides a set of functions for maths stuff.
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
const double POSE_POINT_SIZE
#define IS_CLASS(obj, class_name)
True if the given reference to object (derived from mrpt::rtti::CObject) is of the given class...
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...
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.
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.
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
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)...
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.
CMatrixDynamic< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).