mavlink icon indicating copy to clipboard operation
mavlink copied to clipboard

ROI supported message

Open dakejahl opened this issue 5 years ago • 12 comments

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?

dakejahl avatar Feb 15 '20 20:02 dakejahl

@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?

hamishwillee avatar Feb 17 '20 00:02 hamishwillee

@dakejahl could question. We discussed it in the call and found two cases:

  1. 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.

  2. 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 and GIMBAL_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.

julianoes avatar Feb 19 '20 09:02 julianoes

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?

hamishwillee avatar Feb 25 '20 18:02 hamishwillee

@dakejahl Comments?

hamishwillee avatar Mar 04 '20 05:03 hamishwillee

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.

dakejahl avatar Mar 07 '20 00:03 dakejahl

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.

hamishwillee avatar Apr 01 '20 03:04 hamishwillee

@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.

hamishwillee avatar Apr 29 '20 04:04 hamishwillee

I am closing. Yes it is not fixed yet, but this will be done.

hamishwillee avatar May 12 '20 23:05 hamishwillee

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Jul 12 '20 01:07 stale[bot]

We're still working on support for component metadata. Very much coming soon.

hamishwillee avatar Jul 12 '20 23:07 hamishwillee

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Sep 11 '20 02:09 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Nov 22 '20 08:11 stale[bot]