Go to the documentation of this file.
25 #include <mrpt/examples_config.h>
27 MRPT_EXAMPLES_BASE_DIRECTORY +
28 string(
"../share/mrpt/datasets/localization_demo.simplemap.gz");
48 cout <<
"Building gridmap...\n";
51 gridmap.loadFromSimpleMap(simplemap);
54 cout <<
"Building Voronoi diagram...\n";
56 gridmap.buildVoronoiDiagram(0.5f, 0.3f);
60 gridmap.getAsImage(img_grid);
64 gridmap.getVoronoiDiagram().getAsMatrix(mat_voronoi);
69 win1.showImage(img_grid);
72 win2.showImage(img_voronoi);
77 int main(
int argc,
char** argv)
86 cout <<
"MRPT exception caught: " << e.what() << endl;
91 printf(
"Another exception!!");
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool loadFromFile(const std::string &filName)
Load the contents of this object from a .simplemap binary file (possibly compressed with gzip)
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
void setFromMatrix(const Eigen::MatrixBase< Derived > &m, bool matrix_is_normalized=true)
Set the image from a matrix, interpreted as grayscale intensity values, in the range [0,...
This class creates a window as a graphical user interface (GUI) for displaying images to the user.
Classes for creating GUI windows for 2D and 3D visualization.
A class for storing images as grayscale or RGB bitmaps.
This class stores a sequence of <Probabilistic Pose,SensoryFrame> pairs, thus a "metric map" can be t...
This base provides a set of functions for maths stuff.
A class for storing an occupancy grid map.
GLsizei const GLchar ** string
const string sample_simplemap_file
A namespace of pseudo-random numbers generators of diferent distributions.
void pause(const std::string &msg=std::string("Press any key to continue...")) noexcept
Shows the message "Press any key to continue" (or other custom message) to the current standard outpu...
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 | |