完整的zed + orb slam2(https://www.cnblogs.com/leexiaoming/p/6576274.html)
按网上的教程安装遇到的两个问题:
1、运行 ./build.sh 时,出现如下错误
[ 0%] Built target rospack_genmsg_libexe
[ 0%] Built target rosbuild_precompile
[ 11%] Linking CXX executable ../RGBD
[ 33%] Built target Mono
[ 44%] Linking CXX executable ../Stereo
[ 77%] Built target MonoAR
/usr/bin/ld: CMakeFiles/RGBD.dir/src/ros_rgbd.cc.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/RGBD.dir/build.make:214: recipe for target '../RGBD' failed
make[2]: *** [../RGBD] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/RGBD.dir/all' failed
make[1]: *** [CMakeFiles/RGBD.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: CMakeFiles/Stereo.dir/src/ros_stereo.cc.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/Stereo.dir/build.make:214: recipe for target '../Stereo' failed
make[2]: *** [../Stereo] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/Stereo.dir/all' failed
make[1]: *** [CMakeFiles/Stereo.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
解决方法:https://github.com/raulmur/ORB_SLAM2/issues/494
2、编译完成后,用数据集运行时
terminate called after throwing an instance of 'std::runtime_error'
what(): Pangolin X11: Unable to retrieve framebuffer options
Aborted (core dumped)
这是pangolin导致的问题,注释掉Pangolin/src/display/device/display_x11.cpp文件中的两行代码即可
staticint visual_attribs[] =
{
GLX_X_RENDERABLE , True,
GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT,
GLX_RENDER_TYPE , GLX_RGBA_BIT,
GLX_X_VISUAL_TYPE , GLX_TRUE_COLOR,
GLX_RED_SIZE , 8,
GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 8,
GLX_DEPTH_SIZE, 24,
GLX_STENCIL_SIZE, 8,
GLX_DOUBLEBUFFER , glx_doublebuffer ? True : False,
//注释这一行GLX_SAMPLE_BUFFERS , glx_sample_buffers,
//注释这一行 GLX_SAMPLES , glx_sample_buffers > 0 ? glx_samples : 0,
None
};https://blog.csdn.net/jaysite/article/details/80224750
之后要重新编译pangolin!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3、orb slam2安装ros
把路径添加到 ~/.bashrc中,添加后 $ROS_PACKAGE_PATH 看是否添加成功,若不成功,重启电脑试试