Skip to content

Getting Started ​

Use the released PyLoN mod and Docker image to receive vessel information and 3D LiDAR point clouds from KSP. KSP and the mod run on the host; ROS 2 Jazzy and the PyLoN bridge run in Docker.

1. Prepare KSP and Docker ​

This guide targets Linux KSP 1.x and Docker Engine on the same Ubuntu Desktop 24.04 LTS x86_64 PC. Connectivity has been checked with KSP 1.12.5.

  1. Install and start KSP, then create a Sandbox save. No DLC or other mods are required.
  2. Exit KSP and find its installation through Steam's “Manage” → “Browse local files.”
  3. Install Docker Engine using the official Ubuntu instructions. Complete the post-installation permission setup and confirm that the following displays Server information.
bash
docker version

2. Install the PyLoN mod ​

With KSP closed, download and extract PyLoN-vX.Y.Z.zip from Releases. Copy the entire GameData/PyLoN folder into KSP's GameData. “Source code” archives do not contain a built mod.

text
Kerbal Space Program/
└── GameData/
    └── PyLoN/
        ├── Plugins/PyLoN.dll
        ├── Config/Runtime.cfg
        ├── Config/ControlSafety.cfg
        ├── Models/
        └── Parts/

Do not nest it one level too deep, such as GameData/GameData/PyLoN. When updating, back up the existing Config/Runtime.cfg before copying. No configuration changes are needed for the first setup.

3. Download the Docker image ​

Pull the image containing ROS 2 Jazzy and the PyLoN bridge. You do not need ROS installed on the host.

bash
docker pull ghcr.io/pylon-sim/pylon-bridge:jazzy

Image publication preparation

Pulls are unavailable until the initial GHCR build and Packages Public setting are complete. See Docker Setup and Operation for publication details.

Use matching versions of the mod and container. Docker Setup and Operation also explains version pinning. The image does not include KSP or the mod.

4. Start the bridge ​

Run in terminal A and keep it open. Commands are for bash.

bash
docker run --rm -it --init --network host \
  --name pylon-jazzy \
  -e ROS_DOMAIN_ID=0 \
  ghcr.io/pylon-sim/pylon-bridge:jazzy

The bridge is listening when Listening on udp://127.0.0.1:49010 and command destination 127.0.0.1:49011 appear. Linux host networking connects with the mod's default Runtime.cfg. Stop any other running bridge first.

5. Launch a vessel in KSP ​

Start KSP and build the minimal receiver vessel “PyLoN Receiver”. It uses three parts: a Mk1 Lander Can, Z-100 battery, and PyLoN LiDAR 3D. Set the LiDAR Sensor ID to front_lidar.

Launch into Flight, unpause, and use normal speed (1×). You can check reception while sitting on the launchpad.

6. Check reception ​

Run these in order in a separate terminal B. Include /pylon-entrypoint.sh in docker exec to load the ROS environment. Stop each hz command with Ctrl+C after a few lines, then continue.

bash
docker exec pylon-jazzy /pylon-entrypoint.sh ros2 topic echo \
  --once --qos-reliability best_effort /ksp_vessel/simulator/state
docker exec -it pylon-jazzy /pylon-entrypoint.sh ros2 topic hz /ksp_vessel/imu/data_raw
docker exec -it pylon-jazzy /pylon-entrypoint.sh ros2 topic hz \
  /ksp_vessel/lidar_3d/front_lidar/points
CheckExpected result
simulatorcommunication_alive: true and simulation_advancing: true
IMU and 3D LiDARContinuous average rate output for each

If reception fails, see Troubleshooting. For vessel model checks and more, see the Minimal Receiver checks.

Stop and continue ​

Press Ctrl+C in terminal A, or stop with the command below. Next time, start from step 4.

bash
docker stop pylon-jazzy

See Docker Setup and Operation for updates, Compose, and RViz connections, Building ROS2 Applications for your own nodes, and the Demo Index for examples.

Environment setup and builds for changing PyLoN itself are in Core Development. For Space ROS, prepare KSP, Docker, and the mod with steps 1–2, then continue to Running with Space ROS.

Guides and API references for building ROS2 applications with PyLoN