-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
WIP: Manual attitude setpoint for large heading errors #4564
Conversation
A good way to test this:
By doing the above steps the copter will no longer have absolute yaw control but you can still make it turn in yaw since there is a FF on the rates. In this situation you can produce an arbitrary yaw error and verify that roll and pitch commands match the users intuition. |
Log where absolute yaw control was disabled -> arbitrary high yaw error: User was still able to control roll and pitch as he expected: Log where absolute yaw control was enabled |
@Tumbili The logic looks right, but I would like to clarify if the only derivation we can choose is through the proposed mix of euler angles, quaternions, trigonometric functions and rotation matrices. It would be good to have a second pass and see if we can't express this more compact using entries of a rotation matrix. I'm concerned that while we fix the common yaw case we might miss extreme angles, in particular for racers. |
such that it reflects the users intuition of roll and pitch for any given heading error
@LorenzMeier Tested in SITL and the behaviour is exactly the same. Maybe I can try to add even better comments. |
Looks good, thanks! |
* mc pos control: in manual mode calculate attitude setpoint such that it reflects the users intuition of roll and pitch for any given heading error * added some comments on the new manual attitude setpoint generation * make calculation shorter
Thanks for the quick fix of this issue, I'm sure a lot of users will really appreciate it. I've back ported this to master. |
* mc pos control: in manual mode calculate attitude setpoint such that it reflects the users intuition of roll and pitch for any given heading error * added some comments on the new manual attitude setpoint generation * make calculation shorter
mc pos control: In manual mode calculate attitude setpoint such that it reflects the users intuition of roll and pitch for any given heading error.
TODO:
Fixes #4556
Fixes #3620