Skip to content

Commit 92dbada

Browse files
avcuenesRyanf55
andauthored
write docker setup at readme (#57)
* write docker setup at readme Co-authored-by: Ryan <[email protected]>
1 parent 23141e4 commit 92dbada

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,41 @@ Build the package
2626
```
2727
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map_geo
2828
```
29+
## Docker Setup
30+
31+
If your operating system doesn't support ROS 2 humble, docker is a great alternative.
32+
33+
First of all, you have to build the project and create an image like so:
34+
35+
```bash
36+
## Assuimg you are in the correct project directory
37+
docker build -t gmg .
38+
```
39+
To use a shortcut, you may use the following command:
40+
41+
```bash
42+
## Assuimg you are in the correct project directory
43+
make docker_build
44+
```
45+
46+
After the image is created, copy and paste the following command to the terminal to run the image:
47+
48+
```bash
49+
## Assuimg you are in the correct project directory
50+
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
51+
```
52+
To use a shortcut, you may use following command:
53+
54+
```bash
55+
make docker_run
56+
```
57+
## Running the package at docker image
58+
59+
If you are in the docker image , this project is already sourced and the default launch file can be run as the following command;
60+
61+
```bash
62+
ros2 launch grid_map_geo load_tif_launch.xml
63+
```
2964

3065
## Running the package
3166

0 commit comments

Comments
 (0)