制作一个送咖啡机器人 -- ORB SLAM2
几个月前在计算所用rplidar做过一个送咖啡机器人。可是运用到室外场景Lidar成本太高,于是转战视觉SLAM。
花了几天时间用gazebo仿真,跑通了ORB SLAM2框架。
解决闭环(上面那个gif图):
Localization mode(拖拽机器人到新位置,ORB SLAM可以实现定位):
完整SLAM过程:
0x01 Quick Start
1 | # 安装 ROS |
0x02 运行demo
- 仿真(gazebo)
roslaunch turtlebot_gazebo turtlebot_world.launch
- 遥控
roslaunch turtlebot_teleop keyboard_teleop.launch
- 查看摄像头
rosrun image_view image_view image:=/camera/rgb/image_raw
- ORB_SLAM
rosrun ORB_SLAM2 Mono /home/s1nh/Project/ORB_SLAM2/Vocabulary/ORBvoc.txt /home/s1nh/Workspace/turtlebot/cam_orb_slam.yaml
0x03 相机相关
- 标定
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/image_raw camera:=/camera
- 相机位置
/opt/ros/kinetic/share/turtlebot_description/urdf/turtlebot_properties.urdf.xacro
- 相机 fov
/opt/ros/kinetic/share/turtlebot_description/urdf/turtlebot_gazebo.urdf.xacro
参考教程:
http://wiki.ros.org/cn/ROS/Tutorials
https://www.ncnynl.com/archives/201609/799.html