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

Rework figure eight init #22412

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Rework figure eight init #22412

merged 3 commits into from
Nov 28, 2023

Conversation

KonradRudin
Copy link
Contributor

@KonradRudin KonradRudin commented Nov 20, 2023

Solved Problem

When the figure eight direction is changed, the vehicle flies strange pattern sometimes performing several strong turns in different directions resulting in the camera needing to pan a lot before tracking a new object reliably again.

Fixes #{Github issue ID}

Solution

  • Reworke the figure of eight initialization logic such that it initialize to a segment where less maneuvering is necessary.

Showcases of improved performance. As test the figure of eight orientation is just changed (to simulate a worst case scenario when the POI is changed from one side to the opposite side)
On current main apply new figure eight when on a circle

Screenshot from 2023-11-23 09-18-21

After fixes

Screenshot from 2023-11-23 10-34-17

On current main apply new figure eight when on a straight line segment

Screenshot from 2023-11-23 09-19-57

After fixes

Screenshot from 2023-11-23 10-33-39

@sfuhrer
Copy link
Contributor

sfuhrer commented Nov 20, 2023

Has this already been flight tested? Could you add some screen recordings if you have something that helps understanding the problem?

@RomanBapst
Copy link
Contributor

@KonradRudin MINIMUM_MINOR_TO_MAJOR_AXIS_SCALE is unused I think

RomanBapst
RomanBapst previously approved these changes Nov 21, 2023
Copy link
Contributor

@RomanBapst RomanBapst left a comment

Choose a reason for hiding this comment

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

@KonradRudin Looks very clean in general! I did not go through the maths completely, but I think I understood what the code is doing.
A simple unit tests that checks for proper initialisation would be nice but no blocker.

@KonradRudin
Copy link
Contributor Author

@sfuhrer i still wait for our test flight to test this, more prio work for now. I will attach when i have the logs

@KonradRudin
Copy link
Contributor Author

@RomanBapst I made the renaming fixes. And i added again a new (and hopefully even better initialization. Can you check again?

@KonradRudin
Copy link
Contributor Author

KonradRudin commented Nov 23, 2023

@sfuhrer I have already added some cases in the description, which should be better with the new initialization. The goal is to reduce the tight turns, and also avoid first turning in one direction, followed by another turn in the different direction. This was even worse in real flights with strong wind

@KonradRudin
Copy link
Contributor Author

@sfuhrer Here is the log of a flight test. https://review.px4.io/plot_app?log=82df7927-e6b1-47eb-9420-a471df09f049
Flight tests looks smoother with the initialization than before, there are less turns involved then prior.

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Thanks for providing the context!

@KonradRudin KonradRudin merged commit 8a68a66 into main Nov 28, 2023
89 of 90 checks passed
@KonradRudin KonradRudin deleted the rework_figure_eight_init branch November 28, 2023 09:06
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