Skip to content

Support target yaw on NAV_WAYPOINT or LOITER to hold position until heading is reached #33238

@Mcluky

Description

@Mcluky

Feature Request

Is your feature request related to a problem? Please describe.
Currently, there is no reliable way to make a vehicle complete a yaw rotation at a waypoint before proceeding to the next navigation command. This is a common requirement for inspection and survey missions where the camera must face a specific direction before capturing an image.

CONDITION_YAW only gates DO commands - it does not prevent NAV command advancement. The NAV and DO/Condition tracks run completely independently in APMission::update(). This means the vehicle starts flying to the next waypoint immediately, regardless of whether the yaw rotation has completed.

Real-world example:

A building inspection mission requires the vehicle to:
Fly to a waypoint
Rotate to face the building facade
Take a photo once the yaw rotation is complete
Fly to the next inspection point

The intuitive mission plan would be:

NAV_WAYPOINT A
CONDITION_YAW 180°, 30°/s, CW
DO_DIGICAM_CONTROL <- take photo after yaw is complete
NAV_WAYPOINT B

Expected behavior: the vehicle stays at WP A, rotates to 180°, takes the photo once the rotation is complete, then proceeds to WP B.

Actual behavior: the vehicle immediately starts flying toward WP B as soon as WP A is reached. CONDITIONYAW only delays the DODIGICAM_CONTROL command - it does not hold the vehicle in place. The photo is taken mid-flight after the yaw finishes, potentially far from WP A and while the vehicle is moving.

The only workaround today is a hardcoded NAV_DELAY:

NAV_WAYPOINT A
CONDITION_YAW 180°, 30°/s, CW
NAV_DELAY 7 sec <- guess: 180° / 30°/s = 6s + margin
DODIGICAMCONTROL
NAV_DELAY 1 sec
NAV_WAYPOINT B

This is unreliable because:
The required delay depends on the vehicle's heading at arrival, which varies based on approach direction from the previous waypoint. A full 180° turn at 30°/s takes 6s, but the vehicle might arrive already close to the target heading.
If the delay is too short, the photo is taken before yaw completes. If too long, the vehicle wastes time hovering unnecessarily.
For missions with many inspection points at different headings, every waypoint needs a manually calculated NAV_DELAY, making the mission fragile and hard to maintain.
Unlike CONDITION_DELAY (which has a NAV equivalent in NAV_DELAY), there is no NAV equivalent for "wait until yaw reaches target heading."

Describe the solution you'd like

Support a yaw parameter in NAV_WAYPOINT or LOITER commands.

NAV_WAYPOINT and the LOITER commands officially support the yaw angle, just Ardupilot doesn't support it yet.

NAV_WAYPOINT A, yaw=180°

The waypoint would only verify as complete once BOTH the position acceptance radius is met AND the vehicle has reached the target yaw heading.

Describe alternatives you've considered
Allow CONDITION_YAW to gate NAV advancement.

Add a parameter to CONDITION_YAW (using one of the unused/reserved fields) that indicates "also hold position until yaw is complete." The NAV track would check if a blocking condition is active before advancing. Backward-compatible since existing missions wouldn't set the flag.

Platform

  • All
  • AntennaTracker
  • Copter
  • Plane
  • Rover
  • Submarine

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions