rtabmap_ros

rtabmap: rtabmap | rtabmap_ros

  Documentation Status

Package Summary

Released Continuous integration Documented

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 Hand-Held 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 Hand-Held 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

  • $ roslaunch rtabmap_ros demo_robot_mapping.launch
    $ rosbag play --clock demo_mapping.bag

After mapping, you could try the localization mode by replaying the bag with demo_robot_localization.launch:

  • $ roslaunch rtabmap_ros demo_robot_localization.launch
    $ rosbag play --clock demo_mapping.bag
  • Note that the GUI node doesn't download automatically the map when started. You will need to click "Edit->Download Map" on the GUI to download the map from the core node.

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

  • $ roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz:=false
    $ rosbag play --clock demo_mapping.bag

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.

Launch: demo_multi-session_mapping.launch

  • $ roslaunch rtabmap_ros demo_multi-session_mapping.launch
    $ rosbag play --clock map1.bag
    $ (...)
    $ rosbag play --clock map2.bag
    $ (...)
    $ rosbag play --clock map3.bag
    $ (...)
    $ rosbag play --clock map4.bag
    $ (...)
    $ rosbag play --clock map5.bag

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

  • $ roslaunch rtabmap_ros demo_find_object.launch
    $ rosbag play --clock demo_find_object.bag

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

  • $ roslaunch rtabmap_ros demo_stereo_outdoor.launch
    $ rosbag play --clock stereo_outdoorA.bag
    [...]
    $ rosbag play --clock stereo_outdoorB.bag

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:

  • samples.zip

    • Set video_or_images_path parameter of camera node in the launch file below accordingly.

Launch: demo_appearance_mapping.launch

  • $ roslaunch rtabmap_ros 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:

  • $ rostopic echo /rtabmap/info/loopClosureId
    6
    ---
    0
    ---
    7
    ---

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

  • $ roslaunch rtabmap_ros demo_appearance_mapping.launch localization:=true

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.

  • There are two set of parameters: ROS and RTAB-Map's parameters. The ROS parameters are for connection stuff to interface the RTAB-Map library with ROS. The RTAB-Map's parameters are those from the RTAB-Map library.
    • One way to know RTAB-Map's parameters is to look at this file : Parameters.h. There is a description for each parameter. Here an example (use string type for all RTAB-Map's parameters):

      • <launch>
        <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap">
           <param name="RGBD/OptimizeIterations" type="string" value="50"/>
        </node>
        </launch>
    • Another way to show available parameters from the terminal is to call the node with "--params" argument:
      • $ rosrun rtabmap_ros rtabmap --params
    • By default, rtabmap is in mapping mode. To set in localization mode with a previously created map, you should set the memory not incremental (make sure that arguments don't contain "--delete_db_on_start" too!):

      • <launch>
        <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" args="">
           <!-- LOCALIZATION MODE -->
           <param name="Mem/IncrementalMemory" type="string" value="false"/>
        </node>
        </launch>

Arguments
  • "--delete_db_on_start" or "-d": Delete the database before starting, otherwise the previous mapping session is loaded.

  • "--udebug": Show RTAB-Map's debug/info/warning/error logs.

  • "--uinfo": Show RTAB-Map's info/warning/error logs.

  • "--params": Show RTAB-Map's parameters related to this node and exit.

Subscribed Topics
odom ( nav_msgs/Odometry)
  • Odometry stream. Required if parameters subscribe_depth or subscribe_stereo are true and odom_frame_id is not set.
rgb/image ( sensor_msgs/Image)
  • RGB/Mono image. Should be rectified when subscribe_depth is true. Not required if parameter subscribe_stereo is true (use left/image_rect instead).
rgb/camera_info ( sensor_msgs/CameraInfo)
  • RGB camera metadata. Not required if parameter subscribe_stereo is true (use left/camera_info instead).
depth/image ( sensor_msgs/Image)
  • Registered depth image. Required if parameter subscribe_depth is true.
scan ( sensor_msgs/LaserScan)
  • Laser scan stream. Required if parameter subscribe_scan is true.
scan_cloud ( sensor_msgs/PointCloud2)
  • Laser scan point cloud stream. Required if parameter subscribe_scan_cloud is true.
left/image_rect ( sensor_msgs/Image)
  • Left RGB/Mono rectified image. Required if parameter subscribe_stereo is true.
left/camera_info ( sensor_msgs/CameraInfo)
  • Left camera metadata. Required if parameter subscribe_stereo is true.
right/image_rect ( sensor_msgs/Image)
  • Right Mono rectified image. Required if parameter subscribe_stereo is true.
right/camera_info ( sensor_msgs/CameraInfo)
  • Right camera metadata. Required if parameter subscribe_stereo is true.
goal ( geometry_msgs/PoseStamped)
  • Planning Plan a path to reach this goal using the current online map. The goal should be close enough to the map's graph to be accepted (see RTAB-Map's parameter RGBD/LocalRadius). Note that only nodes in Working Memory are used, for exploration it may be ok, but it would be better to use service set_goal if you are coming back in a previously mapped area. See Planning published topics for corresponding generated outputs.
Published Topics
info ( rtabmap_ros/Info)
  • RTAB-Map's info.
mapData ( rtabmap_ros/MapData)
  • RTAB-Map's graph and latest node data.
mapGraph ( rtabmap_ros/MapGraph)
  • RTAB-Map's graph only.
grid_map ( nav_msgs/OccupancyGrid)
  • Mapping Occupancy grid generated with laser scans. Use parameters with prefixes map_ and grid_ below.
proj_map ( nav_msgs/OccupancyGrid)
  • Mapping Occupancy grid generated from projection of the 3D point clouds on the ground. Use parameters with prefixes map_, grid_ and proj_ below.
cloud_map ( sensor_msgs/PointCloud2)
  • Mapping 3D point cloud generated with the 3D point clouds. Use parameters with prefixes map_ and cloud_ below.
scan_map ( sensor_msgs/PointCloud2)
  • Mapping 3D point cloud generated with the 2D scans or 3D scans. Use parameters with prefixes map_ and scan_ below.
labels ( visualization_msgs/MarkerArray)
  • Convenient way to show graph's labels in RVIZ.
global_path ( nav_msgs/Path)
  • Planning Poses of the planned global path. Published only once for each path planned.
local_path ( nav_msgs/Path)
  • Planning Upcoming local poses corresponding to those of the global path. Published on every map update.
goal_reached ( std_msgs/Bool)
  • Planning Status message if the goal is successfully reached or not.
goal_out ( geometry_msgs/PoseStamped)
  • Planning Current metric goal sent from the rtabmap's topological planner. For example, this can be connected to move_base_simple/goal topic of move_base.
Services
get_map ( rtabmap_ros/GetMap)
  • Call this service to get the map data
get_grid_map ( nav_msgs/GetMap)
  • Call this service to get the occupancy grid built from laser scans
get_proj_map ( nav_msgs/GetMap)
  • Call this service to get the occupancy grid built from the projection of the 3D point clouds
publish_map ( rtabmap_ros/PublishMap)
  • Call this service to publish the map data
list_labels ( rtabmap_ros/ListLabels)
  • Get current labels of the graph.
update_parameters ( std_srvs/Empty)
  • The node will update with current parameters of the rosparam server
reset ( std_srvs/Empty)
  • Delete the map
pause ( std_srvs/Empty)
  • Pause mapping
resume ( std_srvs/Empty)
  • Resume mapping
trigger_new_map ( std_srvs/Empty)
  • The node will begin a new map
backup ( std_srvs/Empty)
  • Backup the database to "database_path.back" (default ~/.ros/rtabmap.db.back)
set_mode_localization ( std_srvs/Empty)
  • Set localization mode
set_mode_mapping ( std_srvs/Empty)
  • Set mapping mode
set_label ( rtabmap_ros/SetLabel)
  • Set a label to latest node or a specified node.
set_goal ( rtabmap_ros/SetGoal)
  • Planning Set a topological goal (a node id or a node label in the graph). Plan a path to reach this goal using the whole map contained in memory (including nodes in Long-Term Memory). See Planning published topics for corresponding generated outputs.
octomap_full ( octomap_msgs/GetOctomap)
  • Get an octomap. Available only if rtabmap_ros is built with octomap.
octomap_binary ( octomap_msgs/GetOctomap)
  • Get an octomap. Available only if rtabmap_ros is built with octomap.
Parameters
~subscribe_depth ( bool, default: "true")
  • Subscribe to depth image
~subscribe_scan ( bool, default: "false")
  • Subscribe to laser scan
~subscribe_scan_cloud ( bool, default: "false")
  • Subscribe to laser scan point cloud
~subscribe_stereo ( bool, default: "false")
  • Subscribe to stereo images
~frame_id ( string, default: "base_link")
  • The frame attached to the mobile base.
~map_frame_id ( string, default: "map")
  • The frame attached to the map.
~odom_frame_id ( string, default: "")
  • The frame attached to odometry. If empty, rtabmap will subscribe to odom topic to get odometry. If set, odometry is got from tf (in this case, a covariance of 1 is used).
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~publish_tf ( bool, default: "true")
  • Publish TF from /map to /odom.
~tf_delay ( double, default: 0.05)
  • Rate at which the TF from /map to /odom is published (20 Hz).
~tf_prefix ( string, default: "")
  • Prefix to add to generated tf.
~wait_for_transform ( bool, default: "true")
  • Wait (maximum wait_for_transform_duration sec) for transform when a tf transform is not still available.
~wait_for_transform_duration ( double, default: 0.1)
  • Wait duration for wait_for_transform.
~config_path ( string, default: "")
  • Path of a config files containing RTAB-Map's parameters. Parameters set in the launch file overwrite those in the config file.
~database_path ( string, default: "~/.ros/rtabmap.db")
  • Path of the RTAB-Map's database.
~gen_scan ( bool, default: "false")
  • Generate laser scans from depth images (using the middle horizontal line of the depth image). Not generated if subscribe_scan or subscribe_scan_cloud are true.
~gen_scan_max_depth ( double, default: 4.0)
  • Maximum depth of the laser scans generated.
~approx_sync ( bool, default: "false")
  • Use approximate time synchronization of input messages. If false, note that the odometry input must have also exactly the same timestamps than the input images.
~depth_cameras ( int, default: 1)
  • Number of RGB-D cameras to use. Well for now, a maximum of 2 cameras can be synchronized at the same time. If > 1, the rgb, depth and camera_info topics should contain the camera index starting with 0. For example, if we have 2 cameras, you should set rgb0/image, rgb0/camera_info, depth0/image, rgb1/image, rgb1/camera_info and depth1/image topics. subscribe_depth should be true as well.
~use_action_for_goal ( bool, default: "false")
  • Planning Use actionlib to send the metric goals to move_base. The advantage over just connecting goal_out to move_base_simple/goal is that rtabmap can have a feedback if the goal is reached or if move_base has failed. See move_base Action API for more info.
~map_filter_radius ( double, default: 0.5)
  • Mapping Filter nodes before creating the maps. Only load data for one node in the filter radius (the latest data is used) up to filter angle (map_filter_angle). Set to 0.0 to disable node filtering. Used for all published maps.
~map_filter_angle ( double, default: 30.0)
  • Mapping Angle used when filtering nodes before creating the maps. See also map_filter_radius. Used for all published maps.
~map_cleanup ( bool, default: "true")
  • Mapping If there is no subscription to any map cloud_map, grid_map or proj_map, clear the corresponding data.
~latch ( bool, default: "true")
  • Mapping If true, the last message published on the map topics will be saved and sent to new subscribers when they connect.
~cloud_decimation ( int, default: 4)
  • Mapping Image decimation before creating clouds added to cloud map. Set 1 to disable decimation. Used for cloud_map published topic.
~cloud_max_depth ( double, default: 4.0)
  • Mapping Maximum depth of the clouds added to cloud map. Set 0.0 to maximum depth filtering. Used for cloud_map published topic.
~cloud_voxel_size ( double, default: 0.05)
  • Mapping Voxel size used to filter each cloud added to cloud map. Set 0.0 to disable voxel filtering. Used for cloud_map published topic.
~ cloud_floor_culling_height ( double, default: 0.0)
  • Mapping Filter the floor at the specified height (m). Used for cloud_map published topic.
~cloud_output_voxelized ( bool, default: "false")
  • Mapping Do a final voxel filtering after all clouds are assembled. Used for cloud_map published topic.
~cloud_frustum_culling ( bool, default: "false")
  • Mapping Filter the point cloud in the frustum defined by the last camera pose. Used for cloud_map published topic.
~cloud_noise_filtering_radius ( double, default: 0)
  • Mapping Filter points that have less neighbors than cloud_noise_filtering_min_neighbors in the radius cloud_noise_filtering_radius (0=disabled). Used for cloud_map published topic.
~cloud_noise_filtering_min_neighbors ( double, default: 5)
  • Mapping Filter points that have less neighbors than cloud_noise_filtering_min_neighbors in the radius cloud_noise_filtering_radius (0=disabled). Used for cloud_map published topic.
~scan_voxel_size ( double, default: 0.05)
  • Mapping Voxel size used to filter each scan added to scan map. Set 0.0 to disable voxel filtering. Used for scan_map published topic.
~scan_output_voxelized ( bool, default: "false")
  • Mapping Do a final voxel filtering after all scans are assembled. Used for scan_map published topic.
~grid_cell_size ( double, default: 0.05)
  • Mapping Grid cell size (m). Used for grid_map and proj_map published topics.
~grid_size ( double, default: 0)
  • Mapping Initial size of the map (m). If 0, the map will grow as new data are added. If set, the map will still grow when the initial size is reached. Used for grid_map and proj_map published topics.
~grid_eroded ( bool, default: "false")
  • Mapping Filter obstacle cells surrounded by empty space. Used for grid_map and proj_map published topics.
~grid_unknown_space_filled ( bool, default: "false")
  • Mapping Fill empty space. Used for grid_map published topic.
~proj_max_ground_angle ( double, default: 45)
  • Mapping Maximum angle (degrees) between point's normal to ground's normal to label it as ground. Points with higher angle difference are considered as obstacles. Used for proj_map published topic.
~proj_min_cluster_size ( int, default: 20)
  • Mapping Minimum cluster size to project the points. The distance between clusters is defined by 2*grid_cell_size. Used for proj_map published topic.
~proj_max_height ( double, default: 2.0)
  • Mapping Maximum height of points used for projection. Used for proj_map published topic.
Required tf Transforms
base_link<the frame attached to sensors of incoming data> odombase_link
  • usually provided by the odometry system (e.g., the driver for the mobile base).
Provided tf Transforms
mapodom
  • the current odometry correction.

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
  • -d "config.ini": Set a RTAB-Map ini file for GUI interface parameters. Default is "/.ros/rtabmapGUI.ini".

Subscribed Topics
odom ( nav_msgs/Odometry)
  • Odometry stream. Required if parameters subscribe_depth or subscribe_stereo are true and odom_frame_id is not set.
rgb/image ( sensor_msgs/Image)
  • RGB/Mono image. Should be rectified when subscribe_depth is true. Not required if parameter subscribe_stereo is true (use left/image_rect instead).
rgb/camera_info ( sensor_msgs/CameraInfo)
  • RGB camera metadata. Not required if parameter subscribe_stereo is true (use left/camera_info instead).
depth/image ( sensor_msgs/Image)
  • Registered depth image. Required if parameter subscribe_depth is true.
scan ( sensor_msgs/LaserScan)
  • Laser scan stream. Required if parameter subscribe_scan is true.
scan_cloud ( sensor_msgs/PointCloud2)
  • Laser scan stream. Required if parameter subscribe_scan_cloud is true.
left/image_rect ( sensor_msgs/Image)
  • Left RGB/Mono rectified image. Required if parameter subscribe_stereo is true.
left/camera_info ( sensor_msgs/CameraInfo)
  • Left camera metadata. Required if parameter subscribe_stereo is true.
right/image_rect ( sensor_msgs/Image)
  • Right Mono rectified image. Required if parameter subscribe_stereo is true.
right/camera_info ( sensor_msgs/CameraInfo)
  • Right camera metadata. Required if parameter subscribe_stereo is true.
odom_info ( rtabmap_ros/OdomInfo)
  • Odometry info. Required if parameter subscribe_odom_info is true.
info ( rtabmap_ros/Info)
  • RTAB-Map's statistics info.
mapData ( rtabmap_ros/MapData)
  • RTAB-Map's graph and latest node data.
Parameters
~subscribe_depth ( bool, default: "false")
  • Subscribe to depth image
~subscribe_scan ( bool, default: "false")
  • Subscribe to laser scan
~subscribe_scan_cloud ( bool, default: "false")
  • Subscribe to laser scan point cloud
~subscribe_stereo ( bool, default: "false")
  • Subscribe to stereo images
~subscribe_odom_info ( bool, default: "false")
  • Subscribe to odometry info messages
~frame_id ( string, default: "base_link")
  • The frame attached to the mobile base.
~odom_frame_id ( string, default: "")
  • The frame attached to odometry. If empty, rtabmapviz will subscribe to odom topic to get odometry. If set, odometry is got from tf.
~tf_prefix ( string, default: "")
  • Prefix to add to generated tf.
~wait_for_transform ( bool, default: "false")
  • Wait (maximum 1 sec) for transform when a tf transform is not still available.
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~depth_cameras ( int, default: 1)
  • Number of RGB-D cameras to use. Well for now, a maximum of 2 cameras can be synchronized at the same time. If > 1, the rgb, depth and camera_info topics should contain the camera index starting with 0. For example, if we have 2 cameras, you should set rgb0/image, rgb0/camera_info, depth0/image, rgb1/image, rgb1/camera_info and depth1/image topics. subscribe_depth should be true as well.
Required tf Transforms
base_link<the frame attached to sensors of incoming data> odombase_link
  • usually provided by the odometry system (e.g., the driver for the mobile base).
mapodom
  • the current odometry correction.

Visual Odometry

Common odometry stuff for rgbd_odometry and stereo_odometry nodes. These nodes wrap the odometry approach of RTAB-Map. The approach is visual based so enough visual features must be present in images to compute the odometry. When a transformation cannot be computed, a null transformation is sent to notify the receiver that odometry is not updated or lost.

  • There are two set of parameters: ROS and RTAB-Map's parameters. The ROS parameters are for connection stuff to interface the RTAB-Map library with ROS. The RTAB-Map's parameters are those from the RTAB-Map library.
    • Parameters available for odometry can be shown from the terminal by using the "--params" argument:
      • $ rosrun rtabmap_ros rgbd_odometry --params
        or
        $ rosrun rtabmap_ros stereo_odometry --params

Arguments
  • "--params": Show RTAB-Map's parameters related to this node and exit.

Published Topics
odom ( nav_msgs/Odometry)
  • Odometry stream. Send null odometry if cannot be computed.
odom_info ( rtabmap_ros/OdomInfo)
  • Odometry info stream. RTAB-Map's parameter Odom/FillInfoData should be true to fill features information (default is true).
odom_last_frame ( sensor_msgs/PointCloud2)
  • 3D features of the last frame used to estimate the transformation.
odom_local_map ( sensor_msgs/PointCloud2)
  • Local map of 3D features used as reference to estimate the transformation. Only published if RTAB-Map's parameter Odom/Strategy=0.
Services
reset_odom ( std_srvs/Empty)
  • Restart odometry to identity transformation.
reset_odom_to_pose ( rtabmap_ros/ResetPose)
  • Restart odometry to specified transformation. Format: "x y z roll pitch yaw".
pause_odom ( std_srvs/Empty)
  • Pause odometry.
resume_odom ( std_srvs/Empty)
  • Resume odometry.
Parameters
~frame_id ( string, default: "base_link")
  • The frame attached to the mobile base.
~odom_frame_id ( string, default: "odom")
  • The odometry frame.
~publish_tf ( bool, default: "true")
  • Publish TF from /odom to /base_link.
~tf_prefix ( bool, default: "")
  • Prefix to add to generated tf.
~wait_for_transform ( bool, default: "false")
  • Wait (maximum 1 sec) for transform when a tf transform is not still available.
~initial_pose ( string, default: "")
  • The initial pose of the odometry. Format: "x y z roll pitch yaw".
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
Required tf Transforms
base_link<the frame attached to sensors of incoming data>
Provided tf Transforms
odombase_link
  • the current estimate of the robot's pose within the odometry frame.

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/Mono rectified image.
rgb/camera_info ( sensor_msgs/CameraInfo)
  • RGB camera metadata.
depth/image ( sensor_msgs/Image)
  • Registered depth image.
Parameters
~depth_cameras ( int, default: 1)
  • Number of RGB-D cameras to use. Well for now, only a maximum of 2 cameras can be synchronized at the same time. If > 1, the rgb, depth and camera_info topics should contain the camera index starting with 0. For example, with 2 cameras, you should set rgb0/image, rgb0/camera_info, depth0/image, rgb1/image, rgb1/camera_info and depth1/image topics.

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 RGB/Mono rectified image.
left/camera_info ( sensor_msgs/CameraInfo)
  • Left camera metadata.
right/image_rect ( sensor_msgs/Image)
  • Right Mono rectified image.
right/camera_info ( sensor_msgs/CameraInfo)
  • Right camera metadata.
Parameters
~approx_sync ( bool, default: "false")
  • Use approximate time synchronization of stereo messages. If false, the left/right images and the left/right camera infos must have the same timestamps.

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)
  • Image stream.
Services
stop_camera ( std_srvs/Empty)
  • Stop the camera.
start_camera ( rtabmap_ros/ResetPose)
  • Start the camera.
Parameters
~frame_id ( string, default: "camera")
  • The frame attached to the 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)
  • RTAB-Map's graph and latest node data.
Services
~reset ( std_srvs/Empty)
  • Reset the cache.

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".

  • This node can be used to optimize the graph outside rtabmap node. The benefice to do that is that we can keep optimized the global map instead of the local map of rtabmap. You can then connect output mapData_optimized to map_assembler to get the optimized grid, proj and cloud maps assembled again. Note that processing time for map optimization using this node is not bounded (which is the case in rtabmap node).

  • You could also use your own graph optimization approach instead of this node by modifying poses values of the rtabmap_ros/MapData msg. However, implementing your graph optimization approach inside rtabmap is preferred (inherit Optimizer class and add it here with a new number, then you could select it after using the parameter RGBD/OptimizeStrategy).

  • When using graph optimization outside rtabmap node, you should set parameters RGBD/OptimizeIterations to 0, RGBD/OptimizeMaxError to 0 and publish_tf to false for rtabmap node.

  • This node should not be used if rtabmap node is in localization mode.

Subscribed Topics
mapData ( rtabmap_ros/MapData)
  • RTAB-Map's graph and latest node data.
Published Topics
[mapData]_optimized ( rtabmap_ros/MapData)
  • RTAB-Map's optimized graph and latest node data.
[mapData]Graph_optimized ( rtabmap_ros/MapGraph)
  • RTAB-Map's optimized graph.
Parameters
~map_frame_id ( string, default: "map")
  • The frame attached to the map.
~odom_frame_id ( string, default: "odom")
  • The frame attached to odometry.
~strategy ( int, default: 0)
  • Optimization approach used: 0=TORO, 1=g2o and 2=GTSAM.
~slam_2d ( bool, default: "false")
  • 3DoF (x,y,yaw) optimization instead of 6DoF (x,y,z,roll,pitch,yaw).
~robust ( bool, default: "true")
  • Activate Vertigo robust graph optimization when g2o or GTSAM strategy is used.
~global_optimization ( bool, default: "true")
  • Optimize the global map. If false, only the local map is optimized.
~iterations ( int, default: 100)
  • Map optimization iterations.
~epsilon ( double, default: 0.0)
  • Stop graph optimization when error is less than epsilon (0=ignore epsilon).
~ignore_variance ( bool, default: "false")
  • Ignore constraints' variance. If checked, identity information matrix is used for each constraint in TORO. Otherwise, an information matrix is generated from the variance saved in the links.
~optimize_from_last_node ( bool, default: "false")
  • Optimize from the last node. If false, the graph is optimized from the oldest node linked to the current map.
~publish_tf ( bool, default: "true")
  • Publish TF from /map to /odom.
~tf_delay ( double, default: 0.05)
  • Rate at which the TF from /map to /odom is published (20 Hz).

Nodelets

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)
  • Odometry stream.
rgb/image_in ( sensor_msgs/Image)
  • RGB image stream.
depth/image_in ( sensor_msgs/Image)
  • Registered depth image stream.
rgb/camera_info_in ( sensor_msgs/CameraInfo)
  • RGB camera metadata.
Published Topics
odom_out ( nav_msgs/Odometry)
  • Odometry stream.
rgb/image_out ( sensor_msgs/Image)
  • RGB image stream.
depth/image_out ( sensor_msgs/Image)
  • Registered depth image stream.
rgb/camera_info_out ( sensor_msgs/CameraInfo)
  • RGB camera metadata.
Parameters
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.

rtabmap_ros/data_throttle

Throttle at a specified rate the OpenNI data.
Subscribed Topics
rgb/image_in ( sensor_msgs/Image)
  • RGB image stream.
depth/image_in ( sensor_msgs/Image)
  • Registered depth image stream.
rgb/camera_info_in ( sensor_msgs/CameraInfo)
  • RGB camera metadata.
Published Topics
rgb/image_out ( sensor_msgs/Image)
  • RGB image stream.
depth/image_out ( sensor_msgs/Image)
  • Registered depth image stream.
rgb/camera_info_out ( sensor_msgs/CameraInfo)
  • RGB camera metadata.
Parameters
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~rate ( double, default: 0)
  • Maximum frame rate (Hz).
~approx_sync ( bool, default: "True")
  • Use approximate synchronization for the input topics. If false, the RGB and depth images and the camera info must have the same timestamp.
~decimation ( double, default: 1)
  • Optional decimation of the RGB and depth images (with corresponding modifications in camera_info_out).

rtabmap_ros/stereo_throttle

Throttle at a specified rate the stereo data.
Subscribed Topics
left/image_rect ( sensor_msgs/Image)
  • Left RGB/Mono rectified image.
left/camera_info ( sensor_msgs/CameraInfo)
  • Left camera metadata.
right/image_rect ( sensor_msgs/Image)
  • Right Mono rectified image.
right/camera_info ( sensor_msgs/CameraInfo)
  • Right camera metadata.
Published Topics
[left/image_rect]_throttle ( sensor_msgs/Image)
  • Left RGB/Mono rectified image.
[left/camera_info]_throttle ( sensor_msgs/CameraInfo)
  • Left camera metadata.
[right/image_rect]_throttle ( sensor_msgs/Image)
  • Right Mono rectified image.
[right/camera_info]_throttle ( sensor_msgs/CameraInfo)
  • Right camera metadata.
Parameters
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~rate ( double, default: 0)
  • Maximum frame rate (Hz).
~approx_sync ( bool, default: "false")
  • Use approximate time synchronization of stereo messages. If false, the left/right images and the left/right camera infos must have the same timestamp.
~decimation ( double, default: 1)
  • Optional decimation of the left and right images (with corresponding modifications in camera infos).

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)
  • RGB image stream.
depth/image ( sensor_msgs/Image)
  • Registered depth image stream.
rgb/camera_info ( sensor_msgs/CameraInfo)
  • RGB camera metadata.
left/image ( sensor_msgs/Image)
  • Left RGB/Mono rectified image.
left/camera_info ( sensor_msgs/CameraInfo)
  • Left camera metadata.
right/image ( sensor_msgs/Image)
  • Right Mono rectified image.
right/camera_info ( sensor_msgs/CameraInfo)
  • Right camera metadata.
Published Topics
cloud ( sensor_msgs/PointCloud2)
  • Generated RGB point cloud.
Parameters
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~approx_sync ( bool, default: "true")
  • Use approximate time synchronization of the input topics. If false, the input topics must have the same timestamp (set to "false" for stereo images).
~decimation ( int, default: 1)
  • Decimation of the images before creating the point cloud. Set to 1 to not decimate the images.
~voxel_size ( double, default: 0.0)
  • Voxel size (m) of the generated cloud. Set 0.0 to deactivate voxel filtering.
~min_depth ( double, default: 0.0)
  • Min depth (m) of the generated cloud.
~max_depth ( double, default: 0.0)
  • Max depth (m) of the generated cloud. Set 0.0 to deactivate depth filtering.
~noise_filter_radius ( double, default: 0.0)
  • Max radius (m) for searching point neighbors. Set 0.0 to deactivate noise filtering.
~noise_filter_min_neighbors ( int, default: 5)
  • Minimum neighbors of a point to keep it.

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 image stream.
depth/camera_info ( sensor_msgs/CameraInfo)
  • Depth camera metadata.
disparity/image ( stereo_msgs/DisparityImage)
  • Disparity image stream.
disparity/camera_info ( sensor_msgs/CameraInfo)
  • Disparity camera metadata.
Published Topics
cloud ( sensor_msgs/PointCloud2)
  • Generated point cloud.
Parameters
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~approx_sync ( bool, default: "true")
  • Use approximate time synchronization of messages. If false, the image and camera info must have the same timestamps.
~decimation ( int, default: 1)
  • Decimation of the RGB/depth images before creating the point cloud. Set to 1 to not decimate the images.
~voxel_size ( double, default: 0.0)
  • Voxel size (m) of the generated cloud. Set 0.0 to deactivate voxel filtering.
~min_depth ( double, default: 0.0)
  • Min depth (m) of the generated cloud.
~max_depth ( double, default: 0.0)
  • Max depth (m) of the generated cloud. Set 0.0 to deactivate depth filtering.
~noise_filter_radius ( double, default: 0.0)
  • Max radius (m) for searching point neighbors. Set 0.0 to deactivate noise filtering.
~noise_filter_min_neighbors ( int, default: 5)
  • Minimum neighbors of a point to keep it.

rtabmap_ros/disparity_to_depth

Convert a disparity image to a depth image.
Subscribed Topics
disparity ( stereo_msgs/DisparityImage)
  • Disparity image stream.
Published Topics
depth ( sensor_msgs/Image)
  • Depth image stream in m. Format TYPE_32FC1.
depth_raw ( sensor_msgs/Image)
  • Depth image stream in mm. Format TYPE_16UC1.

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)
  • A point cloud generated from a RGB-D camera or a stereo camera.
Published Topics
ground ( sensor_msgs/PointCloud2)
  • The segmented ground.
obstacles ( sensor_msgs/PointCloud2)
  • The segmented obstacles.
Parameters
~frame_id ( string, default: "base_link")
  • The frame attached to the mobile base.
~queue_size ( int, default: 10)
  • Size of message queue for each synchronized topic.
~normal_estimation_radius ( double, default: 0.05)
  • Normal estimation radius (m).
~ground_normal_angle ( double, default: PI/4)
  • Maximum angle from the +z axis of the point's normal to be labelled as ground.
~min_cluster_size ( int, default: 20)
  • Minimum size of the segmented clusters to keep.
~max_obstacles_height ( double, default: 0.0)
  • Maximum height of obstacles.
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".

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值