Ubuntu16.04+Ros+Usb_Cam ORB SLAM2

转载自:https://www.jianshu.com/p/dbf39b9e4617亲测可用

1.其中编译ORB_SLAM2的   ./build.sh 和 ./build_ros.sh之前需要修改文件的属性, chmod +x build.sh  和chmod +x build_ros.sh ,最好还是进去编辑下,把build.sh 和 build_ros.sh中的make -j修改为make;

2.在执行  ./build_ros.sh时会遇到问题,切换到/catkin_ws/src/ORB_SLAM2/Examples/ROS/ORB_SLAM2修改此目录下的CMakeList.txt文件,如下添加红色部分即可,然后重新执行  ./build_ros.sh

set(LIBS
${OpenCV_LIBS}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
-lboost_system  
)

3.在调用设摄像头时,需要修改/catkin_ws/src/ORB_SLAM2/Examples/ROS/ORB_SLAM2/src下边的ros_mono.cc文件将里边的订阅修改为从usb_cam 即 ros::Subscriber sub = nodeHandler.subscribe("/usb_cam/image_raw", 1, &ImageGrabber::GrabImage,&igb);显示行号命令为   set nu,这步的意思是从urb_cam接受信号;

4.如果启动的摄像头不是指定的摄像头,则需要在usb_cam的launch文件中修改/catkin_ws/src/usb_cam/launch中的usb_cam-test.launch文件,<param name="video_device" value="/dev/video1" />只需要修改数字即可。

上一篇:Kubernetes1.5 集成Heapster


下一篇:生产环境:ansible自动化部署kubernetes-1.14