[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: RGB-D Hand-Held Mapping With a Kinect.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Remote Mapping

Description: This tutorial shows how to do mapping on a remote computer.

Tutorial Level: BEGINNER

Next Tutorial: Setup RTAB-Map on your robot!

RemoteMapping

Robot

For simplification, I will just show nodes/launch files used for mapping. Your robot may have other stuff launched at the same time. Here I assume that the ROS Master is on the robot, and a Kinect is used.

1. [Optional]: To avoid host name resolution issues, set ROS_IP environment variable for the robot:

2. We will throttle the Kinect messages on the robot at 5 Hz to reduce the bandwidth used on the network (reducing latency). We also want to pre-sync camera topics before sending them over the network. To do both, we can use rtabmap_ros/rgbd_sync nodelet for convenience. Create a file called freenect_throttle.launch and copy/paste the code below.

Note that for the example, I added rgbd_sync argument to switch between rgbd_sync approach and old data_throttle approach. With rtabmap_ros/data_throttle approach, images can be compressed using image_transport plugins (theora, h264, ...), which could reduce the bandwidth usage. Note that on some computers depending the ROS version, the image transport plugin called compressedDepth for depth images can use a lot of processing power, and thus may decrease the frame rate if the computer cannot keep up. The depth compression approach used in rgbd_sync (using cv::imencode()) seems less computationally expensive, thus affecting less the frame rate in this case.

3. Launch the file:

Remote Client Computer

On the client computer, we will launch rtabmap, rgbd_odometry and rtabmapviz using rtabmap.launch for convenience. For efficiency and to not subscribe to same topics multiple time on the robot, rtabmap.launch will use relays and rgbd_relay to subscribe just once to incoming topics from the robot and relay the messages to multiples nodes on the client side.

1. [Optional]: To avoid host name resolution issues, set ROS_IP environment variable for the client:

2. Set ROS_MASTER_URI with the robot IP/hostname:

3. Launch rtabmap.launch (Warning with rtabmap_ros 0.10 binaries: Please use the updated launch file on master branch linked here instead of the one installed with the rtabmap_ros 0.10 binaries):

If you launched freenect_throttle.launch with rgbd_sync:=false, do this instead:

4. You should now see mapping in rtabmapviz window.

5. If you open the System Monitor of Ubuntu, you should have something like ~950 KiB/s of bandwidth used: Network usage rgbd_sync

For the data_throttle approach (rgbd_sync:=false), you would get something like ~500 KiB/s instead: Network usage data_throttle

Advanced

1. If you have already odometry on the robot, you can set arguments visual_odometry:=false and odom_topic:="/odom".

2. You can use launch rviz manually or with argument rviz:=true for convenience. If you don't want rtabmapviz, you can disable it using rtabmapviz:=false argument.

Extras

Zed RGB-D example

zed_rgbd_throttle.launch:

Same rtabmap.launch line above with rgbd_image should work on the remote computer. Here we get ~2 MB/s (rgbd_sync:=true) because the depth images are 32 bits instead of 16 bits like in the previous freenect example even if the size of images is relatively the same (Zed in VGA mode has image size of 672x376 vs Kinect with 640x480). Network usage zed rgbd_sync

For data_throttle approach (rgbd_sync:=false), the bandwidth usage is quite lower with ~600 KiB/s. Make also sure you launch rtabmap.launch with approx_sync:=false for the zed example. Network usage zed data_throttle

Zed Stereo example

Example for a stereo camera. zed_stereo_throttle.launch:

Launch rtabmap.launch on the remote computer for stereo:

1. With roslaunch zed_stereo_throttle.launch stereo_sync:=true

2. With roslaunch zed_stereo_throttle.launch stereo_sync:=false

With stereo_sync approach, we get 400 KiB/s as with stereo_throttle approach we get 250 KiB/s. In comparison for the previous Zed RGB-D example, we had 2MB/s and 600 KiB/s respectively, so we save more bandwidth when depth images are not used.

Network usage zed stereo_sync

Network usage zed stereo_throttle


2019-07-13 13:09