[Documentation] [TitleIndex] [WordIndex

rtabmap: rtabmap | rtabmap_ros

  Show EOL distros: 

Package Summary

RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.

Package Summary

RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.

Overview

This package is a ROS wrapper of RTAB-Map (Real-Time Appearance-Based Mapping), a RGB-D SLAM approach based on a global loop closure detector with real-time constraints. This package can be used to generate a 3D point clouds of the environment and/or to create a 2D occupancy grid map for navigation. The tutorials and demos show some examples of mapping with RTAB-Map.

Tutorials

  1. RGB-D Handheld Mapping

    This tutorial shows how to use rtabmap_ros out-of-the-box with a Kinect-like sensor in mapping mode or localization mode.

  2. Stereo Handheld Mapping

    This tutorial shows how to use rtabmap_ros out-of-the-box with a stereo camera in mapping mode or localization mode.

  3. Remote Mapping

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

  4. Stereo Outdoor Mapping

    This tutorial shows how to do stereo mapping with RTAB-Map.

  5. Stereo Outdoor Navigation

    This tutorial shows how to integrate autonomous navigation with RTAB-Map in context of outdoor stereo mapping.

  6. Setup RTAB-Map on Your Robot!

    This tutorial shows multiple RTAB-Map configurations that can be used on your robot.

  7. Mapping and Navigation with Turtlebot

    This tutorial shows how to use RTAB-Map with Turtlebot for mapping and navigation.

  8. Tango ROS Streamer

    Tutorial to get Tango ROS Streamer working with rtabmap_ros

  9. Advanced Parameter Tuning

    This tutorial tells you which parameter to change to improve performances

  10. Wifi Signal Strength Mapping (User Data Usage)

    This tutorial shows how to add user data during mapping that will be saved directly in RTAB-Map's database for convenience.

Demos

Robot mapping

For this demo, you will need the ROS bag demo_mapping.bag (295 MB, fixed camera TF 2016/06/28, fixed not normalized quaternions 2017/02/24).

Launch: demo_robot_mapping.launch

After mapping, you could try the localization mode:

Robot mapping with RVIZ

For this demo, you will need the ROS bag demo_mapping.bag (295 MB, fixed camera TF 2016/06/28, fixed not normalized quaternions 2017/02/24).

Launch: demo_robot_mapping.launch

Multi-session mapping

Detailed results are shown on the Multi-session page on RTAB-Map's wiki.

For this demo, you will need the ROS bags of five mapping sessions:

For the first launch, you can do "Edit->Delete memory" to make sure that you start from a clean memory. You may need to do this after starting the first bag with "--pause" so that rtabmap node is initialized to avoid a "service /reset cannot be called" error.

Launch: demo_multi-session_mapping.launch

Robot mapping with Find-Object

Find-Object's ros-pkg find_object_2d should be installed.

ROS Bag: demo_find_object.bag (416 MB)

Launch: demo_find_object.launch

IROS 2014 Kinect Challenge

There is no bag recorded for this demo but how to reproduce this setup is described on the page IROS 2014 Kinect Challenge of the RTAB-Map's wiki.

Stereo mapping

Visit the tutorial StereoOutdoorMapping for detailed information. It is also shown how to create 2D occupancy grid map for navigation.

ROS bags:

Launch : demo_stereo_outdoor.launch

Stereo navigation

There is no bag recorded for this demo but how to reproduce this setup is described in the tutorial StereoOutdoorNavigation.

Appearance-based loop closure detection-only

Data:

Launch: demo_appearance_mapping.launch

The GUI shows a plenty of information about the loop closures detected. If you only need the ID of the matched past image of a loop closure, you can do that:

A "0" means no loop closure detected. This can be also used in localization mode:

For more videos and information about the loop closure detection approach used in RTAB-Map, visit RTAB-Map on IntRoLab.

Nodes

All sensor_msgs/Image topics use image_transport.

rtabmap

This is the main node of this package. It is a wrapper of the RTAB-Map Core library. This is where the graph of the map is incrementally built and optimized when a loop closure is detected. The online output of the node is the local graph with the latest added data to the map. The default location of the RTAB-Map database is "~/.ros/rtabmap.db" and the workspace is also set to "~/.ros". To get a 3D point cloud or a 2D occupancy grid of the environment, subscribe to cloud_map, grid_map or proj_map topics.

Arguments

Subscribed Topics

odom (nav_msgs/Odometry) rgb/image (sensor_msgs/Image) rgb/camera_info (sensor_msgs/CameraInfo) depth/image (sensor_msgs/Image) scan (sensor_msgs/LaserScan) scan_cloud (sensor_msgs/PointCloud2) left/image_rect (sensor_msgs/Image) left/camera_info (sensor_msgs/CameraInfo) right/image_rect (sensor_msgs/Image) right/camera_info (sensor_msgs/CameraInfo) goal (geometry_msgs/PoseStamped) rgbd_image (rtabmap_ros/RGBDImage)

Published Topics

info (rtabmap_ros/Info) mapData (rtabmap_ros/MapData) mapGraph (rtabmap_ros/MapGraph) grid_map (nav_msgs/OccupancyGrid) proj_map (nav_msgs/OccupancyGrid) cloud_map (sensor_msgs/PointCloud2) scan_map (sensor_msgs/PointCloud2) labels (visualization_msgs/MarkerArray) global_path (nav_msgs/Path) local_path (nav_msgs/Path) goal_reached (std_msgs/Bool) goal_out (geometry_msgs/PoseStamped) octomap_full (octomap_msgs/Octomap) octomap_binary (octomap_msgs/Octomap) octomap_occupied_space (sensor_msgs/PointCloud2) octomap_obstacles (sensor_msgs/PointCloud2) octomap_ground (sensor_msgs/PointCloud2) octomap_empty_space (sensor_msgs/PointCloud2) octomap_grid (nav_msgs/OccupancyGrid)

Services

get_map (rtabmap_ros/GetMap) get_grid_map (nav_msgs/GetMap) get_proj_map (nav_msgs/GetMap) publish_map (rtabmap_ros/PublishMap) list_labels (rtabmap_ros/ListLabels) update_parameters (std_srvs/Empty) reset (std_srvs/Empty) pause (std_srvs/Empty) resume (std_srvs/Empty) trigger_new_map (std_srvs/Empty) backup (std_srvs/Empty) set_mode_localization (std_srvs/Empty) set_mode_mapping (std_srvs/Empty) set_label (rtabmap_ros/SetLabel) set_goal (rtabmap_ros/SetGoal) octomap_full (octomap_msgs/GetOctomap) octomap_binary (octomap_msgs/GetOctomap)

Parameters

~subscribe_depth (bool, default: "true") ~subscribe_scan (bool, default: "false") ~subscribe_scan_cloud (bool, default: "false") ~subscribe_stereo (bool, default: "false") ~subscribe_rgbd (bool, default: "false") ~frame_id (string, default: "base_link") ~map_frame_id (string, default: "map") ~odom_frame_id (string, default: "") ~queue_size (int, default: 10) ~publish_tf (bool, default: "true") ~tf_delay (double, default: 0.05) ~tf_prefix (string, default: "") ~wait_for_transform (bool, default: "true") ~wait_for_transform_duration (double, default: 0.1) ~config_path (string, default: "") ~database_path (string, default: "~/.ros/rtabmap.db") ~gen_scan (bool, default: "false") ~gen_scan_max_depth (double, default: 4.0) ~approx_sync (bool, default: "false") ~rgbd_cameras (int, default: 1) ~use_action_for_goal (bool, default: "false") ~map_filter_radius (double, default: 0.5) ~map_filter_angle (double, default: 30.0) ~map_cleanup (bool, default: "true") ~latch (bool, default: "true") ~cloud_decimation (int, default: 4) ~cloud_max_depth (double, default: 4.0) ~cloud_voxel_size (double, default: 0.05) ~cloud_floor_culling_height (double, default: 0.0) ~cloud_output_voxelized (bool, default: "false") ~cloud_frustum_culling (bool, default: "false") ~cloud_noise_filtering_radius (double, default: 0) ~cloud_noise_filtering_min_neighbors (double, default: 5) ~scan_voxel_size (double, default: 0.05) ~scan_output_voxelized (bool, default: "false") ~grid_cell_size (double, default: 0.05) ~grid_size (double, default: 0) ~grid_eroded (bool, default: "false") ~grid_unknown_space_filled (bool, default: "false") ~proj_max_ground_angle (double, default: 45) ~proj_min_cluster_size (int, default: 20) ~proj_max_height (double, default: 2.0)

Required tf Transforms

base_link<the frame attached to sensors of incoming data> odombase_link

Provided tf Transforms

mapodom

rtabmapviz

This node starts the visualization interface of RTAB-Map. It is a wrapper of the RTAB-Map GUI library. It has the same purpose as rviz but with specific options for RTAB-Map.

RGB-D Mapping

Arguments

Subscribed Topics

odom (nav_msgs/Odometry) rgb/image (sensor_msgs/Image) rgb/camera_info (sensor_msgs/CameraInfo) depth/image (sensor_msgs/Image) scan (sensor_msgs/LaserScan) scan_cloud (sensor_msgs/PointCloud2) left/image_rect (sensor_msgs/Image) left/camera_info (sensor_msgs/CameraInfo) right/image_rect (sensor_msgs/Image) right/camera_info (sensor_msgs/CameraInfo) odom_info (rtabmap_ros/OdomInfo) info (rtabmap_ros/Info) mapData (rtabmap_ros/MapData) rgbd_image (rtabmap_ros/RGBDImage)

Parameters

~subscribe_depth (bool, default: "false") ~subscribe_scan (bool, default: "false") ~subscribe_scan_cloud (bool, default: "false") ~subscribe_stereo (bool, default: "false") ~subscribe_odom_info (bool, default: "false") ~subscribe_rgbd (bool, default: "false") ~frame_id (string, default: "base_link") ~odom_frame_id (string, default: "") ~tf_prefix (string, default: "") ~wait_for_transform (bool, default: "false") ~queue_size (int, default: 10) ~rgbd_cameras (int, default: 1)

Required tf Transforms

base_link<the frame attached to sensors of incoming data> odombase_link mapodom

Visual and Lidar Odometry

Common odometry stuff for rgbd_odometry, stereo_odometry and icp_odometry nodes. These nodes wrap the various odometry approaches of RTAB-Map. When a transformation cannot be computed, a null transformation is sent to notify the receiver that odometry is not updated or lost.

Arguments

Published Topics

odom (nav_msgs/Odometry) odom_info (rtabmap_ros/OdomInfo) odom_last_frame (sensor_msgs/PointCloud2) odom_local_map (sensor_msgs/PointCloud2)

Services

reset_odom (std_srvs/Empty) reset_odom_to_pose (rtabmap_ros/ResetPose) pause_odom (std_srvs/Empty) resume_odom (std_srvs/Empty)

Parameters

~frame_id (string, default: "base_link") ~odom_frame_id (string, default: "odom") ~publish_tf (bool, default: "true") ~tf_prefix (bool, default: "") ~wait_for_transform (bool, default: "false") ~initial_pose (string, default: "") ~queue_size (int, default: 10) ~publish_null_when_lost (bool, default: true) ~ground_truth_frame_id (string, default: "") ~ground_truth_base_frame_id (string, default: "") ~guess_frame_id (string, default: "") ~guess_min_translation (float, default: 0.0 m) ~guess_min_rotation (float, default: 0.0 rad) ~config_path (string, default: "")

Required tf Transforms

base_link<the frame attached to sensors of incoming data>

Provided tf Transforms

odombase_link

rgbd_odometry

This node wraps the RGBD odometry approach of RTAB-Map. Using RGBD images, odometry is computed using visual features extracted from the RGB images with their depth information from the depth images. Using the feature correspondences between the images, a RANSAC approach computes the transformation between the consecutive images.

See also Visual Odometry for common odometry stuff used by this node.

Subscribed Topics

rgb/image (sensor_msgs/Image) rgb/camera_info (sensor_msgs/CameraInfo) depth/image (sensor_msgs/Image) rgbd_image (rtabmap_ros/RGBDImage)

Parameters

~approx_sync (bool, default: "true") ~rgbd_cameras (int, default: 1) ~subscribe_rgbd (bool, default: "false")

stereo_odometry

This node wraps the stereo odometry approach of RTAB-Map. Using stereo images, odometry is computed using visual features extracted from the left images with their depth information computed by finding the same features on the right images. Using the feature correspondences, a RANSAC approach computes the transformation between the consecutive left images.

See also Visual Odometry for common odometry stuff used by this node.

Subscribed Topics

left/image_rect (sensor_msgs/Image) left/camera_info (sensor_msgs/CameraInfo) right/image_rect (sensor_msgs/Image) right/camera_info (sensor_msgs/CameraInfo) rgbd_image (rtabmap_ros/RGBDImage)

Parameters

~approx_sync (bool, default: "false") ~subscribe_rgbd (bool, default: "false")

icp_odometry

This node wraps the icp odometry approach of RTAB-Map. Using laser scan or a point cloud, odometry is computed by Iterative Closest Point (ICP) registration.

See also Visual Odometry for common odometry stuff used by this node.

Subscribed Topics

scan (sensor_msgs/LaserScan) scan_cloud (sensor_msgs/PointCloud2)

Parameters

~scan_cloud_max_points (int, default: 0) ~scan_downsampling_step (int, default: 1) ~scan_voxel_size (float, default: 0.0 m) ~scan_normal_k (int, default: 0) ~scan_normal_radius (float, default: 0.0)

camera

A node for image acquisition from an USB camera (OpenCV is used). A special option for this node is that it can be configured to read images from a directory or a video file. Parameters can be changed with the dynamic_reconfigure GUI from ROS. For dynamic parameters, see Camera.cfg

Published Topics

image (sensor_msgs/Image)

Services

stop_camera (std_srvs/Empty) start_camera (rtabmap_ros/ResetPose)

Parameters

~frame_id (string, default: "camera")

map_assembler

Note: It is recommend to use directly cloud_map or proj_map published topics from rtabmap node instead of using this node.

This node subscribes to rtabmap output topic "mapData" and assembles the 3D map incrementally, then publishes the same maps than rtabmap. See all Mapping related topics and parameters of rtabmap node.

Subscribed Topics

mapData (rtabmap_ros/MapData)

Services

~reset (std_srvs/Empty)

map_optimizer

This node is for advanced usage only as it is preferred to use graph optimization already inside rtabmap node (which is the default). See related parameters in rtabmap:

$rosrun rtabmap_ros rtabmap --params | grep Optimize

This node subscribes to rtabmap output topic "mapData" and optimize the graph, then republishes the optimized "mapData".

Subscribed Topics

mapData (rtabmap_ros/MapData)

Published Topics

[mapData]_optimized (rtabmap_ros/MapData) [mapData]Graph_optimized (rtabmap_ros/MapGraph)

Parameters

~map_frame_id (string, default: "map") ~odom_frame_id (string, default: "odom") ~strategy (int, default: 0) ~slam_2d (bool, default: "false") ~robust (bool, default: "true") ~global_optimization (bool, default: "true") ~iterations (int, default: 100) ~epsilon (double, default: 0.0) ~ignore_variance (bool, default: "false") ~optimize_from_last_node (bool, default: "false") ~publish_tf (bool, default: "true") ~tf_delay (double, default: 0.05)

Nodelets

rtabmap_ros/rgbd_sync

Synchronize RGB, depth and camera_info messages into a single message. You can then use subscribe_rgbd to make rtabmap or odometry nodes subscribing to this message instead. This is useful when, for example, rtabmap is subscribed also to a laser scan or odometry topic published at different rate than the image topics. We can then make sure that images are correctly synchronized together. If you have camera publishing on the network, this can be also a good format to synchronize images before sending them on the network, to avoid synchronization issues when the network is lagging.

Subscribed Topics

rgb/image (sensor_msgs/Image) depth/image (sensor_msgs/Image) rgb/camera_info (sensor_msgs/CameraInfo)

Published Topics

rgbd_image (rtabmap_ros/RGBDImage) rgbd_image/compressed (rtabmap_ros/RGBDImage)

Parameters

~queue_size (int, default: 10) ~approx_sync (bool, default: "True") ~compressed_rate (double, default: 0)

rtabmap_ros/stereo_sync

Synchronize left image, right image and camera_info messages into a single message. You can then use subscribe_rgbd to make rtabmap or odometry nodes subscribing to this message instead. This is useful when, for example, rtabmap is subscribed also to a laser scan or odometry topic published at different rate than the image topics. We can then make sure that images are correctly synchronized together. If you have camera publishing on the network, this can be also a good format to synchronize images before sending them on the network, to avoid synchronization issues when the network is lagging.

Subscribed Topics

left/image_rect (sensor_msgs/Image) right/image_rect (sensor_msgs/Image) left/camera_info (sensor_msgs/CameraInfo) right/camera_info (sensor_msgs/CameraInfo)

Published Topics

rgbd_image (rtabmap_ros/RGBDImage) rgbd_image/compressed (rtabmap_ros/RGBDImage)

Parameters

~queue_size (int, default: 10) ~approx_sync (bool, default: "False") ~compressed_rate (double, default: 0)

rtabmap_ros/rgbd_relay

A relay for rtabmap_ros/RGBDImage messages. It works like a topic_tools/relay, but can also compress or uncompress data for convenience.

Subscribed Topics

rgbd_image (rtabmap_ros/RGBDImage)

Published Topics

[rgbd_image]_relay (rtabmap_ros/RGBDImage)

Parameters

~queue_size (int, default: 10) ~compress (bool, default: "False") ~uncompress (bool, default: "False")

rtabmap_ros/data_odom_sync

Synchronize odometry with RGB-D images. Useful to correctly show clouds in RVIZ when odometry refresh rate is low comparatively to clouds to show.

Subscribed Topics

odom_in (nav_msgs/Odometry) rgb/image_in (sensor_msgs/Image) depth/image_in (sensor_msgs/Image) rgb/camera_info_in (sensor_msgs/CameraInfo)

Published Topics

odom_out (nav_msgs/Odometry) rgb/image_out (sensor_msgs/Image) depth/image_out (sensor_msgs/Image) rgb/camera_info_out (sensor_msgs/CameraInfo)

Parameters

~queue_size (int, default: 10)

rtabmap_ros/data_throttle

Throttle at a specified rate the OpenNI data. See also rtabmap_ros/rgbd_sync, which is now preferred when publishing remotely.

Subscribed Topics

rgb/image_in (sensor_msgs/Image) depth/image_in (sensor_msgs/Image) rgb/camera_info_in (sensor_msgs/CameraInfo)

Published Topics

rgb/image_out (sensor_msgs/Image) depth/image_out (sensor_msgs/Image) rgb/camera_info_out (sensor_msgs/CameraInfo)

Parameters

~queue_size (int, default: 10) ~rate (double, default: 0) ~approx_sync (bool, default: "True") ~decimation (double, default: 1)

rtabmap_ros/stereo_throttle

Throttle at a specified rate the stereo data.

Subscribed Topics

left/image_rect (sensor_msgs/Image) left/camera_info (sensor_msgs/CameraInfo) right/image_rect (sensor_msgs/Image) right/camera_info (sensor_msgs/CameraInfo)

Published Topics

[left/image_rect]_throttle (sensor_msgs/Image) [left/camera_info]_throttle (sensor_msgs/CameraInfo) [right/image_rect]_throttle (sensor_msgs/Image) [right/camera_info]_throttle (sensor_msgs/CameraInfo)

Parameters

~queue_size (int, default: 10) ~rate (double, default: 0) ~approx_sync (bool, default: "false") ~decimation (double, default: 1)

rtabmap_ros/point_cloud_xyzrgb

Construct a point cloud from RGB and depth images or stereo images. Optional decimation, depth, voxel and noise filtering can be applied.

Subscribed Topics

rgb/image (sensor_msgs/Image) depth/image (sensor_msgs/Image) rgb/camera_info (sensor_msgs/CameraInfo) left/image (sensor_msgs/Image) left/camera_info (sensor_msgs/CameraInfo) right/image (sensor_msgs/Image) right/camera_info (sensor_msgs/CameraInfo)

Published Topics

cloud (sensor_msgs/PointCloud2)

Parameters

~queue_size (int, default: 10) ~approx_sync (bool, default: "true") ~decimation (int, default: 1) ~voxel_size (double, default: 0.0) ~min_depth (double, default: 0.0) ~max_depth (double, default: 0.0) ~noise_filter_radius (double, default: 0.0) ~noise_filter_min_neighbors (int, default: 5)

rtabmap_ros/point_cloud_xyz

Construct a point cloud from a depth or disparity image. Optional decimation, depth, voxel and noise filtering can be applied.

Subscribed Topics

depth/image (sensor_msgs/Image) depth/camera_info (sensor_msgs/CameraInfo) disparity/image (stereo_msgs/DisparityImage) disparity/camera_info (sensor_msgs/CameraInfo)

Published Topics

cloud (sensor_msgs/PointCloud2)

Parameters

~queue_size (int, default: 10) ~approx_sync (bool, default: "true") ~decimation (int, default: 1) ~voxel_size (double, default: 0.0) ~min_depth (double, default: 0.0) ~max_depth (double, default: 0.0) ~noise_filter_radius (double, default: 0.0) ~noise_filter_min_neighbors (int, default: 5)

rtabmap_ros/disparity_to_depth

Convert a disparity image to a depth image.

Subscribed Topics

disparity (stereo_msgs/DisparityImage)

Published Topics

depth (sensor_msgs/Image) depth_raw (sensor_msgs/Image)

rtabmap_ros/pointcloud_to_depthimage

Reproject a point cloud into a camera frame to create a depth image. When fixed_frame_id is set (e.g., "odom"), movement is taken into account by transforming the point cloud accordingly to camera timestamp. An example of usage of this nodelet can be found in the Tango ROS Streamer tutorial.

Subscribed Topics

camera_info (stereo_msgs/CameraInfo) cloud (stereo_msgs/PointCloud2)

Published Topics

image (sensor_msgs/Image) image_raw (sensor_msgs/Image)

Parameters

~queue_size (int, default: 10) ~fixed_frame_id (string, default: "") ~approx (bool, default: "true") ~wait_for_transform (double, default: 0.1) ~decimation (int, default: 1) ~fill_holes_size (int, default: 0) ~fill_holes_error (double, default: 0.1) ~fill_iterations (int, default: 1)

rtabmap_ros/obstacles_detection

This nodelet extracts obstacles and the ground from a point cloud. The camera must see the ground to work reliably. Since the ground is not even, the ground is segmented by normal filtering: all points with normal in the +z direction (+- fixed angle) are labelled as ground, all the others are labelled as obstacles. The images below show an example.

obs1

obs2

obs0

obs4

Subscribed Topics

cloud (sensor_msgs/PointCloud2)

Published Topics

ground (sensor_msgs/PointCloud2) obstacles (sensor_msgs/PointCloud2)

Parameters

~frame_id (string, default: "base_link") ~queue_size (int, default: 10) ~normal_estimation_radius (double, default: 0.05) ~ground_normal_angle (double, default: PI/4) ~min_cluster_size (int, default: 20) ~max_obstacles_height (double, default: 0.0)

Required tf Transforms

base_link<the frame attached to sensors of incoming data>

RVIZ plugins

Map Cloud Display

MapCloudType.png

This rviz plugin subscribes to /mapData (rtabmap_ros/MapData) topic. A 3D map cloud will be created incrementally in RVIZ. When the graph is changed, all point clouds added in RVIZ will be transformed to new poses. It has the same properties as PointCloud display but with these new ones:

Properties

Name

Description

Valid Values

Default

Cloud decimation

How the input depth and RGB images are decimated before creating the point cloud

[1-16]

4

Cloud max depth (m)

Maximum depth of each point cloud added to map (0 means no maximum)

[0-9999]

4

Cloud voxel size (m)

Voxel size of the generated point clouds (0 means no voxel)

[0-1]

0.01

Filter floor (m)

Maximum height of the floor filtered (disabled=0).

[0-9999]

0

Node filtering radius (m)

Only keep one node in the specified radius (disabled=0).

[0-1]

0.2

Node filtering angle (degrees)

Only keep one node in the specified angle in the filtering radius (disabled=0).

[0-180]

30

Download Map

Download the map from rtabmap node. This may take a while if the map is big, be patient!

.

.

Download Graph

Download the graph from rtabmap node.

.

.

Map Graph Display

This rviz plugin subscribes to /mapGraph (rtabmap_ros/MapGraph) topic. It will show the RTAB-Map's graph with different colors depending on the links' type. It has the same properties as Path display.

Info Display

This rviz plugin subscribes to /info (rtabmap_ros/Info) topic. Information about loop closures detected are shown in the "Status".


2019-06-08 13:15