rtabmap node crashes when I try to approx_sync icp_odometry and rgb camera

Posted by GilMe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/rtabmap-node-crashes-when-I-try-to-approx-sync-icp-odometry-and-rgb-camera-tp9181.html

For my setup I have a solid state lidar (that generates a 3d pointcloud) and a rgb camera.
In my launch file I generate odometry using an icp_odometry node that uses data coming from the lidar. I then feed this odometry to a rtabmap node along with subscribing to my rgb camera and lidar. If the approx_sync varible is set to false i get the following error:

[ WARN] [1666880020.278087704, 1666096551.027407952]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rtabmap subscribed to (exact sync):
   /rtabmap/scanmatch_odom \
   /camera/image_raw_relay \
   /camera/camera_info \
   /lidar/scan_3D \
   /rtabmap/odom_info


If I set the approx_sync variable to true the rtabmap node crashes even when I only subscribe to the rgb topic. It gives me the following error:

[rtabmap/rtabmap-5] process has died [pid 14307, exit code -8, cmd /home/cs3/new_nano_ws/devel/lib/rtabmap_ros/rtabmap --delete_db_on_start /data_throttled_image/compressed:=/camera/image_raw/compressed rgb/image:=/camera/image_raw_relay rgb/camera_info:=/camera/camera_info scan_cloud:=/lidar/scan_3D odom:=scanmatch_odom odom_info:=odom_info __name:=rtabmap __log:=/home/cs3/.ros/log/b54bfff4-5601-11ed-a20c-d41b81c98bb3/rtabmap-rtabmap-5.log].
log file: /home/cs3/.ros/log/b54bfff4-5601-11ed-a20c-d41b81c98bb3/rtabmap-rtabmap-5*.log

I have checked and it also happens when I don't subscribe to lidar (when subscribe_scan_cloud is set to false).
What am I doing wrong?