Skip to content

Commit 31b17d4

Browse files
committed
Added source to entrypoint, added docker instructions and image to README (resolves space-ros#50)
1 parent 2d0ce51 commit 31b17d4

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

lunarsim_demo/LunarSim.png

1.45 MB
Loading

lunarsim_demo/README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,55 @@
11
# LunarSim Demo
22
[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\
3+
<img src="./LunarSim.png" alt="Alt text" width="692" height="422">
4+
35
This folder containts three ROS2 packages for to enable simulation in a lunar environment, including a lunar gazebo world using a Digital Elevation Model (DEM) and a plugin for a dynamic sun model based on Ephemeris data.
46

5-
Instructions for building this package can be found in the space-ros-docker repo.
7+
# Space ROS Lunar Sim Demo Docker Image
8+
9+
The Space ROS Lunar Sim Demo docker image uses the spaceros docker image (*osrf/space-ros:latest*) as its base image.
10+
The Dockerfile installs all of the prerequisite system dependencies along with the demo source code, then builds the Space ROS Lunar Sim Demo.
11+
12+
This demo includes a Gazebo simulation of the lunar environment (specfically around the Shackleton crater near the south pole). It uses
13+
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.
14+
15+
## Building the Demo Docker
16+
17+
The demo image builds on top of the `spaceros` image.
18+
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.
19+
20+
Then build `lunar_sim` demo images:
21+
22+
```bash
23+
cd lunarsim_demo
24+
./build.sh
25+
```
26+
27+
## Running the Demo Docker
28+
29+
run the following to allow GUI passthrough:
30+
```bash
31+
xhost +local:docker
32+
```
33+
34+
Then run:
35+
36+
```bash
37+
./run.sh
38+
```
39+
40+
Depending on the host computer, you might need to remove the ```--gpus all``` flag in ```run.sh```, which uses your GPUs.
41+
42+
## Running the Demo
43+
44+
Launch the demo:
45+
46+
```bash
47+
source install/setup.bash
48+
ros2 launch lunarsim_gz_bringup lunarsim_world.launch.py
49+
```
50+
51+
This will launch the gazebo lunar world, spawn the rover and start teleop. This will be a new terminal window which enables you to control the rover as per the instructions in the terminal window.
52+
653

754
## lunar_sun_gz_plugin
855
This package contains a gazebo plugin to move an actor and create a light source at the location of the actor.

lunarsim_demo/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
# Setup the Demo environment
5-
# source "${DEMO_DIR}/install/setup.bash"
5+
source "${DEMO_DIR}/install/setup.bash"
66
exec "$@"

0 commit comments

Comments
 (0)