先看g2o代码效果
g2o优化后
首先是g2o库安装(在文末)
下载代码:(GraphSLAM_tutorials_code代码,编译过程的错误已修改解决)
GraphSLAM_tutorials_code代码编译
mkdir build
cd build
cmake ..
make
运行:
cd ..
cd bin/
./g2o_test (在data文件夹生成一个sphere_after.g2o)
g2o_viewer查看:
cd ..
cd data/
g2o_viewer sphere_bignoise_vertex3.g2o (这是优化前)
g2o_viewer sphere_after.g2o
出现指针问题:
/home/~/code/GraphSLAM_tutorials_code/g2o_test/main.cpp:26:62: error: no matching function for call to ‘g2o::BlockSolver<g2o::BlockSolverTraits<-1, -1> >::Bl