Re: (ros)bagging topics and later using it to construct the 3d map

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/ros-bagging-topics-and-later-using-it-to-construct-the-3d-map-tp5419p5428.html

Hi,

you may verify that your images are correctly republished:
$ rostopic hz /camera/color/image_raw /camera/aligned_depth_to_color/image_raw /camera/color/camera_info

If they are published, you should not have the "nothing published" warnings. You may have other warnings though afterwards. For example, record depth image with compressedDepth plugin (/camera/aligned_depth_to_color/image_raw/compressedDepth). You may need to record tf too. Also, rtabmap.launch can uncompressed topics for you when setting "compressed:=true".

Based on this tutorial, to record and replay compressed realsense data, I would do:
$ roslaunch realsense2_camera rs_camera.launch align_depth:=true
$ rosbag record -O subset \
   /camera/aligned_depth_to_color/image_raw/compressedDepth \
   /camera/color/image_raw/compressed \
   /camera/color/camera_info \
   tf

(close all after recording)

$ 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 \
   compressed:=true \
   use_sim_time:=true
$ rosbag play --clock subset.bag