This example, found in the path
- the basic construction of a graph of pose constraints,
- the execution of a graph-slam optimization algorithm on it (in order to optimize the global node poses given the information in all the edges and one fixed root node), and
- how to render graphs as MRPT's OpenGL primitives.
Both 2D or 3D graphs can be generated and optimized, since the example code is templatized.
The optimization algorithm is a Sparse Levenberg-Marquartd iterative method, implemented in the template function mrpt::graphslam::optimize_graph_spa_levmarq(), in the library
2. Example snapshots
Input data (noisy node poses) - click to enlarge
Output data from graph-slam - click to enlarge
Evolution of the logarithmic squared total error over iterations
3. Complete source code
You can browse the complete C++ source code of this example online: http://mrpt.googlecode.com/svn/trunk/samples/graph_slam_demo/