Re: Behavior of rtabmap different in ROS2 compared to ROS1
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Behavior-of-rtabmap-different-in-ROS2-compared-to-ROS1-tp9213p9231.html
Hi,
The recorded images are not rectified. In your ros1 launch file, you feed correctly the output of stereo_image_proc in rtabmap. For ros2, it was more complicated to test your launch file. To go around stereo_image_proc and use only rtabmap.launch or rtabmap.launch.py, we can use
Rtabmap/ImagesAlreadyRectified parameter to tell rtabmap to rectify the images for convenience. One issue with your bag is that the camera_info doesn't include a frame_id. I did a patch in this
commit (also merged to ros2 branch) as a workaround as the calibration contains the baseline.
ROS1:
roslaunch rtabmap_ros rtabmap.launch \
stereo_namespace:=/stereo \
left_image_topic:=/stereo/left/image_raw \
right_image_topic:=/stereo/right/image_raw \
stereo:=true \
frame_id:=camera_link \
use_sim_time:=true \
args:="-d --Rtabmap/ImagesAlreadyRectified false"
rosbag play --clock --pause sample_ros1.bag
ROS2:
ros2 launch rtabmap_ros rtabmap.launch.py \
stereo_namespace:=/stereo \
left_image_topic:=/stereo/left/image_raw \
right_image_topic:=/stereo/right/image_raw \
stereo:=true \
frame_id:=camera_link \
use_sim_time:=true \
args:="-d --Rtabmap/ImagesAlreadyRectified false"
ros2 bag play sample_ros2.db3 --clock
The paths are pretty similar:
