编译ORBSLAM2出现的问题

编译ORBSLAM2出现了以下问题
1.[rosbuild] rospack found package “ORB_SLAM2” at “”, but the current
directory is
“/home/xxxxx/catkin_ws/src/ORB_SLAM2/Examples/ROS/ORB_SLAM2”. You
should double-check your ROS_PACKAGE_PATH to ensure that packages are found
in the correct precedence order.
解决:
执行sudo gedit ~/.bashrc
添加export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/xxxxx/catkin_ws/src/ORB_SLAM2/Examples/ROS(我把ORB-SLAM2安装在/home/xxxxx/catkin_ws/src/目录下,此处根据安装包路径修改)
保存后source ~/.bashrc
2./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
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2
解决:
打开ORB_SLAM2/Examples/ROS/ORB_SLAM2文件夹下的CMakeLists.txt添加了

   -lboost_system

编译ORBSLAM2出现的问题_第1张图片
再编译就没问题了

你可能感兴趣的:(编译ORBSLAM2出现的问题)