[SOVED] RTABMAP fails to run in rgbd mode
Hi,
I am running RTABMAP against a stereo camera that provides left and right and depth images.
When I run RTABMAP in stereo_mode (based on left and right image pairs) RTABMAP is working OK. (e.g. I can see the 3d point cloud being accumulated in Rviz)
Next, I want to test RTABMAP in rgbd mode (based on right and depth image pairs).
In this mode I'm getting error messages from RTABMAP (snippet1) I echo the /rtabmap/odom topic and indeed nothing is advertised.
To debug the problem, I kill the rgbd_odometry process that is triggered from the launch file, and run the same command from the command line. This time rgbd_odometry runs OK, and I can echo the topic (snippet3)
Why rgbd_odometry doesn't publish anything when it runs from the launch file, but publishes data when it runs separately?
The launch files that are related to RTABMAP is in snippet4
Thanks,
Avner
snippet1 - getting error messages from RTABMAP
[ WARN] [1565907237.759114913, 1556048635.546000004]: /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"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap/rtabmap subscribed to (approx sync):
/rtabmap/odom,
/rtabmap/rgbd_image_relay,
/rtabmap/odom_info
snippet2 - run rgb_odometry directly from the command line
ps aux | grep odometry
avnerm 22133 6.1 2.1 1805516 172020 ? Ssl 15:22 0:00 /opt/ros/melodic/lib/rtabmap_ros/rgbd_odometry --delete_db_on_start rgb/image:=/rm_mapping_node/cameras/stern/rectified_right depth/image:=/rm_mapping_node/cameras/stern/3d_z_coords rgb/camera_info:=/rm_mapping_node/cameras/stern/right/camera_info rgbd_image:=rgbd_image_relay odom:=odom __name:=rgbd_odometry __log:=/home/avnerm/.ros/log/8d688094-bfa4-11e9-975a-74d02b912ce1/rtabmap-rgbd_odometry-5.log
snippet3 - echo the topic /odom
rostopic echo /odom
...
---
header:
seq: 8
stamp:
secs: 1556049330
nsecs: 88000059
frame_id: "odom"
child_frame_id: "base_link"
pose:
pose:
position:
x: -1.05032432079
y: -1.40366268158
z: -0.831952929497
orientation:
x: -0.00683327377029
y: 0.00692438043004
z: -0.00286356138948
w: 0.999948578349
covariance: [660.712180279541, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 660.712180279541, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 660.712180279541, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00214658203125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00214658203125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00214658203125]
twist:
twist:
linear:
x: 0.823218107224
y: -0.786256253719
z: 0.694412589073
angular:
x: -0.00885304901749
y: -0.0140505637974
z: -0.00202373345383
covariance: [330.3560901397705, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 330.3560901397705, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 330.3560901397705, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001073291015625, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ...
Instead of putting your solution in the question, can you please put it as an answer? That'll make it easier for others to find