31 #define POSE_COLOR 0, 0, 1 32 #define POINT_COLOR 1, 0, 0 46 mrpt::make_aligned_shared<opengl::CSetOfLines>();
47 lins->setColor(0, 0, 1, 0.6);
53 mrpt::make_aligned_shared<opengl::CEllipsoid>();
56 ellip->setCovMatrix((it)->
cov, 2 );
58 ellip->setQuantiles(3);
59 ellip->enableDrawSolid3D(
false);
61 outObj->insert(ellip);
75 mrpt::make_aligned_shared<opengl::CSetOfLines>();
80 mrpt::make_aligned_shared<opengl::CEllipsoid>();
82 ellip->setPose(
CPose3D(
p->mean.x(),
p->mean.y(), 0));
83 ellip->setCovMatrix(
p->cov, 2 );
86 ellip->setQuantiles(3);
87 ellip->enableDrawSolid3D(
false);
89 outObj->insert(ellip);
92 p->mean.x(),
p->mean.y(), 0,
103 mrpt::make_aligned_shared<opengl::CPointCloud>();
108 mrpt::make_aligned_shared<opengl::CSetOfLines>();
112 for (
size_t i = 0; i <
p->size(); ++i)
115 pnts->insertPoint(po->
x(), po->
y(), 0);
121 outObj->insert(pnts);
122 outObj->insert(lins);
141 it !=
p->end(); ++it)
144 mrpt::make_aligned_shared<opengl::CEllipsoid>();
146 obj->setPose(it->val.mean);
147 obj->setCovMatrix(it->val.cov, it->val.cov(2, 2) == 0 ? 2 : 3);
149 obj->setQuantiles(3);
150 obj->enableDrawSolid3D(
false);
161 obj->setLocation(
p->mean);
162 obj->setCovMatrix(
p->cov,
p->cov(2, 2) == 0 ? 2 : 3);
164 obj->setQuantiles(3);
165 obj->enableDrawSolid3D(
false);
174 mrpt::make_aligned_shared<mrpt::opengl::CPointCloud>();
175 const size_t N =
p->
size();
179 for (
size_t i = 0; i < N; i++)
181 i,
p->m_particles[i].d->x,
p->m_particles[i].d->y,
182 p->m_particles[i].d->z);
205 mrpt::make_aligned_shared<opengl::CEllipsoid>();
207 obj->setPose(it->val.mean);
211 obj->setQuantiles(3);
212 obj->enableDrawSolid3D(
false);
219 axes->setPose(it->val.mean);
221 outObj->insert(axes);
230 mrpt::make_aligned_shared<opengl::CEllipsoid>();
232 obj->setPose(
p->mean);
235 obj->setQuantiles(3);
236 obj->enableDrawSolid3D(
false);
242 axes->setPose(
p->mean);
244 outObj->insert(axes);
251 for (
size_t i = 0; i <
p->size(); i++)
255 axes->setPose(*
p->m_particles[i].d);
256 outObj->insert(axes);
276 mrpt::make_aligned_shared<opengl::CEllipsoid>();
281 obj->setQuantiles(3);
282 obj->enableDrawSolid3D(
false);
290 outObj->insert(axes);
double x() const
Common members of all points & poses classes.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
size_t size() const
Returns the number of particles.
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 Scalar * const_iterator
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
TModesList::const_iterator const_iterator
std::shared_ptr< CSetOfObjects > Ptr
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...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
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.
const double & phi() const
Get the phi angle of the 2D pose (in radians)
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::utils::CSerializable) is of t...
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 ...
std::shared_ptr< CSetOfLines > Ptr
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...
std::shared_ptr< CPointCloud > Ptr
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)...
CListGaussianModes::const_iterator const_iterator
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
A gaussian distribution for 3D points.
Declares a class that represents a Probability Density function (PDF) of a 3D pose.
std::shared_ptr< CEllipsoid > Ptr