32 #define POSE_COLOR 0,0,1 33 #define POINT_COLOR 1,0,0 40 CSetOfObjectsPtr outObj = CSetOfObjects::Create();
47 lins->setColor(0,0,1,0.6);
55 ellip->setCovMatrix((it)->
cov, 2 );
57 ellip->setQuantiles(3);
58 ellip->enableDrawSolid3D(
false);
60 outObj->insert(ellip);
79 ellip->setPose(
CPose3D(
p->mean.x(),
p->mean.y(), 0) );
80 ellip->setCovMatrix(
p->cov, 2 );
83 ellip->setQuantiles(3);
84 ellip->enableDrawSolid3D(
false);
86 outObj->insert(ellip);
89 p->mean.x(),
p->mean.y(), 0,
107 for (
size_t i=0;i<
p->size();++i)
110 pnts->insertPoint(po->
x(), po->
y(), 0);
116 outObj->insert(pnts);
117 outObj->insert(lins);
128 CSetOfObjectsPtr outObj = CSetOfObjects::Create();
139 obj->setPose( it->val.mean);
140 obj->setCovMatrix(it->val.cov, it->val.cov(2,2)==0 ? 2:3);
142 obj->setQuantiles(3);
143 obj->enableDrawSolid3D(
false);
146 outObj->insert(
obj );
153 CEllipsoidPtr
obj = CEllipsoid::Create();
154 obj->setLocation(
p->mean);
155 obj->setCovMatrix(
p->cov,
p->cov(2,2)==0 ? 2:3);
157 obj->setQuantiles(3);
158 obj->enableDrawSolid3D(
false);
159 outObj->insert(
obj );
166 const size_t N=
p->size();
170 for (
size_t i=0;i<N;i++)
173 p->m_particles[i].d->x,
174 p->m_particles[i].d->y,
175 p->m_particles[i].d->z );
176 outObj->insert(
obj );
186 CSetOfObjectsPtr outObj = CSetOfObjects::Create();
197 obj->setPose( it->val.mean);
200 obj->setQuantiles(3);
201 obj->enableDrawSolid3D(
false);
204 outObj->insert(
obj );
207 axes->setPose(it->val.mean);
209 outObj->insert(axes);
219 obj->setPose(
p->mean);
222 obj->setQuantiles(3);
223 obj->enableDrawSolid3D(
false);
226 outObj->insert(
obj );
229 axes->setPose(
p->mean);
231 outObj->insert(axes);
238 for (
size_t i=0;i<
p->size();i++)
241 axes->setPose(*
p->m_particles[i].d);
242 outObj->insert(axes);
254 CSetOfObjectsPtr outObj = CSetOfObjects::Create();
265 obj->setQuantiles(3);
266 obj->enableDrawSolid3D(
false);
269 outObj->insert(
obj );
274 outObj->insert(axes);
double x() const
Common members of all points & poses classes.
static CEllipsoidPtr Create()
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
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 ...
CSetOfObjectsPtr OPENGL_IMPEXP CornerXYZ(float scale=1.0)
Returns three arrows representing a X,Y,Z 3D corner.
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...
static CSetOfLinesPtr Create()
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 ...
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...
CMatrixTemplateNumeric< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).
const double POSE_POINT_SIZE
TModesList::const_iterator const_iterator
CSetOfObjectsPtr OPENGL_IMPEXP 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...
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.
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).
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...
The namespace for 3D scene representation and rendering.
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
static CPointCloudPtr Create()
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
CSetOfObjectsPtr posePDF2opengl(const POSE_PDF &o)
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call...
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.