https://github.com/introlab/rtabmap/wiki/Installation
https://github.com/introlab/rtabmap_ros#installation
http://wiki.ros.org/rtabmap_ros
http://official-rtab-map-forum.67519.x6.nabble.com/
实验环境:
ubunut16.04,kinetc,
https://www.cnblogs.com/williamc17/p/9550786.html
启动相机
realsense:
roslaunch realsense2_camera rs_camera.launch align_depth:=true
建图模式——两种在线可视化方式:rtabmapviz或者rviz。
(1) Launch (rtabmapviz): rtabmap.launch
RealSense D435:
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="–delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="–delete_db_on_start" depth_topic:=/camera/depth/image_rect_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info approx_sync:=false
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="–delete_db_on_start"
depth_topic:=/camera/aligned_depth_to_color/image_raw
rgb_topic:=/camera/color/image_raw
camera_info_topic:=/camera/color/camera_info
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="–delete_db_on_start"
depth_topic:=/camera/depth/image_rect_raw
rgb_topic:=/camera/color/image_raw
camera_info_topic:=/camera/color/camera_info
approx_sync:=false
上面两种参数都可以运行,
(2)Launch (rviz):
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="–delete_db_on_start" rviz:=true rtabmapviz:=false
rviz 不建图 暂时没解决
http://wiki.ros.org/rtabmap_ros/Tutorials/HandHeldMapping
双目模式:
启动相机
roslaunch realsense2_camera rs_camera.launch align_depth:=true
ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc _approximate_sync:=true
数据存储位置
~/.ros/rtabmap.db
可视化工具
rtabmap-databaseViewer ~/.ros/rtabmap.db
RVIZ 中颜色代表的坐标含义
红:X
绿:Y
蓝:Z
视觉SLAM十四讲从理论到实践中规定
针孔相机模型中Z轴指向相机的前方,X轴向右,Y轴向下。
ROS摄像机的标定
image_width、image_height代表图片的长宽
camera_name为摄像头名
camera_matrix规定了摄像头的内部参数矩阵
distortion_model指定了畸变模型
distortion_coefficients指定畸变模型的系数
rectification_matrix为矫正矩阵,一般为单位阵
projection_matrix为外部世界坐标到像平面的投影矩阵
rtabmap 数据集实验过程
Here are the main steps to configure your camera to be used with RTAB-Map.
header.frame_id of the messages is /camera_link:
left/image_raw (sensor_msgs/Image)//左面摄像机彩色原图
right/image_raw (sensor_msgs/Image)//右面摄像机彩色原图
left/camera_info (sensor_msgs/CameraInfo)//左面摄像机参数
right/camera_info (sensor_msgs/CameraInfo) //右面摄像机参数
Rectify the images using stereo_image_proc. This will generate these topics:
left/image_rect_color (sensor_msgs/Image)//左面摄像机矫正后的彩色图像
right/image_rect_color (sensor_msgs/Image)//右面摄像机矫正后的彩色图像
left/image_rect (sensor_msgs/Image)//左面摄像机矫正后的黑白图像
right/image_rect (sensor_msgs/Image)//右面摄像机矫正后的黑白图像
points2 (sensor_msgs/PointCloud2) You can verify that the calibration is ok if this point cloud looks good in rviz. //点云图像
The messages are in the /camera_link frame (x-axis right, y-axis down and z-axis forward),
/odom,
/stereo_camera/left/image_rect_color,
/stereo_camera/right/image_rect,
/stereo_camera/left/camera_info,
/stereo_camera/right/camera_info,
/rtabmap/odom_info