ados-pilot is the drone’s on-board command authority. While the control mode is ados, it is the only thing that produces motion setpoints. It shapes operator sticks into velocity and hold setpoints, runs skill goals, map gotos and swarm goals through its obstacle planner, applies the geofence and failsafes, and streams SET_POSITION_TARGET_LOCAL_NED to a flight controller flying GUIDED.
The flight controller keeps stabilisation, the EKF, mixing and its own last-resort failsafe, which watches the pilot’s heartbeat. The pilot never replaces the flight controller; it decides what the flight controller is asked to do.
ados-pilot is a core service on the drone profile. It runs a 50 Hz decision loop and talks to the rest of the agent over its own socket, pilot.v1.
Control modes
control.mode in the agent config decides where operator sticks go.
An operator surface can change the mode at run time with the
control_mode:<mode> action. The pilot persists the change back into control.mode.
Who commands motion
Exactly one owner commands motion at a time. The pilot publishes the current owner in its state.
A skill holds a motion lease. A lease that sends no goal for one second is revoked.
The pilot stream
Operator surfaces (Mission Control’s Flight tab, the Android GCS cockpit, the on-box cockpit) connect to one WebSocket:pilot.control: call POST /api/_ws/ticket with {"scope": "pilot.control"} and the pairing key, then open the socket with the subprotocols ["ados-ws-ticket", <ticket>]. A native client passes X-ADOS-Key on the handshake. MCP tokens never receive this scope.
Frames from the agent
data carries, among others: owner, control_mode, profile, avoid, fc_mode_name, armed, landed, input_src and input_age_ms, hold_reason, avoid_state, min_clearance_m, the planned path (plan_ned), the readiness list, the link-loss action and countdown, mission progress, the active banner and surface_ops (the operations a surface may offer right now). The same body is the pilot kind on the navigation stream (WS /api/v1/nav/stream).
Frames from a surface
Each frame is JSON with anop, the surface name in src and the surface instance id in sid. The stream accepts only these ops; any other op is answered unknown_op.
Axis signs: pitch positive is forward, throttle positive is climb, yaw positive is clockwise, roll positive is right. The surface applies its own stick mode mapping and dead zone before it sends.
Actions
An unknown action answers
unknown_action. A malformed frame answers malformed.
Obstacle handling and planners
pilot.avoid sets what the pilot does near obstacles: brake (stop and hold, the default), bypass (route round them) or off. The margin is pilot.obstacle_margin_m in an open place. In a confined place (mines, tunnels, rooms) the pilot keeps pilot.prop_tip_radius_m plus 0.1 m clear, checks the mission route, and caps speed near walls.
Two planners can fly skill goals and gotos, chosen with pilot.planner:
pilot.planner_shadow: true also runs the trajectory planner beside the reactive one for skill goals and publishes its plan as a shadow that is never flown, so you can compare the two. It costs a full trajectory search every replan, so it is off by default.
Link loss and stalls
If no surface frame arrives forpilot.link_loss_s seconds, the pilot runs pilot.link_loss_action (rth, hold or land) and shows the countdown in its state. With an RC transmitter, any surface frame refreshes one shared timer. With no RC transmitter, each surface instance (sid) has its own timer, so a second surface never hides the loss of the first; an instance leaves the watch only through a bye sent while disarmed or while another instance holds the sticks.
A mission waypoint that comes less than pilot.stall_min_progress_m closer in pilot.stall_window_s holds the vehicle and alerts the operator; the stall_* keys set when it is skipped and when a confined mission returns home on its own.
pilot.rc_receiver: absent declares flight with no RC transmitter. It is accepted only under ADOS control on ArduCopter in an open place, and the pilot then caps distance from home at 50 m and height at 40 m.
Configuration
Thepilot section of /etc/ados/config.yaml:
Three more keys sit in the same section:
pilot.planner (reactive or trajectory, default reactive), pilot.planner_shadow (default false) and pilot.max_pose_sigma_m (default 5, 1.5 to 50: the external position’s one-sigma horizontal uncertainty above which the pilot treats it as unverified). See Configuration.
Related
Aircraft setup
The setup and tuning wizards the pilot runs.
Swarm bus
The position beacon every drone hears, with no ground station in the path.