Heading hold on Auto missions changed in 4.5? ....unwanted yaw on corners on waypoints

Hi
I just installed Arducopter 4.5.4 and started to test it with AUTO missions. It appears that heading hold in AUTO missions is not working like in earlier Arducopter versions. Generally when copter copter is flying straight from WP to WP heading hold is steady but when there are corners and copter has to turn on this corner Waypoints it’s doing unwanted rotation in YAW. In earlier versions heading was always the same only position of the copter was changing. It is even visible in simulation in Mission Planner. That can be checked with the mission form:
https://drive.google.com/drive/folders/1Ct1O7ENSDqwj5vKnc25P0mCbuxFW9AvC?usp=drive_link
Is there any new parameter in Arducopter 4.5 to resolve this behaviour? That’s not big issue but such sudden rotation is not needed and takes some energy from battery :frowning:

That’s caused by your CONDITION_YAW commands.

Yes I know that but I think earlier copter did not rotate in yaw on each WP if the angle in heading hold was the same. @rmackay9 or someone else from developers could you verify this ?

Please check on simulation on video. On each waypoint with CONDITION_YAW copter rotates in yaw…what for why ?

@rmackay9 cloud you clarify why the copter rotates ?

Set WP_YAW_BEHAVIOR=0 and use CONDITION_YAW only when you want to change the direction the copter is facing (instead of at each waypoint).

3 Likes

Hi @norim,

Thanks for the report. I agree with @Yuri_Rage’s suggestion, that’s what I’d do.

I’m a little surprised when you say the behaviour has changed. We did fix some small bugs in the handling of CONDITION_YAW commands but I would not expect users to notice a difference unless they hit one of the edge cases that we fixed. This doesn’t look like an edge case.

In any case, from my point of view, I think it’s acting “as expected”. The yaw controller’s “mode” is reset as the vehicle passes through each waypoint with ROI being the only exception (because it has a cancel feature)

Dear Developers I am just a user of Auto WP/Survey(Grid) option in Mission Planner with selected “Grid Options/ Heading Hold”. With earlier versions of Arducopter this option worked ok. When you fly bigger 10-20kg MTOW drone that’s not nice to see that your drone rotates rapidly on every WP. I checked my parameters I have WP_YAW_BEHAVIOR on 0. And I checked this “Survey” option in Mission Planner it writes “CONDITION_YAW” for every WP and even if it is the same value copter rotates in YAW. As I understand the solution will be to delete all this “CONDITION_YAW” commands after first one? So could you fix that in Mission Planner "Auto WP/Survey (Grid) - Heading Hold " ? This options is very useful for many types of AUTO missions.

Hi @norim,

I think if you set WP_YAW_BEHAVE = 0 then the vehicle will no longer do the weird yaw after each waypoint

There is a little issue with the waypoint navigation controller that means that even though WP_YAW_BEHAVE = 0, the yaw will change slightly as the vehicle goes through waypoints. This known issue is documented here and I hope we can fix it for 4.6 but I can’t promise that yet. Until then it is actually best to leave the CONDITION_YAW commands after each waypoint.

I did simulation in Mission Planner and with WP_YAW_BEHAVE=0 copter still rotates in YAW on every CONDITION_YAW WP. That’s 10-30 degrees in YAW …the same like on video above.

and after fixing this issue 23782 there is a hope that Mission Planner survey(grid) option will be fixed also ?

So to summarize:
If I want to have constant heading hold in AUTO missions with firmware 4.5.4 I can fly with rotation in YAW on every WP or I can delete CONDITION_YAW commands after the first one and have problem with this issue: https://github.com/ArduPilot/ardupilot/issues/23782

I think booth problems should be added issues list of arducopter 4.5.