Skip to content

Commit

Permalink
Docker tested successfully, GPU acceleration works, ros2 std message …
Browse files Browse the repository at this point in the history
…control works, ready for submission
  • Loading branch information
Mechazo11 committed Sep 11, 2024
1 parent fb7d5db commit 11f5bb0
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 deletions.
46 changes: 43 additions & 3 deletions o3de_mars_rover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

This directory contains the Dockerfile instructions for creating the ```TODO``` image that showcases Curiosity rover navigating through a clutterd test environment inspired by JPL's Mars Yard testing ground.

This project was created as a submission to the NASA Space ROS Sim Summer Sprint Challenge 2024. A short review on O3DE, a small video showing the system in action and other related discussion can be found in this [PR](https://github.com/space-ros/demos/pull/64)
Author: Azmyin Md. Kamal
Version: 1.0
Date: 09/09/2024
Landing page: **TODO** after submission. This page will always have the most updated information.

Version 1: This project was created as a submission to the NASA Space ROS Sim Summer Sprint Challenge 2024. A short review on O3DE, a small video showing the system in action and other related discussion can be found in this [PR](https://github.com/space-ros/demos/pull/64). In this submission only forward movement is supported.

## Prerequisits

Expand All @@ -25,11 +30,46 @@ cd /o3de_mars_rover

## Run the demo

* In the terminal where you would launch the O3DE, run the following
* Use ```docker ps -a``` to check if you have a container running ```openrobotics/o3de_curiosity_docker``` running. A useful command that stops and removes all containers is ```docker rm $(docker ps -aq)```

We will need three terminals. Lets call them Termianls A, B and C respectively.

* Terminal A, run the following

```bash
xhost +local:docker
./run.sh
```

* Open another terminal and find the
* Terminal B, find container id and then attach it

```bash
docker ps -a
docker exec -it <container_id> /bin/bash
```

* Terminal C, attach it to container

```bash
docker exec -it <container_id> /bin/bash
```

You should see the following setup

<img src="docs/terminals.png" alt="description" style="float: left; width: 200; height: auto;" />

* In Terminal A, launch the O3DE app: ```./build/linux/bin/profile/Editor```

* Hit the play button (right arrow symbol top right)

* **IMOPRTANT** in Game mode, the mouse dissappears. To get it back , hit ```Ctrl+TAB``` keys.

* In Terminal B and C, first source DEMO_WS: ```source $DEMO_DIR/install/setup.bash```
* In Terminal B: ```ros2 launch mars_rover mars_rover_o3de.launch```
* In Terminal C: ```ros2 service call /move_forward std_srvs/srv/Empty```

If you did eveything correclty, you should see the following

<img src="docs/output.png" alt="description" style="float: left; width: 200; height: auto;" />

Now the rover will move forward.
Binary file added o3de_mars_rover/docs/output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added o3de_mars_rover/docs/terminals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 1 addition & 12 deletions o3de_mars_rover/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,7 @@ CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")"
# docker run --rm -it --name $CONTAINER_NAME --network host \
# -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME

# Will automatically remove the container once exi
# docker run --rm -it \
# --name=$CONTAINER_NAME \
# --runtime=nvidia \
# --network host \
# -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
# -e DISPLAY=${DISPLAY} \
# -e NVIDIA_VISIBLE_DEVICES=all \
# -e NVIDIA_DRIVER_CAPABILITIES=all \
# -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME


# Will automatically remove the container once exited
docker run --rm -it --name $CONTAINER_NAME \
--runtime nvidia \
--network host \
Expand Down

0 comments on commit 11f5bb0

Please sign in to comment.