Skip to content

Commit

Permalink
Added page in docs for lunar sim and instructions on how to build and…
Browse files Browse the repository at this point in the history
… run it (issue space-ros/demos#50)
  • Loading branch information
Munir Azme committed Sep 9, 2024
1 parent 0ad2383 commit 750fc33
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/Demos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ There are currently two Space ROS demonstration applications.
The first demo uses `MoveIt2 <https://moveit.ros.org/>`_ and a model of the `Canadarm manipulator <https://en.wikipedia.org/wiki/Canadarm>`_ along with the Space ROS base image.
In this demo, MoveIt2 is used to plan the motion for the Canadarm, which is running in simulation.
The second demo shows the `Mars Curiosity rover <https://mars.nasa.gov/msl/home/>`_ in simulation, presenting multiple ROS 2 services to allow the user to directly control the rover.
The third demo is a lunar world simulation with realistic terrain and lighting as well as an open-source lunar rover model.
The following pages go into detail to show you how to run these demo applications.

.. toctree::
Expand All @@ -13,3 +14,4 @@ The following pages go into detail to show you how to run these demo application

Demos/Canadarm
Demos/Mars-Rover
Demos/LunarSim
45 changes: 45 additions & 0 deletions source/Demos/LunarSim.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Lunar Sim Demo
==============

Space ROS Lunar Sim Demo Docker Image
-------------------------------------

The Space ROS Lunar Sim Demo docker image uses the spaceros docker image (*osrf/space-ros:latest*) as its base image.
The Dockerfile installs all of the prerequisite system dependencies along with the demo source code, then builds the Space ROS Lunar Sim Demo.

This demo includes a Gazebo simulation of the lunar environment (specfically around the Shackleton crater near the south pole). It uses
Digital Elevation Models (DEMs) from the Lunar Orbiter Laser Altimeter (LOLA) to accurately simulate the lunar surface in a specific region. It also contains a dynamic model of the Sun that moves according to Ephemeris data.

Building the Demo Docker
^^^^^^^^^^^^^^^^^^^^^^^^

The demo image builds on top of the spaceros image.
To build the docker image, first ensure the spaceros base image is available either by `building it locally <https://github.com/space-ros/space-ros>`_ or pulling it.

Then build lunar_sim demo images:

.. code-block:: bash
cd ../lunar_sim
./build.sh
Running the Demo Docker
^^^^^^^^^^^^^^^^^^^^^^^

Run the following to allow GUI passthrough:

.. code-block:: bash
xhost +local:docker
Then run:

.. code-block:: bash
./run.sh
Depending on the host computer, you might need to remove the ``--gpus all`` flag in ``run.sh``, which uses your GPUs.

0 comments on commit 750fc33

Please sign in to comment.