Simulation Container
| Port | Protocol | Purpose |
|---|---|---|
| 9090 | gRPC | ros2-bridge (telemetry streaming + MAVLink command relay) |
Differences from PX4
ArduPilot and PX4 are both MAVLink-based autopilots, but they differ in several ways that affect the bridge implementation:| Aspect | PX4 | ArduPilot |
|---|---|---|
| Velocity control mode | OFFBOARD | GUIDED |
| Mode switching | COMMAND_LONG with MAV_CMD_DO_SET_MODE | SET_MODE message with ArduPilot mode numbers |
| MAVLink dialect | Standard MAVLink 2 | ardupilotmega dialect with extra messages |
| Setpoint message | SET_POSITION_TARGET_LOCAL_NED | SET_POSITION_TARGET_LOCAL_NED (same) |
| Arming | COMMAND_LONG with MAV_CMD_COMPONENT_ARM_DISARM | Same, but may require arming checks to be disabled in SITL |
Velocity Control
WASM controllers write body velocity commands at 100Hz. The bridge relays these as MAVLink setpoint messages.
WASM Channels
ArduPilot drones use the sameChannelManifest::quadcopter() manifest as PX4 drones — 4 body velocity command channels and 4 position state channels at 100Hz.
Command Channels (4)
| Index | Name | Unit | Limits |
|---|---|---|---|
| 0 | body/velocity.x | m/s | -5.0 to 5.0 |
| 1 | body/velocity.y | m/s | -5.0 to 5.0 |
| 2 | body/velocity.z | m/s | -3.0 to 3.0 |
| 3 | body/yaw_rate | rad/s | -pi/2 to pi/2 |
State Channels (4)
| Index | Name | Unit | Type |
|---|---|---|---|
| 0 | body/position.x | m | Position |
| 1 | body/position.y | m | Position |
| 2 | body/position.z | m | Position |
| 3 | body/yaw | rad | Position |
vz so that positive values in the WASM controller mean “go up.”
Source Code
- Channel manifest:
crates/roz-core/src/channels.rs(ChannelManifest::quadcopter()) - MAVLink bridge:
crates/roz-worker/