You are here

Example: graph_slam_demo

See also: App: graph-slam

1. Description


This example, found in the path MRPT/samples/graph_slam_demo, demonstrates:

  • 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 mrpt-graphslam.

 

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/

 

 

Tags: 
Subscribe to Comments for "Example: graph_slam_demo"