mission_raw: add planned home position
Goes with https://github.com/mavlink/MAVSDK/pull/2115
The thing is that now it forces everybody to set that value (we can't have it optional with the auto-generation) :thinking:. I wonder if that's reasonable or not :thinking:.
Do users even use the MissionImportData directly, or is it just used in the implementation somehow?
@RomanBapst: what do you think?
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 :+1:.
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 :thinking:. 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?
@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.
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?
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?
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.
This won't go into v1.4 though but I'd say v2/main.
@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?
Sure, whatever you would use it for.