2022-10-09 12:35:19 -07:00
rtabmap_ros
2014-11-25 17:51:23 -05:00
===========
2024-11-30 17:28:16 -08:00
RTAB-Map's ROS2 package (branch `ros2` ). **ROS2 Foxy minimum required** : currently most nodes are ported to ROS2. The interface is the same than on ROS1 (parameters and topic names should still match ROS1 documentation on [rtabmap_ros ](http://wiki.ros.org/rtabmap_ros )).
2021-10-05 18:01:30 -04:00
2022-10-09 12:35:19 -07:00
#### CI Latest
<table>
<tbody>
<tr>
<td>ROS 1</td>
<td><a href="https://github.com/introlab/rtabmap_ros/actions/workflows/ros1.yml"><img src="https://github.com/introlab/rtabmap_ros/actions/workflows/ros1.yml/badge.svg" alt="Build Status"/> <br> <a href="https://github.com/introlab/rtabmap_ros/actions/workflows/docker.yml"><img src="https://github.com/introlab/rtabmap_ros/actions/workflows/docker.yml/badge.svg" alt="Build Status"/>
</td>
</tr>
<tr>
<td>ROS 2</td>
<td><a href="https://github.com/introlab/rtabmap_ros/actions/workflows/ros2.yml"><img src="https://github.com/introlab/rtabmap_ros/actions/workflows/ros2.yml/badge.svg" alt="Build Status"/>
</td>
</tr>
</tbody>
</table>
#### ROS Binaries
<table>
<tbody>
<tr>
2023-08-13 13:52:19 -07:00
<td rowspan="1">ROS 1</td>
2022-10-09 12:35:19 -07:00
<td>Noetic</td>
<td><a href="http://build.ros.org/job/Nbin_ufv8_uFv8__rtabmap_ros__ubuntu_focal_arm64__binary/"><img src="http://build.ros.org/buildStatus/icon?job=Nbin_ufv8_uFv8__rtabmap_ros__ubuntu_focal_arm64__binary" alt="Build Status"/></td>
</tr>
<tr>
2024-09-01 15:47:59 -07:00
<td rowspan="4">ROS 2</td>
2022-10-09 12:35:19 -07:00
<td>Humble</td>
<td><a href="http://build.ros2.org/job/Hbin_uJ64__rtabmap_ros__ubuntu_jammy_amd64__binary/"><img src="http://build.ros2.org/buildStatus/icon?job=Hbin_uJ64__rtabmap_ros__ubuntu_jammy_amd64__binary" alt="Build Status"/></td>
</tr>
2023-08-13 13:52:19 -07:00
<tr>
<td>Iron</td>
<td><a href="http://build.ros2.org/job/Ibin_uJ64__rtabmap_ros__ubuntu_jammy_amd64__binary/"><img src="http://build.ros2.org/buildStatus/icon?job=Ibin_uJ64__rtabmap_ros__ubuntu_jammy_amd64__binary" alt="Build Status"/></td>
</tr>
2024-09-01 15:47:59 -07:00
<tr>
<td>Jazzy</td>
<td><a href="http://build.ros2.org/job/Jbin_uN64__rtabmap_ros__ubuntu_noble_amd64__binary/"><img src="http://build.ros2.org/buildStatus/icon?job=Jbin_uN64__rtabmap_ros__ubuntu_noble_amd64__binary" alt="Build Status"/></td>
</tr>
2022-10-09 12:35:19 -07:00
<tr>
<td>Rolling</td>
2024-09-01 15:47:59 -07:00
<td><a href="http://build.ros2.org/job/Rbin_uN64__rtabmap_ros__ubuntu_noble_amd64__binary/"><img src="http://build.ros2.org/buildStatus/icon?job=Rbin_uN64__rtabmap_ros__ubuntu_noble_amd64__binary" alt="Build Status"/></td>
2022-10-09 12:35:19 -07:00
</tr>
2023-05-15 10:45:50 -07:00
<tr>
<td>Docker</td>
<td>
<a href="https://hub.docker.com/r/introlab3it/rtabmap_ros">rtabmap_ros</a>
</td>
<td><img src="https://img.shields.io/docker/pulls/introlab3it/rtabmap_ros.svg?label=pulls" alt="Docker Pulls"/></td>
</tr>
2022-10-09 12:35:19 -07:00
</tbody>
</table>
2022-11-27 16:21:59 -08:00
# Usage
2024-11-30 17:28:16 -08:00
* For sensor integration examples (stereo and RGB-D cameras, 3D LiDAR), see [rtabmap_examples ](https://github.com/introlab/rtabmap_ros/tree/ros2/rtabmap_examples/launch ) sub-folder.
2021-10-05 18:01:30 -04:00
2024-11-30 17:28:16 -08:00
* For robot integration examples (turtlebot3 and turtlebot4, nav2 integration), see [rtabmap_demos ](https://github.com/introlab/rtabmap_ros/tree/ros2/rtabmap_demos ) sub-folder.
## Logging
To make RTAB-Map's logs appear ordered with RCLCPP's logs, set the following environment variables in your `.bashrc` (see official "[About Logging ](https://docs.ros.org/en/humble/Concepts/Intermediate/About-Logging.html )" documentation for more info):
2021-10-05 18:01:30 -04:00
```bash
2024-11-30 17:28:16 -08:00
export RCUTILS_LOGGING_USE_STDOUT = 1
export RCUTILS_LOGGING_BUFFERED_STREAM = 1
# Optional, but if you like colored logs:
export RCUTILS_COLORIZED_OUTPUT = 1
2021-10-05 18:01:30 -04:00
```
2024-11-30 17:28:16 -08:00
## Recommended DDS
If RTAB-Map's GUI or topic frequency feel laggy (even if processing time looks fast enough), it may be caused by the DDS. I recommend to use [Cyclone DDS ](https://docs.ros.org/en/foxy/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.html ), you can try it by adding this before launching any nodes/launch files:
2021-10-05 18:01:30 -04:00
```bash
2024-11-30 17:28:16 -08:00
export RMW_IMPLEMENTATION = rmw_cyclonedds_cpp
2021-10-05 18:01:30 -04:00
```
2014-11-25 17:51:23 -05:00
2017-03-23 13:45:50 -04:00
# Installation
2014-11-27 13:51:23 -05:00
2023-04-24 11:35:09 -07:00
### Binaries
```bash
sudo apt install ros-$ROS_DISTRO -rtabmap-ros
```
### From Source
2023-08-10 10:51:44 -07:00
* Make sure to uninstall any rtabmap binaries:
```
sudo apt remove ros-$ROS_DISTRO-rtabmap*
` ``
2020-01-30 17:18:48 -05:00
* RTAB-Map ROS2 package:
` ``bash
2022-10-01 11:22:26 -07:00
cd ~/ros2_ws
git clone https://github.com/introlab/rtabmap.git src/rtabmap
git clone --branch ros2 https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros
2022-11-12 00:17:28 +05:30
rosdep update && rosdep install --from-paths src --ignore-src -r -y
2022-10-01 11:22:26 -07:00
export MAKEFLAGS="-j6" # Can be ignored if you have a lot of RAM (>16GB)
2022-10-05 12:02:00 -07:00
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
2020-01-30 17:18:48 -05:00
` ``
2014-11-27 13:51:23 -05:00
2021-10-14 16:11:56 -04:00
* To build with ` rgbd_cameras>1` support and/or ` subscribe_user_data` support:
` ``bash
2022-10-05 12:02:00 -07:00
colcon build --symlink-install --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DRTABMAP_SYNC_USER_DATA=ON -DCMAKE_BUILD_TYPE=Release
2021-10-14 16:11:56 -04:00
` ``