Show EOL distros:
Package Summary
RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: hydro-devel)
Package Summary
RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: indigo-devel)
Package Summary
RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: jade-devel)
Package Summary
RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: kinetic-devel)
Package Summary
RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: lunar-devel)
Package Summary
RTAB-Map's ros-pkg. RTAB-Map is a RGB-D SLAM approach with real-time constraints.
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: melodic-devel)
Package Summary
RTAB-Map Stack
- Maintainer status: maintained
- Maintainer: Mathieu Labbe <matlabbe AT gmail DOT com>
- Author: Mathieu Labbe
- License: BSD
- Bug / feature tracker: https://github.com/introlab/rtabmap_ros/issues
- Source: git https://github.com/introlab/rtabmap_ros.git (branch: noetic-devel)
For melodic and older: http://wiki.ros.org/rtabmap_ros/melodic_and_older
For noetic and newer: http://wiki.ros.org/rtabmap_ros/noetic_and_newer
Contents
- Overview
- Tutorials
- Demos
- Nodes
-
Nodelets
- rtabmap_ros/rgbd_sync
- rtabmap_ros/rgb_sync
- rtabmap_ros/stereo_sync
- rtabmap_ros/rgbd_relay
- rtabmap_ros/data_odom_sync
- rtabmap_ros/data_throttle
- rtabmap_ros/stereo_throttle
- rtabmap_ros/point_cloud_xyzrgb
- rtabmap_ros/point_cloud_xyz
- rtabmap_ros/disparity_to_depth
- rtabmap_ros/pointcloud_to_depthimage
- rtabmap_ros/point_cloud_assembler
- rtabmap_ros/point_cloud_aggregator
- rtabmap_ros/obstacles_detection
- RVIZ plugins
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
- 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.
- 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.
- Stereo Outdoor Mapping
This tutorial shows how to do stereo mapping with RTAB-Map.
- Stereo Outdoor Navigation
This tutorial shows how to integrate autonomous navigation with RTAB-Map in context of outdoor stereo mapping.
- Mapping and Navigation with Turtlebot
This tutorial shows how to use RTAB-Map with Turtlebot for mapping and navigation.
- Remote Mapping
This tutorial shows how to do mapping on a remote computer.
- Setup RTAB-Map on Your Robot!
This tutorial shows multiple RTAB-Map configurations that can be used on your robot.
- Tango ROS Streamer
Tutorial to get Tango ROS Streamer working with rtabmap_ros
- 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.
- Advanced Parameter Tuning
This tutorial tells you which parameter to change to improve performances
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, fixed compressedDepth encoding format 2020/05/27, fixed odom child_frame_id not set 2021/01/22).
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:
$ roslaunch rtabmap_ros demo_robot_mapping.launch localization:=true $ 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, fixed compressedDepth encoding format 2020/05/27, fixed odom child_frame_id not set 2021/01/22).
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:
Updated 2015/09/21: fixed TF rotation of the camera
Updated 2017/09/08: fixed TF quaternion not normalized error
map1.bag.zip (542 MB)
map2.bag.zip (490 MB)
map3.bag.zip (318 MB)
map4.bag.zip (1.1 GB)
map5.bag.zip (843 MB)
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
$ roslaunch rtabmap_ros demo_multi-session_mapping.launch $ rosbag play --clock --pause 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:
stereo_outdoorA.bag (668 MB)
stereo_outdoorB.bag (987 MB)
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:
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 or grid_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 two examples (use string type for all RTAB-Map's parameters) by either using param member or by passing as arguments:
<launch> <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" args="--Grid/RangeMax 5"> <param name="Optimizer/Iterations" type="int" 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 or $ 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/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 metadata. Not required if parameter subscribe_stereo is true (use left/camera_info instead).
- Registered depth image. Required if parameter subscribe_depth is true.
- Laser scan stream. Required if parameter subscribe_scan is true.
- Laser scan point cloud stream. Required if parameter subscribe_scan_cloud is true.
- Left RGB/Mono rectified image. Required if parameter subscribe_stereo is true.
- Left camera metadata. Required if parameter subscribe_stereo is true.
- Right Mono rectified image. Required if parameter subscribe_stereo is true.
- Right camera metadata. Required if parameter subscribe_stereo is true.
- 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.
- RGB-D synchronized image, only when subscribe_rgbd is true.
- Can be used to add gravity constraints in the graph. The whole map will then be aligned with gravity. The quaternion should be already computed (see imu_filter_madgwick to compute it).
- Can be used to add GPS constraints in the graph. This could eventually be used to export poses in GPS format. With Optimizer/PriorsIgnored parameter set to false, the graph can be also optimized using the GPS values. See also this page on how GPS can be used to limit loop closure detection radius.
- Can be used to add global prior constraints in the graph. With Optimizer/PriorsIgnored parameter set to false, the graph can be optimized using the prior values.
- Can be used to add landmark constraints in the graph. Landmarks are used in graph optimization and also for loop closure detection. See also apriltag_ros repository.
- Can be used to add landmark constraints in the graph. Landmarks are used in graph optimization and also for loop closure detection. See also fiducials repository.
Published Topics
info (rtabmap_ros/Info)- RTAB-Map's info.
- RTAB-Map's graph and latest node data.
- RTAB-Map's graph only.
- Mapping Occupancy grid generated with laser scans. Use parameters in Mapping group below and RTAB-Map's parameters starting with Grid/ prefix. Do rtabmap --params | grep Grid/ to see all of them.
- Mapping DEPRECATED: use /grid_map topic instead with Grid/FromDepth=true.
- Mapping 3D point cloud generated from the assembled local grids. Use parameters with prefixes map_ and cloud_ below.
- Mapping 3D point cloud of obstacles generated from the assembled local grids. Use parameters with prefixes map_ and cloud_ below.
- Mapping 3D point cloud of ground generated from the assembled local grids. Use parameters with prefixes map_ and cloud_ below.
- Mapping 3D point cloud generated with the 2D scans or 3D scans. Use parameters with prefixes map_ and scan_ below.
- Convenient way to show graph's labels in RVIZ.
- Planning Poses of the planned global path. Published only once for each path planned.
- Planning Upcoming local poses corresponding to those of the global path. Published on every map update.
- Planning Status message if the goal is successfully reached or not.
- 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.
- Get an OctoMap. Available only if rtabmap_ros is built with octomap.
- Get an OctoMap. Available only if rtabmap_ros is built with octomap.
- A point cloud of the occupied space (obstacles and ground) of the OctoMap. Available only if rtabmap_ros is built with octomap.
- A point cloud of the obstacles of the OctoMap. Available only if rtabmap_ros is built with octomap.
- A point cloud of the ground of the OctoMap. Available only if rtabmap_ros is built with octomap.
- A point cloud of empty space of the OctoMap. Available only if rtabmap_ros is built with octomap.
- The projection of the OctoMap into a 2D occupancy grid map. Available only if rtabmap_ros is built with octomap.
Services
get_map (nav_msgs/GetMap)- Call this service to get the standard 2D occupancy grid
- Call this service to get the map data
- Call this service to publish the map data
- Get current labels of the graph.
- The node will update with current parameters of the rosparam server
- Delete the map
- Pause mapping
- Resume mapping
- The node will begin a new map
- Backup the database to "database_path.back" (default ~/.ros/rtabmap.db.back)
- Set localization mode
- Set mapping mode
- Set a label to latest node or a specified node.
- 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.
- Get an OctoMap. Available only if rtabmap_ros is built with octomap.
- Get an OctoMap. Available only if rtabmap_ros is built with octomap.
Parameters
~subscribe_depth (bool, default: "true")- Subscribe to depth image
- Subscribe to laser scan
- Subscribe to laser scan point cloud
- Subscribe to stereo images
- Subsribe to rgbd_image topic.
- The frame attached to the mobile base.
- The frame attached to the map.
- 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, the covariance value is fixed by odom_tf_angular_variance and odom_tf_linear_variance).
- When odom_frame_id is used, the first 3 values of the diagonal of the 6x6 covariance matrix are set to this value.
- When odom_frame_id is used, the last 3 values of the diagonal of the 6x6 covariance matrix are set to this value.
- Size of message queue for each synchronized topic.
- Publish TF from /map to /odom.
- Rate at which the TF from /map to /odom is published (20 Hz).
- Prefix to add to generated tf.
- Wait (maximum wait_for_transform_duration sec) for transform when a tf transform is not still available.
- Wait duration for wait_for_transform.
- Path of a config files containing RTAB-Map's parameters. Parameters set in the launch file overwrite those in the config file.
- Path of the RTAB-Map's database.
- 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.
- Maximum depth of the laser scans generated.
- 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.
- Number of RGB-D cameras to use (when subscribe_rgbd is true). Well for now, a maximum of 4 cameras can be synchronized at the same time. If > 1, the rgbd_image topics should contain the camera index starting with 0. For example, if we have 2 cameras, you should set rgbd_image0 and rgbd_image1 topics.
- 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.
- Adjust image and scan poses relatively to odometry pose for each node added to graph. For example, if an image received at t=1s has been synchronized with a scan at t=1.1s (and our reference stamp is the scan) and the robot is moving forward at 1 m/s, then we will ask TF to know the motion between t=1s and t=1.1s (which would be 0.1 m) for the camera to adjust its local transform (-10 cm) relative to scan frame at scan stamp. This also applies to multi-camera synchronization.
- Generate depth image from scan_cloud projection into RGB camera, taking into account displacement of the RGB camera accordingly to odometry and lidar frames. It works like pointcloud_to_depthimage node, but at slam frequency.
- Scale down image size of the camera info received (creating smaller depth image).
- Fill holes of empty pixels up to this size. Values are interpolated from neighbor depth values. 0 means disabled.
- Maximum depth error (m) to interpolate.
- Number of iterations to fill holes.
- 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.
- Mapping Angle used when filtering nodes before creating the maps. See also map_filter_radius. Used for all published maps.
- Mapping If there is no subscription to any map cloud_map, grid_map or proj_map, clear the corresponding data.
- Mapping If true, the last message published on the map topics will be saved and sent to new subscribers when they connect.
- Mapping Always update the occupancy grid map even if the graph has not been updated (e.g., by default when the robot is not moving, the graph is not growing). For example, if the environment is dynamic, we may want to update the map even when to robot is not moving. Another approach would be to force rtabmap to always update the graph (by setting RGBD/LinearUpdate to 0), which can be not efficient over time as the map will grow even if the robot doesn't move.
- Mapping Do ray tracing to fill unknown space for invalid 2D scan's rays (assuming invalid rays to be infinite). Used only when map_always_update is also true.
- Mapping Do a final voxel filtering after all clouds are assembled with a voxel size equals to Grid/CellSize. Used for cloud_map published topic.
- Mapping When appending a new cloud to cloud_map, filter points that have less neighbors than cloud_subtract_filtering_min_neighbors in the radius Grid/CellSize. This will helps to reconstruct the whole map's cloud faster when a loop closure happens. Used for cloud_map published topic.
- Mapping See cloud_subtract_filtering parameter's description.
Required tf Transforms
base_link → <the frame attached to sensors of incoming data>- usually a fixed value, broadcast periodically by a robot_state_publisher, or a tf static_transform_publisher.
- usually provided by the odometry system (e.g., the driver for the mobile base).
Provided tf Transforms
map → odom- 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.
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/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 metadata. Not required if parameter subscribe_stereo is true (use left/camera_info instead).
- Registered depth image. Required if parameter subscribe_depth is true.
- Laser scan stream. Required if parameter subscribe_scan is true.
- Laser scan stream. Required if parameter subscribe_scan_cloud is true.
- Left RGB/Mono rectified image. Required if parameter subscribe_stereo is true.
- Left camera metadata. Required if parameter subscribe_stereo is true.
- Right Mono rectified image. Required if parameter subscribe_stereo is true.
- Right camera metadata. Required if parameter subscribe_stereo is true.
- Odometry info. Required if parameter subscribe_odom_info is true.
- RTAB-Map's statistics info.
- RTAB-Map's graph and latest node data.
- RGB-D synchronized image, only when subscribe_rgbd is true.
Parameters
~subscribe_depth (bool, default: "false")- Subscribe to depth image
- Subscribe to laser scan
- Subscribe to laser scan point cloud
- Subscribe to stereo images
- Subscribe to odometry info messages
- Subsribe to rgbd_image topic.
- The frame attached to the mobile base.
- The frame attached to odometry. If empty, rtabmapviz will subscribe to odom topic to get odometry. If set, odometry is got from tf.
- Prefix to add to generated tf.
- Wait (maximum 1 sec) for transform when a tf transform is not still available.
- Size of message queue for each synchronized topic.
- Number of RGB-D cameras to use (when subscribe_rgbd is true). Well for now, a maximum of 4 cameras can be synchronized at the same time. If > 1, the rgbd_image topics should contain the camera index starting with 0. For example, if we have 2 cameras, you should set rgbd_image0 and rgbd_image1 topics.
Required tf Transforms
base_link → <the frame attached to sensors of incoming data>- usually a fixed value, broadcast periodically by a robot_state_publisher, or a tf static_transform_publisher.
- usually provided by the odometry system (e.g., the driver for the mobile base).
- the current odometry correction.
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.
- 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 or $ rosrun rtabmap_ros icp_odometry --params
- Parameters available for odometry can be shown from the terminal by using the "--params" argument:
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.
- Odometry info stream. RTAB-Map's parameter Odom/FillInfoData should be true to fill features information (default is true).
- 3D features of the last frame used to estimate the transformation.
- 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.
- Restart odometry to specified transformation. Format: "x y z roll pitch yaw".
- Pause odometry.
- Resume odometry.
Parameters
~frame_id (string, default: "base_link")- The frame attached to the mobile base.
- The odometry frame.
- Publish TF from /odom to /base_link.
- Prefix to add to generated tf.
- Wait (maximum 1 sec) for transform when a tf transform is not still available.
- The initial pose of the odometry. Format: "x y z roll pitch yaw".
- Size of message queue for each synchronized topic.
- Odometry is published with null transform when lost.
- This can be used to have odometry initialized at the current ground truth pose.
- See ground_truth_frame_id description.
- Use this frame as guess to compute odometry, otherwise odometry guess is done from a constant motion model. tf published by this node will be the correction of actual odometry. If guess_frame_id is odom_combined, odom_frame_id is odom and frame_id is base_footprint, odom -> odom_combined is published by this node to have a tf tree like this: /odom -> /odom_combined -> /base_link.
- When guess_frame_id is set, don't update odometry unless the guess moved at least as much as this value.
- When guess_frame_id is set, don't update odometry unless the guess rotated at least as much as this value.
- A config (ini) file with RTAB-Map's parameters.
Required tf Transforms
base_link → <the frame attached to sensors of incoming data>- usually a fixed value, broadcast periodically by a robot_state_publisher, or a tf static_transform_publisher.
Provided tf Transforms
odom → base_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 metadata.
- Registered depth image.
- RGB-D synchronized image, only when subscribe_rgbd is true.
Parameters
~approx_sync (bool, default: "true")- Use approximate time synchronization of rgb and depth messages. If false, the rgb and depth images must have the same timestamps.
- Number of RGB-D cameras to use (when subscribe_rgbd is true). Well for now, a maximum of 4 cameras can be synchronized at the same time. If > 1, the rgbd_image topics should contain the camera index starting with 0. For example, if we have 2 cameras, you should set rgbd_image0 and rgbd_image1 topics.
- Subsribe to rgbd_image topic.
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 metadata.
- Right Mono rectified image.
- Right camera metadata.
- Stereo synchronized image, only when subscribe_rgbd is true. This topic should contain left image in rgb field and right image in depth field (with corresponding camera info).
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.
- Subsribe to rgbd_image topic.
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)- Laser scan, assuming the lidar is installed horizontally. Don't use scan or scan_cloud at the same time.
- Point cloud, which can be 2D or 3D. Don't use scan or scan_cloud at the same time.
Parameters
~scan_cloud_max_points (int, default: 0)- Maximum point in laser scan or point cloud. 0 means the maximum is defined by the size of ranges vector for laser scan topic.
- Downsample the laser scan or point cloud. <=1 means no downsampling, otherwise one ray/point each step is kept.
- Filter the laser scan or point cloud using voxel filter of this size. 0.0 means disabled.
- Estimate normals of the laser scan or point cloud by using k nearest points. Useful only if Icp/Point2Plane parameter is enabled. 0 means disabled.
- Estimate normals of the laser scan or point cloud by using nearest points under this fixed radius. Useful only if Icp/Point2Plane parameter is enabled. 0.0 means disabled.
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 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. You can also use all Grid parameters from rtabmap:
$ rosrun rtabmap_ros rtabmap --params | grep Grid/
For example, setting the voxel sixe of the resulting grid/point cloud to 10 cm:
<launch> <node name="map_assembler" pkg="rtabmap_ros" type="map_assembler"> <param name="Grid/CellSize" type="double" value="0.1"/> </node> </launch>
Subscribed Topics
mapData (rtabmap_ros/MapData)- RTAB-Map's graph and latest node data.
Services
~reset (std_srvs/Empty)- Reset the cache.
Parameters
~regenerate_local_grids (bool, default: "false")- (>=0.20.5) If local occupancy grids are already included in mapData, set this to true to regenerate them. For example, this can be used to generate the local occupancy grids with a different sensor (e.g., Grid/FromDepth is different than one used in rtabmap).
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.
- RTAB-Map's optimized graph.
Parameters
~map_frame_id (string, default: "map")- The frame attached to the map.
- The frame attached to odometry.
- Optimization approach used: 0=TORO, 1=g2o and 2=GTSAM.
- 3DoF (x,y,yaw) optimization instead of 6DoF (x,y,z,roll,pitch,yaw).
- Activate Vertigo robust graph optimization when g2o or GTSAM strategy is used.
- Optimize the global map. If false, only the local map is optimized.
- Map optimization iterations.
- Stop graph optimization when error is less than epsilon (0=ignore epsilon).
- 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 the last node. If false, the graph is optimized from the oldest node linked to the current map.
- Publish TF from /map to /odom.
- Rate at which the TF from /map to /odom is published (20 Hz).
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)- RGB image stream.
- Registered depth image stream.
- RGB camera metadata.
Published Topics
rgbd_image (rtabmap_ros/RGBDImage)- The RGB-D image topic
- The compressed RGB-D image topic (rgb=jpeg, depth=png)
Parameters
~queue_size (int, default: 10)- Size of message queue for each synchronized topic.
- Use approximate synchronization for the input topics. If false, the RGB and depth images and the camera info must have the same timestamp.
- Throttling rate at which rgbd_image/compressed topic will be published. 0 means no throttling.
rtabmap_ros/rgb_sync
Synchronize RGB 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)- RGB image stream.
- RGB camera metadata.
Published Topics
rgbd_image (rtabmap_ros/RGBDImage)- The RGB-D image topic
- The compressed RGB-D image topic (rgb=jpeg, depth=png)
Parameters
~queue_size (int, default: 10)- Size of message queue for each synchronized topic.
- Use approximate synchronization for the input topics. If false, the RGB and depth images and the camera info must have the same timestamp.
- Throttling rate at which rgbd_image/compressed topic will be published. 0 means no throttling.
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)- Left image stream.
- Right image stream.
- Left camera metadata.
- Right camera metadata.
Published Topics
rgbd_image (rtabmap_ros/RGBDImage)- The RGB-D image topic. The RGB field is the left image and the depth field is the right image, with corresponding camera info.
- The compressed RGB-D image topic (images compressed in jpeg). The RGB field is the left image and the depth field is the right image, with corresponding camera info.
Parameters
~queue_size (int, default: 10)- Size of message queue for each synchronized topic.
- Use approximate synchronization for the input topics. If false, the left image, right image and the camera info must have the same timestamp (which should be always the case for stereo images).
- Throttling rate at which rgbd_image/compressed topic will be published. 0 means no throttling.
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)- RGB-D image input stream.
Published Topics
[rgbd_image]_relay (rtabmap_ros/RGBDImage)- RGB-D image output stream.
Parameters
~queue_size (int, default: 10)- Size of message queue.
- Publish compressed RGB-D image data.
- Publish uncompressed RGB-D image data.