-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
Include planned home position in MissionImportData #2115
base: v1.4
Are you sure you want to change the base?
Conversation
…tion such that the mission can be properly moved to the vehicle location
1c4590a
to
b41a05b
Compare
…from mission Signed-off-by: RomanBapst <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks. Couple of comments inline.
* brief Demonstrates how to move a mission loaded from a .plan file such that the planned home | ||
* position if present or the first waypoint is colocated with the vehicle position. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* brief Demonstrates how to move a mission loaded from a .plan file such that the planned home | |
* position if present or the first waypoint is colocated with the vehicle position. | |
* Demonstrates how to move a mission loaded from a .plan file such that the planned home | |
* position (if present) or the first waypoint is colocated with the vehicle position. |
REQUIRE(std::isfinite(position.latitude_deg)); | ||
REQUIRE(std::isfinite(position.longitude_deg)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a test but and example, right?
offset_y = import_res.second.mission_items[0].y - | ||
static_cast<int32_t>(1e7 * position.longitude_deg); | ||
} | ||
for (auto &item : import_res.second.mission_items) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs tools/fix_style.sh .
applied.
@julianoes Thanks for the review, I wasn't actually done with this, just wanted to get it to compile (thanks to @JonasVautherin for helping with that). I can now wrap it up hopefully. |
Signed-off-by: RomanBapst <[email protected]>
@RomanBapst are you still planning to finish this? I think it would have to go into v2 though which is about to be released. |
@julianoes Yes, I would still like to bring this in. I was plagued by compiling issues which turned out to be related to my cmake version, as @JonasVautherin could not reproduce. I got that under control but then never got to push it over the finish line. |
The planned home position is useful for moving a planned mission to the current location of the vehicle. Using the first mission item (as was done until now in the PX4 integration tests) is not correct for a VTOL mission containing a VTOL takeoff item.
Note:
Ardupilot missions contain the planned home location as the first mission item AFAIK. So the information in that case is duplicated.