Skip to content

Topic Reference ​

Topics belonging to the active vessel use /ksp_vessel; topics belonging to the bridge process use /pylon. Directions in the tables are described from the ROS2 node side.

Types use the ROS 2 package/msg/TypeName notation. Follow type links to fields, constants, and raw definitions. Browse all custom types in Message and Service Types.

Bridge ​

DirectionTopicTypeQoS / content
Publish/pylon/statusstd_msgs/msg/StringReliable / Transient Local; bridge status
Publish/pylon/diagnosticsdiagnostic_msgs/msg/DiagnosticArrayMotor diagnostics and Wrench allocation residuals

IMU ​

Sensor timestamp intervals preserve KSP physics time. Their offset does not jump during Flight to match network latency or rendering speed. Lifecycle is generated from a session heartbeat independent of sensors. udp_bridge --disable-ground-truth disables all Ground Truth topics and world TF; VesselLifecycle.world_frame is empty in this mode. runtime_instance, runtime_epoch, and runtime_generation identify the KSP session; generation and origin_sequence are ROS-side generations updated on vessel switches, time rewind, and recovery from session timeout.

Every vessel outputs a three-axis gyroscope and accelerometer for the active vessel without extra parts or configuration. The same topic is used across vessel switches.

DirectionTopicTypeQoS / content
Publish/ksp_vessel/imu/data_rawsensor_msgs/msg/ImuBest Effort / Volatile / depth 10; on physics sample updates, up to 30 Hz

header.frame_id=base_link, with X forward, Y left, Z up. angular_velocity is relative to the inertial frame in rad/s (planet rotation is added in KSP's rotating physics frame). linear_acceleration is specific force in m/s² (inertial acceleration minus gravity): about +g when stationary with Z up, about zero in free fall. KSP's perturbation_immediate is transformed into vessel axes without added noise or bias. Absolute attitude is not measured, so orientation_covariance[0]=-1; angular velocity and acceleration covariances are all zero to indicate unknown values. This corresponds to imu/data_raw in REP-145.

Timestamps map KSP simulation time to the existing bridge clock. No new measurements are output outside Flight, while packed, or while paused. One sample is skipped immediately after loading, a vessel switch, or unpacking. The virtual sensor expresses specific force at the vessel's center of mass in vessel axes; rotational acceleration at individual part positions is not modeled. No separate topics are created for inactive vessels.

Star tracker ​

DirectionTopicTypeContent
Publish/ksp_vessel/star_tracker/<id>/statepylon_interfaces/msg/StarTrackerStateAttitude, covariance, validity, and measurement failure reason together
Publish/ksp_vessel/star_tracker/<id>/attitudegeometry_msgs/msg/QuaternionStampedValid inertial attitude only

With the dedicated part installed, publication defaults to 5 Hz, Reliable / Volatile / depth 10. Position is not measured. When state.valid=false, the quaternion is all zero and the first covariance element is −1. Communication loss also reports stale. See Star Tracker for frames, constraints, reacquisition, and topic lifetime.

Vessel and model ​

DirectionTopicTypeQoS / content
Publish/ksp_vessel/simulator/statepylon_interfaces/msg/SimulatorStateReliable / Transient Local; pause, warp, packed, communication, and UT advancement
Publish/ksp_vessel/simulator/universal_timestd_msgs/msg/Float64KSP UT [s]; Reliable / Transient Local. Constant while paused, decreasing on rewind
Subscribe/ksp_vessel/control/batchpylon_interfaces/msg/ControlBatchReliable; ordered renewal → attitude → thrust → separation
Publish/ksp_vessel/control/snapshotpylon_interfaces/msg/ControlSnapshotReliable; flight, all engines, and separators from the same frame. Disabled without Ground Truth
Publish/ksp_vessel/health/powerpylon_interfaces/msg/VehicleHealthCharge, capacity, and balance estimate with quality, 2 Hz
Publish/ksp_vessel/health/thermalpylon_interfaces/msg/PartThermalStatePer-part temperature, limits, shielding, and charge, 2 Hz
Publish/ksp_vessel/lifecyclepylon_interfaces/msg/VesselLifecycleReliable / Transient Local; actual vessel ID and frame lifecycle
Subscribe/ksp_vessel/control/authority/commandpylon_interfaces/msg/ControlAuthorityCommandReliable; lease, SAS exclusion, and e-stop
Publish/ksp_vessel/control/authority/statepylon_interfaces/msg/ControlAuthorityStateReliable / Transient Local; confirmed owner
Subscribe/ksp_vessel/control/wrench_commandpylon_interfaces/msg/BodyWrenchCommandReliable。lease-bound base_link Wrench
Subscribe/ksp_vessel/control/flight_commandpylon_interfaces/msg/FlightControlCommandReliable; stock steering inputs and landing gear with a lease
Publish/ksp_vessel/ground_truth/flightpylon_interfaces/msg/FlightStateBest Effort; altitude, orbit, fuel, ground contact, and surface axes in body frame. Disabled without Ground Truth
Publish/ksp_vessel/control/wrench_feedbackpylon_interfaces/msg/WrenchFeedbackrequested / allocated / achieved / residual
Publish/ksp_vessel/ground_truth/posegeometry_msgs/msg/PoseStampedBest Effort; ENU position and attitude
Publish/ksp_vessel/ground_truth/nearby_vesselspylon_interfaces/msg/NearbyVesselsAbsolute positions and velocities of own and nearby vessels at the same time and origin. Up to 32 vessels within 2500 m, on the same celestial body, loaded/unpacked
Publish/ksp_vessel/ground_truth/twistgeometry_msgs/msg/TwistStampedBest Effort; ENU velocity
Publish/ksp_vessel/ground_truth/twist_bodygeometry_msgs/msg/TwistStampedBest Effort; body velocity
Publish/ksp_vessel/ground_truth/frame_angular_velocitygeometry_msgs/msg/Vector3StampedRotation rate of planet-fixed ENU axes relative to the inertial frame, for evaluator comparison with inertial estimates
Publish/ksp_vessel/ground_truth/accelerationgeometry_msgs/msg/AccelStampedBest Effort; ENU acceleration
Publish/ksp_vessel/joint_statessensor_msgs/msg/JointStateState of all ROS servos
Publish/ksp_vessel/robot_descriptionstd_msgs/msg/StringReliable / Transient Local; proxy URDF
Publish/ksp_vessel/root_framestd_msgs/msg/StringReliable / Transient Local; RViz Fixed Frame name
Publish/tftf2_msgs/msg/TFMessageDynamic TF for Ground Truth and the CoM-based proxy root
Publish/tf_statictf2_msgs/msg/TFMessageFixed proxy joints and sensor mounts

Ground Truth ENU axes are planet-fixed. Ground Truth angular velocity is relative to these axes and is unaffected by altitude-dependent changes in KSP physics frames. For comparisons with inertial IMU attitude, the evaluator adds coordinate rotation and velocity transport terms using frame_angular_velocity. Demo estimators and controllers do not subscribe to this topic.

Sensors ​

DirectionTopicType
Publish/ksp_vessel/lidar_2d/<lidar_2d_id>/scansensor_msgs/msg/LaserScan
Publish/ksp_vessel/lidar_3d/<lidar_3d_id>/pointssensor_msgs/msg/PointCloud2
Publish/ksp_vessel/camera/<camera_id>/image_rawsensor_msgs/msg/Image
Publish/ksp_vessel/camera/<camera_id>/camera_infosensor_msgs/msg/CameraInfo
Publish/ksp_vessel/docking_ports/<id>/camera/image_rawsensor_msgs/msg/Image
Publish/ksp_vessel/docking_ports/<id>/camera/camera_infosensor_msgs/msg/CameraInfo

Set LiDAR and RGB camera IDs with Edit ROS2 Sensor ID in the VAB/SPH. New parts receive automatic lidar_2d_..., lidar_3d_..., or camera_... IDs. Sensor topics are created on the first complete data and removed on an inactive notification or silence for --topic-timeout-sec.

Typed actuators ​

Each type shares one command / state pair instead of per-instance topics. Every command selects its target with id, and state includes the source id. State name is an equivalent alias for existing clients.

TargetCommand TopicState TopicType
ROS servo / linear motor/ksp_vessel/actuators/servo/command/ksp_vessel/actuators/servo/statepylon_interfaces/msg/MotorCommand / pylon_interfaces/msg/MotorState
Stock KSP wheel/ksp_vessel/actuators/wheel/command/ksp_vessel/actuators/wheel/statepylon_interfaces/msg/WheelCommand / pylon_interfaces/msg/WheelState
Engine/ksp_vessel/actuators/propulsion/command/ksp_vessel/actuators/propulsion/statepylon_interfaces/msg/EngineCommand / pylon_interfaces/msg/EngineState
RCS module/ksp_vessel/actuators/rcs/command/ksp_vessel/actuators/rcs/statepylon_interfaces/msg/RcsCommand / pylon_interfaces/msg/RcsState
Decoupler / fairing/ksp_vessel/actuators/separation/command/ksp_vessel/actuators/separation/statepylon_interfaces/msg/SeparationCommand / pylon_interfaces/msg/SeparationState

Operations and topics always target active_vessel. Commands execute while PyLoN has authority; omitted vessel_id / controller_id / lease_id / sequence values are filled by the bridge. Authority is either STATE_PLAYER or STATE_PYLON, with emergency stop as a separate flag. Commands use Reliable / Volatile / depth 10. Normal state uses Best Effort / Volatile / depth 10; separation state uses Reliable / Transient Local / depth 10.

Separation results use /ksp_vessel/actuators/separation/result (pylon_interfaces/msg/SeparationResult, Reliable / Transient Local). The query service is /ksp_vessel/actuators/separation/get_result (pylon_interfaces/srv/GetSeparationResult). See Vehicle Control API for retention, identity, and snapshots.

Docking ports ​

DirectionTopicType
Publish/ksp_vessel/docking_ports/<id>/statepylon_interfaces/msg/DockingPortState
Subscribe/ksp_vessel/docking_ports/<id>/commandpylon_interfaces/msg/DockingPortCommand

The default <id> is docking_port_<persistentId>_<moduleIndex>. Commands provide SELECT_CAMERA, STOP_CAMERA, and RELEASE.

Main startup arguments ​

TargetArgumentDefault
Vessel sensors--topic-prefix/ksp_vessel
Bridge status--bridge-prefix/pylon
Diagnostics--diagnostics-topic/pylon/diagnostics
Wrench command--body-wrench-command-topic/ksp_vessel/control/wrench_command
Authority command--control-authority-command-topic/ksp_vessel/control/authority/command
Authority state--control-authority-state-topic/ksp_vessel/control/authority/state
Wrench feedback--wrench-feedback-topic/ksp_vessel/control/wrench_feedback
Vessel lifecycle--vessel-lifecycle-topic/ksp_vessel/lifecycle
Ground Truth--ground-truth-prefix/ksp_vessel/ground_truth
Actuators--actuators-prefix/ksp_vessel/actuators
Docking ports--docking-ports-prefix/ksp_vessel/docking_ports
joint state--joint-states-topic/ksp_vessel/joint_states
URDF--robot-description-topic/ksp_vessel/robot_description
root frame--root-frame-topic/ksp_vessel/root_frame

Check all options with ros2 run pylon_bridge udp_bridge --help.

Guides and API references for building ROS2 applications with PyLoN