Skip to content

Commit

Permalink
Merge branch 'main' into spham_amzn/update_docker_and_readme
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
  • Loading branch information
spham-amzn authored Jan 18, 2023
2 parents 961497e + ebfa3d2 commit e206ba8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ the components necessary to run the O3DE demo project simulator through the O3DE
* Ubuntu 20.04 (Focal) or 22.04 (Jammy)
* At least 60 GB of free disk space
* Docker installed and configured
* **Note** It is recommended to have Docker installed correctly and in a secure manner so that the docker commands in this guide do not require elevated priviledges (sudo) in order to run them. See [Docker Engine post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) for more details.
* [NVidia container toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker)
* SUDO Access

## Building the Docker Image

Expand All @@ -20,7 +20,8 @@ on Ubuntu 22.04 (jammy) with the ROS2 Humble distribution. For example, to build
command:

```
build --build-arg O3DE_BRANCH=199205f --build-arg O3DE_EXTRAS_BRANCH=cbd3cd5 --build-arg LOFT_GEM_BRANCH=eed5208 -t o3de_robot_vacuum_simulation:latest .
docker build --build-arg O3DE_BRANCH=199205f --build-arg O3DE_EXTRAS_BRANCH=cbd3cd5 --build-arg LOFT_GEM_BRANCH=eed5208 -t o3de_robot_vacuum_simulation:latest .
```

**Note**
Expand All @@ -35,7 +36,7 @@ You can also create a separate docker image that only contains the navigation st
```IMAGE_TYPE``` and setting it to 'navstack':

```
sudo docker build --build-arg IMAGE_TYPE=navstack -t o3de_robot_vacuum_navstack:latest .
docker build --build-arg IMAGE_TYPE=navstack -t o3de_robot_vacuum_navstack:latest .
```

ROS2 allows for communication across multiple docker images running on the same host, provided that they specify the 'bridge'
Expand All @@ -57,13 +58,13 @@ xhost +local:root
Then launch the built simulation docker image with the following command

```
sudo docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_robot_vacuum_simulation:latest /data/workspace/LaunchSimulation.bash
docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_robot_vacuum_simulation:latest /data/workspace/LaunchSimulation.bash
```

Once the simulation is up and running, launch the robot application docker image, which will bring up RViz to control the robot.

```
sudo docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_robot_vacuum_navstack:latest /data/workspace/LaunchNavStack.bash
docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_robot_vacuum_navstack:latest /data/workspace/LaunchNavStack.bash
```

Expand Down

0 comments on commit e206ba8

Please sign in to comment.