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

Position Control Limit Handling #22428

Merged
merged 9 commits into from Dec 30, 2022

Conversation

lthall
Copy link
Contributor

@lthall lthall commented Dec 17, 2022

This PR improves the handling of limits in the position controller and clarifies some of the code.

  1. Fixes problem where limits can result in the aircraft overshooting the stopping point. This was seen during a landing where the aircraft becomes limited during the early deceleration phase. This slides the stopping point past the intended altitude resulting in a possible "hard landing".
  2. Moves the removal of ignore_descent_limit from input_vel_accel_z to land_at_climb_rate_cm (a better name would be nice). This simplifies the use of input_vel_accel_z for the vast majority of use cases and clarifies the use of land_at_climb_rate_cm.
  3. A few efficiency clean ups
  4. Math library changes to support 1.
  5. Math library changes to prevent limits from altering the velocity vector direction.

ArduPlane/quadplane.cpp Outdated Show resolved Hide resolved
@lthall lthall force-pushed the 20221217_PosControl_Limit_Handling branch 2 times, most recently from 865d91d to 2263292 Compare December 19, 2022 14:17
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll help with a test suite for these

ArduPlane/quadplane.cpp Show resolved Hide resolved
@tridge
Copy link
Contributor

tridge commented Dec 27, 2022

@rmackay9 needs your approval

@lthall lthall force-pushed the 20221217_PosControl_Limit_Handling branch from 1f3b9d3 to 414b950 Compare December 27, 2022 05:13
@lthall lthall force-pushed the 20221217_PosControl_Limit_Handling branch from 414b950 to 3a73c41 Compare December 30, 2022 10:01
@rmackay9 rmackay9 merged commit aeb25ca into ArduPilot:master Dec 30, 2022
@rmackay9
Copy link
Contributor

Merged, thanks!

@rmackay9 rmackay9 added this to Pending in Copter 4.3 Jan 3, 2023
@rmackay9
Copy link
Contributor

rmackay9 commented Jan 7, 2023

This is included in 4.3.3-rc1

@rmackay9 rmackay9 moved this from Pending to 4.3.3-rc1 in Copter 4.3 Jan 7, 2023
@lthall lthall deleted the 20221217_PosControl_Limit_Handling branch August 9, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Copter 4.3
4.3.3-rc1
Plane 4.3
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

5 participants