Open bkueng opened 1 week ago
FYI - tests are passing now
The only standard mode that is not set is MAV_STANDARD_MODE_SAFE_RECOVERY, as PX4 uses RTL for that (with configuration parameters).
So my thinking on this was that MAV_STANDARD_MODE_SAFE_RECOVERY
is "smart RTL", and that would be the mode you would set if you were doing an RTL that had anything other than home via straight line configure (mission, rally point etc). So if any of the params were set to non-RTL then instead of RTL you'd set this.
Are you saying that is too hard? (not arguing, trying to understand the logic).
Are you saying that is too hard?
Ok that's possible, we have to evaluate the param then. If you look at the param, which values would you map to which type? https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/rtl_params.c#L107-L117
Are you saying that is too hard?
Ok that's possible, we have to evaluate the param then. If you look at the param, which values would you map to which type? https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/rtl_params.c#L107-L117
Not that easy unfortunately - because the parameters set a mode that then depends on the existence of rally points or mission landing.
So basically the vehicle is doing Smart RTL if it is heading to a rally point/mission landing/following a mission path. You might not actually know which of those it is doing until the RTL is triggered. All of them AFAIK fall back to RTL.
What is possible here? Can we set that the smart mode is available, but only make it active conditional on the actual return target?
Either way, it sounds like we shouldn't block this PR on any of my comments.
What is possible here? Can we set that the smart mode is available, but only make it active conditional on the actual return target?
It's possible, but currently that information isn't exposed. Probably it would not be much effort to add it. So you would indicate both standard modes as available (which means the same internal mode needs to be sent out twice for both standard modes, and the GCS needs to handle that), then for mode change accept both, and as the current mode emit dynamically based on rally point vs home? Isn't that unexpected for a GCS?
See https://mavlink.io/en/messages/development.html#MAV_STANDARD_MODE. The only standard mode that is not set is MAV_STANDARD_MODE_SAFE_RECOVERY, as PX4 uses RTL for that (with configuration parameters).
Changelog Entry
For release notes: