标签:出错 examples slam color ack 路径 .bashrc bridge txt
source ~/.bashrc
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/user/ORB_SLAM2/Examples/ROS
上面这个一定要做,否则会出错说找不到路径和包
之后
按照orbslam2的github::https://github.com/raulmur/ORB_SLAM2
编译ros节点:
1.chmod +x build_ros.sh
./build_ros.sh
确保原程序可以编译
2.打开一个终端,运行:roslaunch kinect2_bridge kinect2_bridge.launch
3.再打开另一个终端,输入:rostopic list查看此时Kinect2发布的topic,我用的是/kinect2/qhd/image_color_rect和/kinect2/qhd/image_depth_rect
4.找到源文件ros_rgbd.cc,按照上面3的topic修改里面的ros订阅的内容
5.重新编译工程
chmod +x build_ros.sh ./build_ros.sh
6.在~/ORB_SLAM2/Examples/ROS$ 目录下,运行rosrun ORB_SLAM2 RGBD /home/user/ORB_SLAM2/Vocabulary/ORBvoc.txt /home/user/ORB_SLAM2/Examples/RGB-D/kinect2_qhd.yaml
即可得到实时在线轨迹。
标签:出错 examples slam color ack 路径 .bashrc bridge txt
原文地址:http://www.cnblogs.com/bigzhao/p/6635770.html