Go to the documentation of this file.
51 cout <<
"Initial PDF: mean: " << pdf.
getMeanVal() << endl;
54 #if MRPT_HAS_WXWIDGETS
64 scene.
insert(CGridPlaneXY::Create(-5, 5, -5, 5, 0, 1));
69 #if MRPT_HAS_WXWIDGETS
72 win_before.unlockAccess3DScene();
73 win_before.setCameraZoom(5);
74 win_before.setCameraPointingToPoint(1, 0, 0);
75 win_before.forceRepaint();
81 cout <<
" # modes after: " << pdf.
size() << endl;
83 cout <<
"Final PDF: mean: " << pdf.
getMeanVal() << endl;
91 scene.
insert(CGridPlaneXY::Create(-5, 5, -5, 5, 0, 1));
96 #if MRPT_HAS_WXWIDGETS
99 win_after.unlockAccess3DScene();
100 win_after.setCameraZoom(5);
101 win_after.setCameraPointingToPoint(1, 0, 0);
102 win_after.forceRepaint();
106 #if MRPT_HAS_WXWIDGETS
107 cout <<
"Push any key to exit..." << endl;
123 catch (
const std::exception& e)
130 printf(
"Untyped exception!");
void clear()
Clear the list of modes.
void getAs3DObject(OPENGL_SETOFOBJECTSPTR &out_obj) const
Returns a 3D representation of this PDF (it doesn't clear the current contents of out_obj,...
std::shared_ptr< mrpt::opengl ::CSetOfObjects > Ptr
void insert(const CRenderizable::Ptr &newObject, const std::string &viewportName=std::string("main"))
Insert a new object into the scene, in the given viewport (by default, into the "main" viewport).
This class allows the user to create, load, save, and render 3D scenes using OpenGL primitives.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void push_back(const TGaussianMode &m)
Inserts a copy of the given mode into the SOG.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
The struct for each mode:
Saves data to a file and transparently compress the data using the given compression level.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
return_t square(const num_t x)
Inline function for the square of a number.
type_value getMeanVal() const
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
Classes for creating GUI windows for 2D and 3D visualization.
mrpt::math::CMatrixDouble33 cov
std::shared_ptr< mrpt::opengl ::COpenGLScene > Ptr
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream,...
size_t size() const
Return the number of Gaussian modes.
void mergeModes(double max_KLd=0.5, bool verbose=false)
Merge very close modes so the overall number of modes is reduced while preserving the total distribut...
int getch() noexcept
An OS-independent version of getch, which waits until a key is pushed.
void getCovariance(mrpt::math::CMatrixDouble &cov) const
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
The namespace for 3D scene representation and rendering.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.
Declares a class that represents a Probability Density function (PDF) of a 2D pose .
double log_w
The log-weight.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |