-
Notifications
You must be signed in to change notification settings - Fork 14k
Make hover throttle more predictable in mc-stabilized mode #24710
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
Conversation
d747cb2
to
1b02f9c
Compare
I added some suggestions I had and we discussed some of them in person. |
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.
Thanks! Shouldn't we also respect MPC_USE_HTE? I know it's an MPC param, but now that the HTE is used in manual mode I think it should apply to both.
src/modules/mc_pos_control/multicopter_stabilized_mode_params.c
Outdated
Show resolved
Hide resolved
The thing is, some users may still want to use HTE for Position mode, while keeping the estimate disabled for throttle curve rescaling in stabilized mode. In this PR, I tried to make it clear in the description of MPC_USE_HTE that this parameter is not used in mc-stabilized mode. |
src/modules/mc_pos_control/multicopter_position_control_params.c
Outdated
Show resolved
Hide resolved
src/modules/mc_pos_control/multicopter_stabilized_mode_params.c
Outdated
Show resolved
Hide resolved
src/modules/mc_pos_control/multicopter_stabilized_mode_params.c
Outdated
Show resolved
Hide resolved
src/modules/mc_pos_control/multicopter_stabilized_mode_params.c
Outdated
Show resolved
Hide resolved
As the discussion around proposed parameters arose, it was decided to separate the solution related to jump in throttle curve scaling from changes in parameters. So now on, this PR will focus only on solving scaling issue |
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.
Thanks for doing the adjustments.
I just realized me merging #24664 generated conflicts 🙈 I can fix them if you like.
Fix formating
- Slower slew rate - Move update of hover thrust estimate into main loop - Make sure dt for slew rate is correct - Apply parameter updates if hover thrust estimate not used - Parameter description in metadata files
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
0c915bd
to
6325f22
Compare
No flaws found |
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.
I just fixed the conflicts which were only related to neighbouring lines that I had removed in #24664
The pr still adds the originally intended options but I'm following up with a pr to reduce the number of options if that's ok. No need to delay the fix for unexpected throttle scaling jumps on the main branch here. Thanks for your efforts 🙏 |
Here's one follow up reducing configuration options: #24751 |
Current behavior
Throttle curve rescaling using the Hover Thrust Estimator (HTE) causes throttle jumps, making the throttle response unpredictable for the pilot (see #24654).
Proposed solution
A slew rate will be applied to the hover thrust used for throttle scaling. This will allow the hover throttle to gradually adjust towards the estimated value, improving predictability for the pilot.
Changes
@bresch @MaEtUgR