rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

High network usage for remote mapping and RTABMap blank

Open hrishi-v opened this issue 1 year ago • 1 comments

Hi there, I was wondering if you had any advice on how we could reduce the network usage for the following two launch files? I followed your tutorial on remote mapping, but I'm still seeing a usage of around 1.5 Megabytes/s. Another issue that we face, which we are not sure if it's related to the network usage, is that RTABMap takes around 30 seconds to a minute to start displaying the odometry and point cloud, until then it's just a black screen, and says no data received in the terminal. However, after a random amount of time, it starts working.

The Raspberry Pi's launch file:

<launch>
  <arg name="rate"  default="10"/>
  <include file="$(find freenect_launch)/launch/freenect.launch">
     <arg name="depth_registration" value="True" />
  </include>


  <group ns="camera">
    <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="load rtabmap_sync/rgbd_sync camera_nodelet_manager" output="screen">
      <param name="compressed_rate"  type="double" value="$(arg rate)"/>
      <param name="approx_sync"      type="bool"   value="true"/>
      <param name="approx_sync_max_interval" type="double" value="0.025"/>
      <remap from="rgb/image"       to="rgb/image_rect_color"/>
      <remap from="depth/image"     to="depth_registered/image_raw"/>
      <remap from="rgb/camera_info" to="rgb/camera_info"/>
      <remap from="rgbd_image"      to="rgbd_image"/>
    </node>
  </group>      
</launch>

The client that does the mapping's launch file:

<launch>
    <arg name="rtabmap_args" default="--delete_db_on_start"/>

    <arg name="subscribe_rgbd" default="true"/>
    <arg name="rgbd_topic" default="/camera/rgbd_image"/>
    <arg name="compressed" default="true"/>

    <include file="$(find rtabmap_launch)/launch/rtabmap.launch">
        <arg name="subscribe_rgbd" value="$(arg subscribe_rgbd)"/>
        <arg name="rgbd_topic" value="$(arg rgbd_topic)"/>
        <arg name="compressed" value="$(arg compressed)"/>
        <arg name="rtabmap_args" value="$(arg rtabmap_args)"/>
    </include>
</launch>

Both are roslaunched without any extra parameters. Thank you for your time.

hrishi-v avatar Jun 18 '24 11:06 hrishi-v

1.5 MB/s at 10 Hz image data is not too bad. Based on freenect example here, it was ~900 KB/s for 5Hz using rgbd_sync.

For the 30 sec lack of data, you may doublecheck if the rgbd_image topic relayed on host computer is published at a constant 10Hz:

rostopic hz /camera/rgbd_image_relay

You may check system monitor like in those examples to see if the bandwidth usage is constant or there are some drop when you see rtabmap not updating.

matlabbe avatar Jun 23 '24 22:06 matlabbe