RTAB-Map using realsense R200- Set up

asked 2019-11-06 13:50:40 -0500

Markus gravatar image

Hey there,

I just followed this tutorial [rtabmap_rosTutorialsRemoteMapping ] (http://wiki.ros.org/rtabmap_ros/Tutor...). As I have a RealsenseCamera R200 there is no instructions given on how to setup the synchronization.

Note 1: I just have a realsense on my robot (nothing else).

Note 2: If I try the rtabmap_rosTutorialsHandHeldMapping tutorial with usb connected realsene everything works. Now I want to see if also the remote example works but it does not due to synchronization problems ....

What I tried is the following (after setting up network connection)

Robot PC: launched this file:


  <arg name="rate"        default="5"/>     <!-- Rate we want to publish over network -->
  <arg name="approx_sync" default="true"/> <!-- false for zed camera -->
  <arg name="resolution"  default="3"/>     <!-- Using VGA to use less bandwidth -->
  <arg name="rgbd_sync"   default="true"/>

  <group ns="camera">
    <node pkg="nodelet" type="nodelet" name="camera_nodelet_manager" args="manager" output="screen"/>

    <include file="$(find realsense_camera)/launch/r200_nodelet_rgbd.launch">

    <node pkg="tf" type="static_transform_publisher" name="camera_zed_link" args="0 0 0 0 0 0 camera_link zed_camera_center 100"/> 

    <!-- Use same nodelet used by ZED to avoid image serialization -->
    <node if="$(arg rgbd_sync)" pkg="nodelet" type="nodelet" name="rgbd_sync" args="load rtabmap_ros/rgbd_sync camera_nodelet_manager" output="screen">
      <param name="compressed_rate"  type="double" value="$(arg rate)"/>
      <param name="approx_sync"      type="bool"   value="$(arg approx_sync)"/>

      <remap from="rgb/image"       to="rgb/image_rect_color"/>
      <remap from="depth/image"     to="depth/depth_registered"/>
      <remap from="rgb/camera_info" to="rgb/camera_info"/>

      <remap from="rgbd_image"      to="rgbd_image"/>

    <node unless="$(arg rgbd_sync)" pkg="nodelet" type="nodelet" name="data_throttle" args="load rtabmap_ros/data_throttle camera_nodelet_manager" output="screen">
      <param name="rate"         type="double" value="$(arg rate)"/>
      <param name="approx_sync"  type="bool"   value="$(arg approx_sync)"/>

      <remap from="rgb/image_in"       to="rgb/image_rect_color"/>
      <remap from="depth/image_in"     to="depth/depth_registered"/>
      <remap from="rgb/camera_info_in" to="rgb/camera_info"/>

      <remap from="rgb/image_out"       to="throttled/rgb/image_rect_color"/>
      <remap from="depth/image_out"     to="throttled/depth_registered/image_raw"/>
      <remap from="rgb/camera_info_out" to="throttled/rgb/camera_info"/>

Client PC:

roslaunch rtabmap_ros rtabmap.launch subscribe_rgbd:=true rgbd_topic:=/camera/rgbd_image compressed:=true rtabmap_args:="--delete_db_on_start"

I then get this error on the client pc:

ERROR: cannot launch node of type [rtabmap_ros/rgbd_relay]: can't locate node [rgbd_relay] in package [rtabmap_ros]
[ WARN] [1573069611.462580337]: rtabmap: Parameters subscribe_depth and subscribe_rgbd cannot be true at the same time. Parameter subscribe_depth is set to false.
[ WARN] [1573069615.289041955]: /rtabmap/rgbd_odometry: 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. 
/rtabmap/rgbd_odometry subscribed to:
[ WARN] [1573069616.512067609]: /rtabmap/rtabmapviz: 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 ...
edit retag flag offensive close merge delete



Hi! I am a complete novice in ROS and I was having exactly the same problem this morning. ROS didn't seem to be able to locate the rgbd_delay node. However, the node is indeed listed in the rtabmap_ros package, so I thought it was weird. What I attempted was to build the package from source, as specified here: Build from source It took me a couple hours for the package to build, but in the end the problem seems to be fixed. I can now do Remote Mapping just fine, with a latency smaller than before. This might not be the simplest solution, but it worked for me. I hope it does for you as well. I am still following this thread in case a more straightforward solution is proposed. Cheers!

the_emmo gravatar image the_emmo  ( 2019-11-07 21:56:23 -0500 )edit

Hey thanks for your reply. It would be great if you could just list what steps you do (what launch code do you execute, how do you compress your messages, odom as well? even after building from source) I try to get it to work since days..... I also wrote a github issue here: https://github.com/introlab/rtabmap_r... (describing in more detail what I did). The rgbd_delayproblem does not occur for me If I start the launch file linked in the remote_mapping tutorial which is: https://github.com/introlab/rtabmap_r...

Markus gravatar image Markus  ( 2019-11-09 01:55:47 -0500 )edit

Hi! I'm currently using two launch files.

Note that I'm using external odometry. But maybe you should try with visual odometry first, just to make sure.

Only RGB-D messages are being compressed using rgbd_sync. Odometry is published by another node I addapted for a differential drive robot using encoder data.

Do you still get the ERROR: cannot launch node of type [rtabmap_ros/rgbd_relay]: can't locate node [rgbd_relay] in package [rtabmap_ros] error? I solved it building from source, as I mentioned earlier. Cheers!

the_emmo gravatar image the_emmo  ( 2019-11-13 12:07:15 -0500 )edit

For the missing rgbd_relay, it was an issue with the binaries, now fixed in https://github.com/introlab/rtabmap_r..., until new version of binaries is released, we should build from source to get rgbd_relay. To avoid rebuilding rtabmap library, only rtabmap_ros:

$ sudo apt remove ros-melodic-rtabmap-ros
$ cd ~/catkin_ws/src
$ git clone -b melodic-devel https://github.com/introlab/rtabmap_ros.git
$ cd ~/catkin_ws
$ catkin_make
matlabbe gravatar image matlabbe  ( 2019-11-16 22:03:05 -0500 )edit