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

Landing horizontal velocity compensation / unsteady landing #23546

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

Claudio-Chies
Copy link
Contributor

@Claudio-Chies Claudio-Chies commented Aug 14, 2024

Solved Problem

There was a problem where triggering Land, while having a forward velocity, the landing algorithm didn't compensate it, meaning the vehicle remained drifting while getting closer to the ground , and in some cases jerking unsteadily

Solution

i set the target landing location based on the current velocity, maximum acceleration and jerk. this way the drone is able to compensate the velocity and land smoothly at the target location.

Changelog Entry

  • changed the lat and long in the triplet generation process in the navigator to be at a location in front of the vehicle, dependent on its current state.
  • set the previous setpoint triplet to be the same as the target one, this way we avoid getting into offtrack mode.
Bugfix: Unsteady landing with horizontal velocity
Documentation: the position set point for landing gets set to a location in front of the vehicle where its able to halt before. greatly improving landing performance when triggering landing while moving

Test coverage

SITL and on Hardware

@Claudio-Chies Claudio-Chies requested a review from MaEtUgR August 14, 2024 14:04
@sfuhrer
Copy link
Contributor

sfuhrer commented Aug 14, 2024

@Claudio-Chies looks clean but I need to look at it in more detail. Do you know which change caused this regression (assuming it is a regression)?

@Claudio-Chies
Copy link
Contributor Author

Claudio-Chies commented Aug 14, 2024

@sfuhrer Not yet, i can have a look into it.
I realized just now, that this might enable us zo get rid of the special case for vtol where the landing position is hardcoded 1m infront of the current position.

@sfuhrer sfuhrer requested review from bresch and removed request for MaEtUgR August 15, 2024 08:18
Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

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

_target is the _triplet_target pre-processed by the flight task. The general rule is that we shouldn't use _triplet_target in the code and only use _target as this is used everywhere else otherwise there will be an inconsistency between the different parts of FlightTaskAuto.

If I understand correctly using _triplet_target fixes the issue because it skips _updateInternalWaypoints. Could you rather find why _updateInternalWaypoints changes it and fix the problem there?

@Claudio-Chies
Copy link
Contributor Author

Claudio-Chies commented Aug 15, 2024

_target is the _triplet_target pre-processed by the flight task. The general rule is that we shouldn't use _triplet_target in the code and only use _target as this is used everywhere else otherwise there will be an inconsistency between the different parts of FlightTaskAuto.

If I understand correctly using _triplet_target fixes the issue because it skips _updateInternalWaypoints. Could you rather find why _updateInternalWaypoints changes it and fix the problem there?

good point, didn't know that. so the issue seems that it goes into offtrack mode.
with the change proposed it avoids offtrack mode by setting the previous triplet to be the same as the target.

@Claudio-Chies Claudio-Chies requested a review from bresch August 15, 2024 17:51
@Claudio-Chies Claudio-Chies force-pushed the pr-unsteady_landing branch 2 times, most recently from de796db to fa39e34 Compare August 16, 2024 13:35
src/modules/navigator/land.cpp Outdated Show resolved Hide resolved
@Claudio-Chies Claudio-Chies changed the title landing horiziontal velcotiy compensation / unsteady landing Landing horizontal velocity compensation / unsteady landing Aug 16, 2024
@sfuhrer sfuhrer merged commit e29a36a into main Aug 19, 2024
96 checks passed
@sfuhrer sfuhrer deleted the pr-unsteady_landing branch August 19, 2024 06:01
vertiq-jordan pushed a commit to iq-motion-control/PX4-Autopilot that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants