This is going to be a really quick tutorial on how to visualize the results of the sphere optimizatino and the slam2d optimization of G2O.
We first are going to run the sphere optimization. We start by creating the sphere.
./create_sphere -o sphere.g2o
Running this program will create a
sphere.g2o file that hold a sphere object to optimize.
Will load the sphere object in the g2o_viewer. Then you can just play with the interface to see the result of the optimization.
For visualizing tutorial_slam2d, run the program first.
This will create two output files
tutorial_after.g2o that, as one can guess represent the graph of the slam before and after the optimization.
Now the next step is to visualize the results.
Open the output files are remove
TUTORIAL_ from every node and edge names. For example :
TUTORIAL_VERTEX_POINT_XY 1 -2.16519 -0.515911
VERTEX_POINT_XY 1 -2.16519 -0.515911
Finally, open each of the two files generated in g2o_viwer with
You should see this as a result :