a simple example for how to use g2o and a rgbd-slam code based on my blog
my blog site: http://blog.csdn.net/heyijia0327
before run the code, you should have intalled g2o. this project is a simple example that you can learn how to write the cmakelist.txt in order to use g2o as a external lib. the source code is also very easy to read.
use: ./g2o_test
outputfile: sphere_after.g2o, you can using g2o_viewer to open this file and show the reslut.
sphere_before
sphere_after