• Diff for "rtabmap"
Differences between revisions 15 and 16
Revision 15 as of 2014-11-24 22:30:37
Size: 24375
Editor: MathieuLabbe
Comment:
Revision 16 as of 2014-11-26 11:54:58
Size: 24424
Editor: MathieuLabbe
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## repository: https://code.ros.org/svn/ros-pkg

  Show EOL distros: 

Package Summary

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

Package Summary

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

Package Summary

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

Package Summary

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

Package Summary

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

Package Summary

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

Package Summary

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

Overview

Under construction!!!! moving Wiki from googlecode wiki

Author(s): Mathieu Labbé

Maintainer(s): Mathieu Labbé

License: BSD

Web page: http://introlab.github.io/rtabmap

Source: https://github.com/introlab/rtabmap-ros-pkg

Dependencies: RTAB-Map's standalone library (https://github.com/introlab/rtabmap)

Description: RTAB-Map (Real-Time Appearance-Based Mapping) is a RGB-D Graph SLAM approach based on a global Bayesian loop closure detector. The loop closure detector uses a bag-of-words approach to determinate how likely a new image comes from a previous location or a new location. When a loop closure hypothesis is accepted, a new constraint is added to the map's graph, then a graph optimizer minimizes the errors in the map. A memory management approach is used to limit the number of locations used for loop closure detection and graph optimization, so that real-time constraints on large-scale environnements are always respected. RTAB-Map can be used alone with a hand-held Kinect or stereo camera for 6DoF RGB-D mapping, or on a robot equipped with a laser rangefinder for 3DoF mapping.

Tutorials

Demos

Robot mapping

For this demo, you will need the ROS bag demo_mapping.bag :

Launch: demo_robot_mapping.launch

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

Robot mapping with RVIZ

For this demo, you will also need the ROS bag demo_mapping.bag :

Launch: demo_robot_mapping_rviz.launch

  • $ roslaunch rtabmap demo_robot_mapping_rviz.launch
    $ rosbag play --clock demo_mapping.bag

Multi-session mapping

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

Launch: demo_find_object.launch

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

Stereo

Visit the page StereoOutdoorDemo more detailed information. It is also shown how to create 2D occupancy grid map for navigation.

Launch : demo_stereo_outdoor.launch

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

Appearance-based loop closure detection-only

Launch: demo_appearance_mapping.launch

  • $ roslaunch rtabmap 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 demo_appearance_localization.launch

Nodes

rtabmap

This is the main node of this package. It is a wrapper of the RTAB-Map 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 (as well with RTAB-Map statistics). The default localization of the RTAB-Map database is "~/.ros/rtabmap.db" and the workspace is also set to "~/.ros" (use RTAB-Map parameters Rtabmap/DatabasePath and Rtabmap/WorkingDirectory to change the defaults). Argument "--delete_db_on_start" will make rtabmap to delete the database before starting, otherwise the previous mapping session is loaded.

There are two set of parameters: ROS and RTAB-Map parameters. The ROS parameters are for connection stuff to interface the RTAB-Map library with ROS. The RTAB-Map parameters are those from the RTAB-Map library.

One way to know RTAB-Map library 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 parameters):

<launch>
<node name="rtabmap" pkg="rtabmap" type="rtabmap">
   <param name="RGBD/ToroIterations" 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 rtabmap --params

Subscribed Topics

odom (nav_msgs/Odometry)
  • Odometry stream. Required if parameters subscribe_depth or subscribe_stereo are true.
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.
scan (sensor_msgs/LaserScan)
  • Laser scan stream. Required if parameter subscribe_laserScan is true.

Published Topics

info (rtabmap/Info)
  • RTAB-Map's basic info.
infoEx (rtabmap/InfoEx)
  • RTAB-Map's extended info.
mapData (rtabmap/MapData)
  • RTAB-Map's graph and latest node data.

Services

get_map (rtabmap/GetMap)
  • Call this service to get the map data
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
set_mode_localization (std_srvs/Empty)
  • Set localization mode
set_mode_mapping (std_srvs/Empty)
  • Set mapping mode

Parameters

~subscribe_depth (bool, default: "true")
  • Subscribe to depth image
~subscribe_laserScan (bool, default: "false")
  • Subscribe to laser scan
~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.
~queue_size (int, default: 10)
  • Size of message queue for each synchronized topic.
~tf_delay (double, default: 0.05)
  • Rate at which the TF from /map to /odom is published (20 Hz).
~rgb/image_transport (string, default: "raw")
  • Image transport format.
~depth/image_transport (string, default: "raw")
  • Depth image transport format.

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 estimate of the robot's pose within the map frame.

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 "rtabmap.ini"*
    • Set a RTAB-Map ini file for GUI interface parameters.

Subscribed Topics

odom (nav_msgs/Odometry)
  • Odometry stream. Required if parameters subscribe_depth, subscribe_laserScan or subscribe_stereo are true.
rgb/image (sensor_msgs/Image)
  • RGB/Mono rectified image.
rgb/camera_info (sensor_msgs/CameraInfo)
  • RGB camera metadata. Required if parameter subscribe_depth is true.
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_laserScan is true.
infoEx (rtabmap/InfoEx)
  • RTAB-Map's extended info.
mapData (rtabmap/MapData)
  • RTAB-Map's graph and latest node data.

Published Topics

info (rtabmap/Info)
  • RTAB-Map's basic info.
infoEx (rtabmap/InfoEx)
  • RTAB-Map's extended info.
mapData (rtabmap/MapData)
  • RGB camera metadata.

Parameters

~subscribe_depth (bool, default: "true")
  • Subscribe to depth image
~subscribe_laserScan (bool, default: "false")
  • Subscribe to laser scan
~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.
~rgb/image_transport (string, default: "raw")
  • Image transport format.
~depth/image_transport (string, default: "raw")
  • Depth image transport format.

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 estimate of the robot's pose within the map frame.

rgbd_odometry

This node wraps the visual odometry approach of RTAB-Map. Using RGBD images, odometry is computed using FAST/SIFT/SURF features extracted from the RGB images with their depth information from the depth images. Using the feature correspondences between the images, a RANSAC approach compute the transformation between the consecutive images. The approach is visual based so enough visual features must be present to compute the odometry. When it fails to update the odometry, a null transformation is sent to notify the receiver that odometry is not updated.

There are two set of parameters: ROS and RTAB-Map parameters. The ROS parameters are for connection stuff to interface the RTAB-Map library with ROS. The RTAB-Map parameters are those from the RTAB-Map library.

See these examples in sample launch files:

Parameters available for odometry can be shown from the terminal by using the "--params" argument:

$ rosrun rtabmap visual_odometry --params

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.

Published Topics

odom (nav_msgs/Odometry)
  • Odometry stream. Send null odometry if cannot be computed.

Services

reset_odom (std_srvs/Empty)
  • Restart odometry to identity transformation.

Parameters

~subscribe_depth (bool, default: "true")
  • Subscribe to depth image
~subscribe_laserScan (bool, default: "false")
  • Subscribe to laser scan
~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.
~rgb/image_transport (string, default: "raw")
  • Image transport format.
~depth/image_transport (string, default: "raw")
  • Depth image transport format.

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.

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.

Output topics

Parameters

  • *frame_id* (string, default "camera")

For dynamic parameters, see Camera.cfg

data_recorder

This node can be used to record data from an OpenNI camera to RTAB-Map database format (".db"), which can be read after by the standalone application (Detection->Select Source->Database). It is like a ROS bag, but timing information are not saved.

Input topics

Parameters

  • *frame_id* (string, default "base_link")
  • *subscribe_odometry* (bool, default false)
  • *subscribe_depth* (bool, default false)
  • *subscribe_laserScan* (bool, default false)
  • *queue_size* (int, 10)
    • synchronization queue size
  • *output_file_name* (string, default "output.db")
  • *rgb/image_transport* (string, default "raw")
  • *depth/image_transport* (string, default "raw")

map_assembler

This node subscribes to *rtabmap* output topic *mapData* and assembles the 3D map incrementally, then publishes the assembled map.

Input topics

Output topics

Parameters

  • *cloud_decimation* (int, default 4)
  • *cloud_max_depth* (double, default 4.0)
  • *cloud_voxel_size* (double, default 0.02)
  • *scan_voxel_size* (double, default 0.01)

grid_map_assembler

This node subscribes to *rtabmap* output topic *mapData* and assembles the map incrementally using the laser scans, then publishes the occupancy grid map.

Input topics

Output topics

Parameters

  • *scan_voxel_size* (double, default 0.01)

Services

Nodelets

rtabmap/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.
~rgb/image_transport (string, default: "raw")
  • Image transport format.
~depth/image_transport (string, default: "raw")
  • Depth image transport format.

data_throttle

Throttle at a specified rate the OpenNI data.

Input topics

Output topics

Parameters

  • *queue_size* (int, default 10)
  • *max_rate* (double, default 0 Hz)
  • *rgb/image_transport* (string, default "raw")
  • *depth/image_transport* (string, default "raw")

point_cloud_xyzrgb

Construct a point cloud from RGB and depth images. An optional voxel filtering can be applied.

Input topics

Output topics

Parameters

  • *queue_size* (int, default 10)
  • *voxel_size* (double, default 0)
  • *rgb/image_transport* (string, default "raw")
  • *depth/image_transport* (string, default "raw")

disparity_to_depth

Convert a disparity image to a depth image.

Input topics

Output topics

RVIZ plugins

Map Cloud Display

http://rtabmap.googlecode.com/svn/trunk/doc/rgbd/MapCloudType.png

This rviz plugin subscribes to /mapData (rtabmap/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.

Properties

http://rtabmap.googlecode.com/svn/trunk/doc/rgbd/MapCloudPlugin.png

It has the same properties as PointCloud2 with these new ones:

  • *Cloud decimation* How the input depth and RGB images are decimated before creating the point cloud (default 4).
  • *Cloud max depth (m)* Maximum depth of each point cloud added to map (default 4, 0 means no maximum).
  • *Cloud voxel size (m)* Voxel size of the generated point clouds (default 0.01, 0 means no voxel).
  • *Node filtering radius (m)* (Disabled=0) Only keep one node in the specified radius.
  • *Node filtering angle (degrees)* (Disabled=0) Only keep one node in the specified angle in the filtering radius.
  • *Download Map* Download the map from rtabmap node. This may take a while if the map is big, be patient!

Info Display

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

Wiki: rtabmap (last edited 2023-04-19 00:10:24 by MathieuLabbe)