Expand description
Hardware-independent Commander implementations.
Commanders that need an OS, files, or input devices (joysticks, CSV scripts) live in
stable-flight-sitl; they build on the ones here.
Modules§
- failsafe
- Falling back when a link-fed commander goes quiet: see
FailsafeCommander. - maneuver
- Scripted maneuvers: a
Maneuveris a short list ofSegments, each a body rate about one axis held until an angle has turned or a time has passed, or a pause, and aManeuverRunnerflies one from the attitude it starts at, then levels the wings and hands back. - touchdown
- Decides when a landing vehicle has touched down: see
TouchdownDetector. - tune_
hold - The attitude hold a plane autotune flies in:
PlaneTuneHold. - waypoint
- Follows a fixed list of waypoints, looping, holding, or landing at the end.
Structs§
- Empty
Waypoints - Returned by
WaypointFollower::newwhen given no waypoints; there is nothing to fly. - Failsafe
Commander - Flies a link-fed
primarywhile it is fresh, and afallbackotherwise. - Failsafe
Config - When a
FailsafeCommanderfalls back, and when it returns. - Hold
Commander - A
Fallbackthat holds position: when engaged, it latches where the vehicle is (horizontal position and altitude) and its arm state, then flies a waypoint there, at mostcruise_speed_mpsback to it after any drift. It never arms a disarmed vehicle. - Maneuver
- A sequence of
Segments flown in order by aManeuverRunner.Copyand fixed-size, so a script or a mission can hold one without allocating. - Maneuver
Config ManeuverRunnersettings.- Maneuver
Runner - Flies a
Maneuver: its segments in order from the attitude it starts at, then a recovery to level (RecoveryConfig), then nothing, so the caller (a script, a route) flies on. The caller decides where it starts: level, at the speed and height the maneuver needs. - Plane
Tune Hold - Flies the steady attitude hold a plane autotune’s probes ride on
(
PlaneAutotune): wings level, the pitch trimmed slowly toward trim airspeed and the thrust slowly toward the height it started at, as a pilot flies ArduPilot’s AUTOTUNE in FBWA, holding height with the throttle. A probe’s steps stand out against a hold that doesn’t move; a line held by the energy control answers a pitch step with its own pitch (#533). - Plane
Tune Hold Config PlaneTuneHoldsettings.- Touchdown
Config - What counts as stopped on the ground for a
TouchdownDetector. - Touchdown
Detector - Detects touchdown during a land (
ControlInput::Land) from the vertical speed alone. - Waypoint
Follower - A
Commanderthat flies a sequence of waypoints.
Enums§
- Route
End - What a
WaypointFollowerdoes after reaching the last waypoint.
Constants§
- DEFAULT_
HOLD_ SPEED_ MPS HoldCommander’s default speed back to the hold point, in m/s.- DEFAULT_
STOPPED_ MPS - Default
TouchdownConfig::stopped_mps: tighter than PX4’s multicopterLNDMC_Z_VEL_MAX(0.25 m/s), whose land detector also checks thrust and motion, where this one has only the vertical speed. - DEFAULT_
TOUCHDOWN_ HOLD_ S - Default
TouchdownConfig::hold_s: PX4’s multicopter land detector and ArduCopter’sLAND_DETECTOR_TRIGGER_SECboth wait 1 s.
Traits§
- Fallback
- A
Commanderthat flies while aFailsafeCommander’s primary is stale. - Linked
Commander - A
Commanderfed by a link, which knows how long ago it last heard it.