mavlink
mavlink copied to clipboard
ROI supported message
Currently there is no way for an autopilot to let a ground station know if ROI is supported or not. This would be useful to know so that a ground station could enable/disable UI elements relating to ROI.
I am thinking this would be implemented as a question the GCS asks the autopilot when it connects.
Thoughts? Suggestions?
@julianoes Does the new gimbal API help with this? My guess is that it could tell you if ROI is supported, but not necessarily that it is "not supported" (i.e. in theory an MC without a gimbal could set an ROI).
My thinking is that this is useful. Can we justify a MAV_PROTOCOL_CAPABILITY?
@dakejahl could question. We discussed it in the call and found two cases:
-
Case without gimbal for multicopter: Here it's not clear. The only thing we can think of is to try the command and then the autopilot would return
RESULT_UNSUPPORTED
. We could also think of a general mechanism (like brain-stormed in the mavlink microservice proposal) where you could query support of a message and/or command in general to see if it is supported, since it's a general problem and not just ROI. -
Case with gimbal: For setups with gimbals ~I will add~ there is a capability flag to the gimbal manager indicating whether the gimbal supports ROI to the new gimbal messages. Edit: the flags are called:
GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL
andGIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL
.
My crappy suggestion would be to assume that ROI is possible if it's a multicopter or if the new gimbal protocol is used and telling you that it ROI is supported.
Thanks @julianoes .
@dakejahl FYI ... just to clarify, the general mechanism (1) would be some way to query whether any particular command or message is supported. E.g. some way of evaluating if a command would succeed or fail, without the side effect of actually executing the command. I think that is something we may well need, but would not wait on for this discussion.
What command is used for setting an ROI out of missions? MAV_CMD_DO_SET_ROI?
@dakejahl Comments?
where you could query support of a message and/or command in general to see if it is supported, since it's a general problem and not just ROI.
I think this is the right way to do it, but obviously that is a whole topic in itself. I'm in no rush for this, as QGC custom builds have a mechanism to enable/disable this and that is my use case.
FYI we are looking at case 1 above: https://github.com/mavlink/mavlink/issues/1304#issuecomment-588114751 - ie ability to test if particular command is supported or not.
@dakejahl This will be solved by the work we're doing in the component information file metadata: https://github.com/mavlink/mavlink/issues/1346
Essentially you will be able to query for what MAV_CMDs are supported in missions, and separately what MAV_CMDS are supported in diffrent modes.
A GCS will therefore be able to know cannonically if MAV_CMD_DO_SET_ROI is supported in each of those cases.
It will also be possible via the gimbal API v2 to query for presence of a gimbal.
I am closing. Yes it is not fixed yet, but this will be done.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
We're still working on support for component metadata. Very much coming soon.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.