Files
rtabmap_ros/docker/README.md
T

52 lines
1.8 KiB
Markdown
Raw Normal View History

### Docker
2019-11-08 18:58:37 -05:00
* Available images on [introlab3it/rtabmap_ros](https://hub.docker.com/r/introlab3it/rtabmap_ros/):
```
2023-01-22 16:57:14 -08:00
humble, humble-latest
2025-03-01 20:58:54 -08:00
jazzy, jazzy-latest
```
2023-04-23 14:44:02 -07:00
* The `-latest` images are automatically built from latest version of `rtabmap` and `rtabmap_ros` from source (including dependencies that are not available with ROS binaries). The other images have the same version than the binaries released on ROS.
2020-06-10 10:33:57 -04:00
* Launch `rtabmap` from inside the container (**no gui**), saving the database on host `~/.ros/rtabmap.db`:
```bash
2023-04-23 14:44:02 -07:00
docker run -it --rm \
--user $UID \
2023-04-23 21:12:13 -07:00
-e ROS_HOME=/tmp/.ros \
-e OMP_WAIT_POLICY=passive \
2023-01-22 16:57:14 -08:00
--network=host \
2023-06-17 18:17:20 -07:00
--ipc=host \
2023-04-23 21:12:13 -07:00
-v ~/.ros:/tmp/.ros \
2023-01-22 16:57:14 -08:00
introlab3it/rtabmap_ros:humble-latest \
2023-06-17 18:17:20 -07:00
ros2 launch rtabmap_launch rtabmap.launch.py rtabmap_viz:=false database_path:=/tmp/.ros/rtabmap.db rtabmap_args:="--delete_db_on_start"
```
2020-06-10 10:33:57 -04:00
2023-04-23 21:12:13 -07:00
* Launch `rtabmap_viz` from inside the container, using [nvidia-docker2 approach](http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration#nvidia-docker2):
2020-06-11 10:52:28 -04:00
2023-06-17 18:17:20 -07:00
```bash
2023-04-23 14:44:02 -07:00
# those following 3 lines would need to be done only one time
XAUTH=/tmp/.docker.xauth
touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
2020-06-11 10:52:28 -04:00
2023-04-23 14:44:02 -07:00
docker run -it --rm \
--privileged \
-e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-e NVIDIA_VISIBLE_DEVICES=all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
-e XAUTHORITY=$XAUTH \
-e OMP_WAIT_POLICY=passive \
2023-06-17 18:17:20 -07:00
--user $UID \
-e ROS_HOME=/tmp/.ros \
-v ~/.ros:/tmp/.ros \
2023-04-23 14:44:02 -07:00
--runtime=nvidia \
2023-06-17 18:17:20 -07:00
--network=host \
--ipc=host \
2023-04-23 14:44:02 -07:00
-v $XAUTH:$XAUTH \
-v /tmp/.X11-unix:/tmp/.X11-unix \
2023-06-17 18:17:20 -07:00
introlab3it/rtabmap_ros:humble-latest \
/bin/bash -c "ros2 run rtabmap_viz rtabmap_viz --ros-args -r __ns:=/rtabmap"
2023-04-23 14:44:02 -07:00
```
2020-06-11 10:52:28 -04:00