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

Survey - fix of survey tracking problem on steep slopes #23371

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Conversation

Claudio-Chies
Copy link
Contributor

Solved Problem

There was an existing problem that surveys on steep terrain had bad tracking behaviour, whereby the multicopter went far offtrack before continuing to the next waypoint.

Solution

I changed the state-logic to use 3D coordinates instead of 2d. whereby the main contributer to the problem was that the elevation of the closest point between previous and current waypoint was set to use the elevation of the current waypoint
_closest_pt = Vector3f(closest_pt_xy(0), closest_pt_xy(1), _triplet_target(2));

Changelog Entry

For release notes:

Bugfix of the survey offtrack behaviour

Test coverage

Tested in SITL

Context

Before:
2024-07-08_11-41_1
After:
2024-07-08_11-41

@Claudio-Chies Claudio-Chies marked this pull request as ready for review July 8, 2024 11:03
@sfuhrer sfuhrer requested review from bresch and MaEtUgR July 8, 2024 11:43
@MaEtUgR
Copy link
Member

MaEtUgR commented Jul 10, 2024

Thanks for looking into this and coming up with a fix! 🙏
The 3D case not working nicely sounds familiar 😬
#22331

Copy link
Member

@MaEtUgR MaEtUgR 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 the propsed fix! I think this generally makes sense, the 2D calculations are not general enough. I only found some details to improve.

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Thanks, all fixed 👍
I ran a quick simulation test with a pretty degenerate mission. It could be better but I don't see any significant devitation from the line path.
https://logs.px4.io/plot_app?log=58b8f0bf-104e-4a43-8a13-75f928adb827
image
image

@MaEtUgR MaEtUgR merged commit 33be5d8 into main Jul 11, 2024
89 of 94 checks passed
@MaEtUgR MaEtUgR deleted the pr-Survey_3D_Fix branch July 11, 2024 12:54
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants