From 92dbada651cfdf786d0b497d7b6218be2021285f Mon Sep 17 00:00:00 2001 From: enesavcu Date: Sat, 20 Jan 2024 20:22:05 +0300 Subject: [PATCH] write docker setup at readme (#57) * write docker setup at readme Co-authored-by: Ryan --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 65da8a6..b10d6fa 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,41 @@ Build the package ``` colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map_geo ``` +## Docker Setup + +If your operating system doesn't support ROS 2 humble, docker is a great alternative. + +First of all, you have to build the project and create an image like so: + +```bash +## Assuimg you are in the correct project directory +docker build -t gmg . +``` +To use a shortcut, you may use the following command: + +```bash +## Assuimg you are in the correct project directory +make docker_build +``` + +After the image is created, copy and paste the following command to the terminal to run the image: + +```bash +## Assuimg you are in the correct project directory +docker run -it --net=host --ipc=host --privileged --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --volume="${XAUTHORITY}:/root/.Xauthority" --entrypoint /bin/bash gmg +``` +To use a shortcut, you may use following command: + +```bash +make docker_run +``` +## Running the package at docker image + +If you are in the docker image , this project is already sourced and the default launch file can be run as the following command; + +```bash +ros2 launch grid_map_geo load_tif_launch.xml +``` ## Running the package