Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: Keep FIXED mode when WP_YAW_BEHAVIOR is NONE #28235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tatsuy
Copy link
Contributor

@tatsuy tatsuy commented Sep 26, 2024

This PR improves the CONDITION_YAW behavior when WP_YAW_BEHAVIOR is set to NONE.

Previously, Yaw Mode would switch to HOLD when reaching a waypoint.
This meant that even if CONDITION_YAW was used, its effect would be reset upon reaching each WAYPOINT. As a result, the vehicle's yaw could potentially drift due to external factors like wind.

With this change, when WP_YAW_BEHAVIOR is NONE and CONDITION_YAW has been used (resulting in FIXED mode), the yaw remains in FIXED mode even after reaching WAYPOINT, maintaining the desired heading as specified by CONDITION_YAW.

Before
image

After
image

Settings:

  • WP_YAW_BEHAVIOR=0 (None)
  • Used CONDITION_YAW with Deg = 10, Speed = 0, Dir = 0, Abs = 0.

Testing:
SITL testing was performed to confirm the behavior. To create a challenging environment for yaw control and to introduce yaw error, the following parameters were used to simulate wind and turbulence.

  • SIM_WIND_SPD = 10
  • SIM_WIND_TURB = 10

With these settings, the updated implementation successfully maintained the yaw as expected, with FIXED mode persisting throughout WAYPOINT without reverting to HOLD.

@rmackay9
Copy link
Contributor

It's so great to see this fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants