diff --git a/o3de_mars_rover/README.md b/o3de_mars_rover/README.md index 000fd2c1..041fef41 100644 --- a/o3de_mars_rover/README.md +++ b/o3de_mars_rover/README.md @@ -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 @@ -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 /bin/bash +``` + +* Terminal C, attach it to container + +```bash +docker exec -it /bin/bash +``` + +You should see the following setup + +description + +* 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 + +description + +Now the rover will move forward. diff --git a/o3de_mars_rover/docs/output.png b/o3de_mars_rover/docs/output.png new file mode 100644 index 00000000..1d86c6d5 Binary files /dev/null and b/o3de_mars_rover/docs/output.png differ diff --git a/o3de_mars_rover/docs/terminals.png b/o3de_mars_rover/docs/terminals.png new file mode 100644 index 00000000..511ac118 Binary files /dev/null and b/o3de_mars_rover/docs/terminals.png differ diff --git a/o3de_mars_rover/run.sh b/o3de_mars_rover/run.sh index 52553718..309f70b3 100755 --- a/o3de_mars_rover/run.sh +++ b/o3de_mars_rover/run.sh @@ -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 \