请参考这个,需要安装的内容讲的很详细,我也参考了很多
注意就是,上面那篇文章,官方教程里都要看仔细一些,不要落了步骤,对当前是对哪个文件夹进行操作的心里要清楚,我对Ubuntu不熟悉,导致第一次安的乱七八糟,然后重装系统重新来了一次。
说一下我遇到的问题
第一次我把ORB_SLAM2放在home下,结果
# Add the path including Examples/ROS/ORB_SLAM2 to the ROS_PACKAGE_PATH environment variable.
# Open .bashrc file and add at the end the following line. Replace PATH by the folder where you cloned ORB_SLAM2
export ROS_PACKAGE_PATH=${
ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS
# Execute build_ros.sh script
chmod +x build_ros.