-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
MCAttitudeController: remove reset of yaw_sp when landed #21010
MCAttitudeController: remove reset of yaw_sp when landed #21010
Conversation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
I think you're right about the checks/testing, but I'd worry about potential yawing right at takeoff and other side effects depending on heading estimation and mag issues. Maybe there's a line in between where we could respect the input while it's active (eg non-zero yaw stick), but otherwise keep the yaw setpoint tracking the estimate. |
Could make sense right. Though if you have heading estimation issues then they will now just show right when landed=false, which I think is usually very early in a takeoff sequence. |
It's not great either way, we also probably need to factor in What if we only did the yaw speed FF (straight from your yaw stick in manual/stabilized mode) out to the vehicle_rate_setpoint? |
If the issue is windup when on the ground, could we simply reset on the transition? It seems like this is a different use case than say ignoring yaw during VTOL transition. |
I'm completely with you on this issue. It's annoying for any check of yaw actuation that does not spin up a motor but uses the multicopter attitude controller e.g. tricopeter yaw servo, helicopter tail servo, tailsitter surface servos. The issue with just removing the landed check is that it then updates the absolute heading setpoint all the time and upon arming or whenever ground friction allows control control the vehicle to yaw with all effort which imposes a high risk. I think to solve this we should keep the landed or better even |
Still avoiding to build up absolute yaw error in that case.
683d23a
to
eb3ff69
Compare
Thanks @MaEtUgR for the needed additions. Makes all sense to me. Let's get some testing in. |
Tested on a small quad, didn't notice anything weird. What I tested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sfuhrer Thanks so much for addressing this, looking through my suggestions and testing it out in detail 🙏
Avoiding the dependency on |
Would make sense yes. The flag needs to be in both then because the position controller doesn't have a dependency on |
Solved Problem
No manual yaw control when landed. This e.g. makes preflight checks for yaw actuators impossible in any attitude-controlled mode (for hovering vehicles with yaw control not through differential thrust like tiltrotors or tailsitters). It's also quite confusing to have actuation of roll/pitch but not yaw.
Solution
Remove _landed check for _reset_yaw_sp.
Note that the integrals still get reset independently in the rate controller (for all axes).
I wonder if we the other two conditions (attitude_setpoint_generated and vtol_in_transition_mode) are really required as well. Why do you only want to reset yaw if (!attitude_setpoint_generated), and is the yaw reset during VTOL transition not only required for tailsitters, and there handled in the tailsitter.cpp (as the comment hints as well)?
Test coverage
Minimal SITL testing, would need some flight testing as well.
Context
Was also reported on discord: https://discord.com/channels/1022170275984457759/1063239941825503324