rtabmap rgbd_image empty header/timestamp

asked 2020-05-13 08:29:27 -0500

JorenFrans gravatar image

Hi everyone,

I'm running ROS Melodic on my Ubuntu 18.04. I'm trying to create an autonomous robot using an Intel realsense d451i depth-camera and encoder for odometry. The right tf's are also already implemented. As we don't use any laserscans, we are trying to map our environment in a pointcloud using rtabmap.

We are following point 2.4 in the following ROS-tutorial to setup our launchfile: http://wiki.ros.org/rtabmap_ros/Tutor...

This is the launchfile we could already create from this information:

   <launch>
  <group ns="rtabmap">

    <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
      <remap from="rgb/image"       to="/camera/color/image_raw"/>
      <remap from="depth/image"

 to="/camera/depth/image_rect_raw"/>
  <remap from="rgb/camera_info" to="/camera/color/camera_info"/>
  <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->

  <!-- Should be true for not synchronized camera topics
       (e.g., false for kinectv2, zed, realsense, true for xtion, kinect360)-->
  <param name="approx_sync"       value="false"/>
</node>

<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
      <param name="frame_id" type="string" value="base_link"/>

      <param name="subscribe_depth" type="bool" value="false"/>
      <param name="subscribe_rgbd" type="bool" value="true"/>
      <!-- <param name="subscribe_scan_cloud" type="bool" value="true"/> -->

      <remap from="odom" to="/odom"/>
      <remap from="rgbd_image" to="rgbd_image"/>
      <!-- <remap from="scan_cloud" to="/camera/depth/color/points"/> -->

      <param name="queue_size" type="int" value="50"/>

      <!-- RTAB-Map's parameters -->
      <param name="RGBD/AngularUpdate"        type="string" value="0.01"/>
      <param name="RGBD/LinearUpdate"         type="string" value="0.01"/>
      <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
</node>

</group> </launch>

When launching this file, we get a warning that keeps on generating:

[ WARN] [1589361789.149552328]: /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=50).
/rtabmap/rtabmap subscribed to (approx sync):
   /rtabmap/odom,
   /rtabmap/rgbd_image

We checked and the odometry comes through on the right topic "/odom". Also the timestamps look correct. We listened on the newly generated topic "/rtabmap/rgdb_image" and can see that the camera frames are used. But for every frame it generates, the header is completely empty except for some random zeros. Next is an example of what these frames end with:

...   209, 6, 209, 6, 214, 6, 219, 6, 219, 6, 219, 6, 224, 6, 224, 6, 229, 6, 229, 6, 229, 6, 234, 6, 234, 6, 234, 6, 239, 6, 239, 6, 234, 6, 234, 6, 229, 6, 224, 6, 224, 6, 224, 6, 214, 6, 209, 6, 209, 6, 199, 6, 195, 6, 199, 6, 204, 6, 209, 6, 209, 6, 214, 6, 214 ...
(more)
edit retag flag offensive close merge delete

Comments

Look at the header of the message, not the inner data (compressed data is likely to be null because not used):

$ rostopic echo /rtabmap/rgbd_image/header
matlabbe gravatar image matlabbe  ( 2020-05-13 13:52:28 -0500 )edit

Thanks! if I listen to this topic I can see the timestamps coming through correctly. So the problem will probably be something else.

JorenFrans gravatar image JorenFrans  ( 2020-05-14 02:14:48 -0500 )edit

In your description, you are referring to /odom, not the /rtabmap/odom that is actually subscribed.

matlabbe gravatar image matlabbe  ( 2020-05-25 17:53:12 -0500 )edit