Running with Space ROS
You can build and run PyLoN's bridge and vehicle control packages in the official Space ROS container. KSP runs on the host PC.
The target platform is Linux x86_64. The official osrf/space-ros:jazzy-2026.07.0 image is pinned by digest, using the ROS libraries at /opt/ros/spaceros in the container. Build outputs are separate from the host's ~/ros2_ws.
How to follow this page
- Space ROS only: Prepare Ubuntu, KSP, Docker, and the mod with Getting Started, steps 1–2 → build and run on this page → Minimal Receiver. Skip step 3 onward for the Jazzy image.
- Switching from the Jazzy container: Confirm reception with Getting Started → stop the bridge with
docker stop pylon-jazzy→ start the Space ROS bridge on this page. - Using host Jazzy applications and RViz: Prepare Jazzy and PyLoN packages from the same source version on the host, then follow “Using host ROS 2.”
KSP runs on the host in all configurations; it is not included in the Space ROS container. To build the mod from source, follow Core Development.
Prerequisites
If Docker is not yet installed on Ubuntu:
sudo apt-get update
sudo apt-get install -y docker.io
sudo usermod -aG docker "$USER"Log out and back in, then check that docker version displays Server information. To refresh only the current terminal, run newgrp docker.
See Getting Started for installing the released KSP mod, or Core Development for source builds. Obtain the source before running the Space ROS scripts below. ROS does not need to be installed on the host.
Build and run
Run from the repository root.
./spaceros.sh build
./spaceros.sh test
./spaceros.sh runThis builds pylon_interfaces, pylon_bridge, and pylon_vehicle_control. The first build downloads the official image. Run build again after changing sources. RViz is not included in this image.
Start the dedicated Phoenix launch, satellite separation, and retropropulsive landing demo with pylon_demo_reusable/spaceros.sh demo in the demos repository. See the Demo Guide for lifecycle startup conditions, vessel placement, and validation scope.
run listens on UDP port 49010 and sends commands back to 49011. Stop the host bridge before starting it. Linux host networking allows KSP's stateHost and the bridge's --command-host to remain 127.0.0.1.
Build the Minimal Receiver and enter Flight. Open another terminal in the PyLoN repository root and run the commands below. The minimal vessel page lists success criteria, including point clouds.
./spaceros.sh exec ros2 topic list --no-daemon
./spaceros.sh exec ros2 topic echo --once /ksp_vessel/lifecycle
./spaceros.sh exec ros2 topic echo --once /ksp_vessel/imu/data_rawTo try arbitrary Space ROS commands, open a new shell with ./spaceros.sh shell. Stop the running bridge with Ctrl+C or ./spaceros.sh stop in another terminal.
Pass bridge options after run.
./spaceros.sh run --disable-ground-truthUsing host ROS 2
Space ROS uses Cyclone DDS. Existing Jazzy applications and RViz can communicate on the same ROS_DOMAIN_ID. The default is 0, with DDS discovery set to LOCALHOST.
source /opt/ros/jazzy/setup.bash
source ~/ros2_ws/install/setup.bash
export ROS_DOMAIN_ID=0
export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
ros2 topic list --no-daemonOnly the Space ROS bridge receives UDP; host applications and RViz subscribe through DDS. Do not start another udp_bridge on the host. Keep ~/ros2_ws and the container workspace separate: do not source both overlays together or share build/ and install/. Build each environment from the same source revision.
For demos using Jazzy launch files, such as debris orbit, build and launch the demo on the host. The core ./spaceros.sh build does not include demos. To run a demo entirely in Space ROS, check whether that demo provides dedicated Space ROS instructions.
Host applications using PyLoN's custom messages need pylon_interfaces built from the same source. You can update the host workspace with ./sync.sh --skip-ksp-build --skip-ksp-sync as usual.
Validation scope
On 2026-09-21, the three packages built successfully and 119 regression tests passed with the Space ROS image above. UDP/DDS integration tests covered IMU, 2D/3D LiDAR, split RGB images, command return, command suppression on communication timeout, and reconnection.
For real KSP integration, a development launcher started a Mun rover, and we received 320×240 RGB images, 3D point clouds, IMU, a 12-link vessel model, and TF. Authority acquisition and release were checked without sending movement commands. Subscription from host ROS 2 Jazzy / Fast DDS was also validated.
Troubleshooting
- Docker socket
permission denied: Log in again after joining the Docker group, or runnewgrp docker. - UDP
Address already in use: Stop the other bridge running on the host. - Container name
pylon-spacerosalready in use: Stop it with./spaceros.sh stopbefore retrying. - Only
/pylon/statusis visible: Enter Flight in KSP and check the mod's destination and UDP ports. - Topics are invisible from the host: Match
ROS_DOMAIN_IDand discovery settings on both sides, and useros2 topic list --no-daemonto avoid a stale CLI daemon.
Official resources: Space ROS Getting Started, Official Images, Docker Installation.