This is a lunar lander simulator that uses the Foxglove app as its UI. The simulator is written against the Foxglove SDK, as a way to demo some of its functionality.
In this game, you're piloting an Apollo lunar lander.
You'll want to use a gamepad for this. I've tested with a PS4 controller, but anything with dual joysticks should be fine.
This game depends on some unreleased extensions.
- Joystick: Joystick controls
- Foxglove Navball: Attitude indicator
The joystick extension is publicly available in the extension registry, but there are some very useful commits (e.g., to save state) since the last release. It's worth installing from git.
To install these, clone the repos, open the Foxglove desktop app, and do:
$ npm install
$ npm run local-install
You'll want to import the following layouts:
Run the game server on your local machine:
$ cargo build
$ cargo run --release
In foxglove desktop, open a live websocket
connection
to ws://localhost:8765
, and use the foxglove-lunar-lander-live
layout.
You'll want a gamepad. If you're using a PS4 controller, the controls are:
- D-pad up/down: Tap to increase/decrease the target vertical velocity
- Left stick: Strafe using RCS boosters
- Right stick: Adjust pitch and roll using RCS boosters
- L2/R2: Hold to adjust yaw
- PS button: Start or reset
You might find that your controller's button mappings are different from mine.
If that's the case, you can write your own gamepad.json
.
You can use the joystick panel's "Auto-generated" display to figure out which
indexes correspond to the physical axes and buttons that you want to use.
Each game is exported to an MCAP recording in the local recordings/
directory.
To view a recording, use the foxglove-lunar-lander-viewer
layout.
If you want to automatically upload recording metadata to Foxglove after each game, you can point the Foxglove agent at your recording directory.
At the moment, the lander model isn't stored in the recording; it's just a
reference to package://assets/apollo.dae
. You'll need to
configure the ROS package path
accordingly.
- Attitude control assistance
- Embed model data in the /lander channel