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

HomePosition: Home position only changes on ground after minimum horizontal and vertical displacement #23025

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KonradRudin
Copy link
Contributor

Solved Problem

When the vehicle is not yet armed and on the ground, the home position is allowed to change when it is detected that the vehicle position has changed. When the EKF estimator is initialized the home position is changed if the local position change is higher than the estimated deviations in eph and epv. Those can be pretty small number ( <15cm in my tests) although the altitude might change more. This leads to a lot of new home position changes before taking off. However those changes are unnecessary, as the home position is set again when taking off. Changing the home position that often can negatively influence other modules depending on the home position (as the e.g. the mission validity).

Solution

  • Add a minimum horizontal distance of 1m needed horizontally and 1.5m vertically before changing the home position.
  • Refactor ...

Changelog Entry

For release notes:

Feature: Home position only changes on ground after minimum horizontal and vertical displacement.

Test coverage

  • simulation tests: using make px4_sitl gazebo-classic_standard_vtol and observing the home_position uOrb topic

@dagar
Copy link
Member

dagar commented Apr 19, 2024

The other thing you could do is only update it here if not moving.

@KonradRudin
Copy link
Contributor Author

The other thing you could do is only update it here if not moving.

And how would you do that? Alo check on the velocity? Could still lead to the same issue i guess.

@KonradRudin
Copy link
Contributor Author

Also here for completeness a plot from the home position changes before this PR, you can see, that the home position does change several times although the vehicle did not move and according the the eph and epv position converged already.w
Screenshot from 2024-04-19 16-31-05

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.

None yet

3 participants