Go to the documentation of this file.
51 cout <<
"Initial PDF: mean: " << pdf.
getMeanVal() << endl;
54 #if MRPT_HAS_WXWIDGETS
65 mrpt::make_aligned_shared<CGridPlaneXY>(-5, 5, -5, 5, 0, 1));
70 #if MRPT_HAS_WXWIDGETS
73 win_before.unlockAccess3DScene();
74 win_before.setCameraZoom(5);
75 win_before.setCameraPointingToPoint(1, 0, 0);
76 win_before.forceRepaint();
82 cout <<
" # modes after: " << pdf.
size() << endl;
84 cout <<
"Final PDF: mean: " << pdf.
getMeanVal() << endl;
93 mrpt::make_aligned_shared<CGridPlaneXY>(-5, 5, -5, 5, 0, 1));
98 #if MRPT_HAS_WXWIDGETS
101 win_after.unlockAccess3DScene();
102 win_after.setCameraZoom(5);
103 win_after.setCameraPointingToPoint(1, 0, 0);
104 win_after.forceRepaint();
108 #if MRPT_HAS_WXWIDGETS
109 cout <<
"Push any key to exit..." << endl;
117 int main(
int argc,
char** argv)
125 catch (std::exception& e)
127 std::cout <<
"Exception: " << e.what() << std::endl;
132 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,...
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.
TDATA getMeanVal() const
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
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.
T square(const T x)
Inline function for the square of a number.
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.
std::shared_ptr< CSetOfObjects > Ptr
Classes for creating GUI windows for 2D and 3D visualization.
mrpt::math::CMatrixDouble33 cov
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.
std::shared_ptr< COpenGLScene > Ptr
void getCovariance(mrpt::math::CMatrixDouble &cov) const
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
The namespace for 3D scene representation and rendering.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Declares a class that represents a Probability Density function (PDF) of a 2D pose .
double log_w
The log-weight.
double DEG2RAD(const double x)
Degrees to radians.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |