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

mission_raw: add planned home position #323

Closed
wants to merge 1 commit into from

Conversation

JonasVautherin
Copy link
Collaborator

@JonasVautherin JonasVautherin commented Aug 15, 2023

Goes with mavlink/MAVSDK#2115

The thing is that now it forces everybody to set that value (we can't have it optional with the auto-generation) 🤔. I wonder if that's reasonable or not 🤔.

Do users even use the MissionImportData directly, or is it just used in the implementation somehow?

@RomanBapst: what do you think?

@JonasVautherin
Copy link
Collaborator Author

The thing is that now it forces everybody to set that value

Ok now it has a has_planned_home_position boolean to say whether that field is set or not 👍.

Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

But this won't have any effect for PX4, which would be confusing.

Plus, from what I hear this home position is mostly not used for ArduPilot.

Or maybe I'm misunderstanding this. Are we talking about the ArduPilot feature where home needs to be in 0, or are we talking about a general functionality that allows a mission to be moved to where the vehicle is?

@JonasVautherin
Copy link
Collaborator Author

JonasVautherin commented Aug 16, 2023

But this won't have any effect for PX4, which would be confusing.

I think it is just part of the parsing of a QGC .plan, in this case made for PX4 🤔. My understanding is that we already do parse it, it's just that we ignore this element (and therefore lose it in translation). In this case Roman needs this element for the PX4 integration tests, I believe.

Are we talking about the ArduPilot feature where home needs to be in 0

I am not completely sure what this "planned home position" is. Maybe @RomanBapst can elaborate a bit here?

@RomanBapst
Copy link

@julianoes For the PX4 integration tests I need to be able to move the mission to the location of the vehicle.
We already do this here
However, what we do is to move the mission such that the first waypoint coincides with the vehicle position. For a VTOL mission this is not correct as the first waypoint is a VTOL takeoff which actually specifies a transition direction and should not be places over the vehicle.
That's why I needed to get hold of the planned home position which I saw MAVSDK did not expose yet and thus the PR.

@julianoes
Copy link
Collaborator

I see. So what's the behavior if someone sets that field and then the home position is different from the planned one? Is everything shifted?

@RomanBapst
Copy link

So what's the behavior if someone sets that field and then the home position is different from the planned one? Is everything shifted?

@julianoes This is not really the problem of MAVSDK, is it? All that MAVSDK does it telling the user that the plan file which has been loaded contains a planned home position and the values are such and such. The integrator can use that (I am using is for integration testing) but MAVSDK should not care. Does that make sense?

@julianoes
Copy link
Collaborator

Oh, now I understand! This has nothing to do with upload. Sorry, I missed that. Hm, ok. Would be nice to have an example that shows how to use the value, if set. Or at least make it very clear from the description of the field. And make sure to fix the linting/CI.

@julianoes
Copy link
Collaborator

This won't go into v1.4 though but I'd say v2/main.

@RomanBapst
Copy link

@julianoes I will try to add an example. Maybe loading a VTOL mission from a plan file and making sure that the distance between planned home and the VTOL takeoff item is more than X?

@julianoes
Copy link
Collaborator

Sure, whatever you would use it for.

@julianoes julianoes deleted the 1.4-mission-raw-home-position branch May 23, 2024 02:17
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