-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Protocol-level discovery which mission items / commands are supported by an autopilot #1339
Comments
I would like to see this tie into a higher level concept of asking the vehicle for all of it's known information. Something like:
I see the higher level umbrella support as important to work through such that it can then support any sort of vehicle factoid with supported commands being only a single example. |
FYI: The QGC implementation of this is doc'ed here: https://dev.qgroundcontrol.com/en/plan/MissionCommandTree.html. All of which should be mavlink spec somehow, since it doesn't make sense for a gcs to have this level of metadata hardcoded into it. |
Quick and dirty explanation of top level metadata query mechanism.Each metadata type format is spec'ed out as part of the mavlink spec:
Ask the vehicle for some metadata:
Vehicle responds with:
So a GCS would first ask for AVAILABLE_TYPES to understand what is available. It would then query specific information. This isn't meant to be even remotely close to complete. It is just meant to explain the concept of a possible high level metadata discovery mechanism. |
@julianoes @LorenzMeier When you look at it this way, then the proposal becomes a component definition file returned by COMPONENT_INFORMATION. I like that more because then when we get a new information type we're discussing what information is useful, not what mechanisms are used to get it. To make this work as @DonLakeFlyer indicates we would need to add support for
Looking at that message I also wonder if we should future proof the size of the Then the first XML type definition might be as discussed with @julianoes (shown in JSON, but we need to agree formats)
Don, I can see this helping us with getting some of those other defaults we talked about like default cruise speed. However it isn't a full solution because some things like default yaw in missions can change dynamically without a reboot. So for those we will still need a mechanism to be able to query explicitly and be notified on change. |
I'm glad to see that COMPONENT_INFORMATION is being mentioned here. In fact, I was trying to promote this mechanism (and failed). It would be great if it's potential would be started to be exploited. ;) The same mechanism could be used e.g. for
and all this info could be used by a GCS in a generic way to be displayed and handled in a generic way. Don't reinvent a new wheel for each problem which conceptually are of similar nature. One good wheel is more worth than many not so good wheels :) |
This is correct. |
@julianoes Worth checking #1339 (comment) to see if we need more than just the supported parameters captured. I am pretty sure that we do not - the vehicle specific parameter stuff will be captured by what we are doing. The other metadata like labels, defaults etc is already in the XML definitions - it is just up to GCS to start using it. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
@julianoes In another discussion it came up that we don't know whether a flight stack supports terrain following for mission items with positional information. More generally we don't know anything about any of the frames. Does it make sense to include this in the metadata?
Though perhaps systems generally only support all of a particular set so we could have a default "supported_frames" that gets over-ridden.
Or more generally, how would you solve this problem Don and Julian |
I don't think you can add this to the metadata. The metadata can only support information which is constant. For example in ArduPilot terrain support is turned on/off through a parameter. Or at least it won't solve the terrain frame problem. |
@DonLakeFlyer Is that parameter something that requires a reboot? If so then that does not invalidate this approach. If it does, then that concerns me. We assume that following a reboot we can trust the metadata to be correct for what is supported by the vehicle. Though I guess that is not entirely true - you didn't see the value of tracking mode support for command protocol metadata, and that is a clear case where we say something is supported, but in a particular mode it might not be. Anyway, my gut feeling is that it is useful for the GCS to know that a set of frames is supported/not supported by the autopilot "in general" so that it doesn't try things that are definitely not supported. What do you think? For the terrain problem then we might emit a (new) message when the parameter changes. |
Not according to the meta data. Which in turn makes a capability bit for it useless as well since those are only queried at initial connect/ |
I think the GCS should be able to determine whether terrain following is possible by looking at MAV_PROTOCOL_CAPABILITY_TERRAIN. I know that's not the same data source but at least it makes the current problem easier. Also, in case a mission is uploaded with a wrong frame, this can be nacked with MAV_MISSION_UNSUPPORTED_FRAME. |
Which means what in terms of mavlink spec?
|
I interpret the spec right now as MAV_PROTOCOL_CAPABILITY_TERRAIN meaning "terrain frame using tiles/terrain protocol (only) is supported. However if this is not set the terrain frame may still be supported - ie by a distance sensor. @DonLakeFlyer , I will need your help to clarify what the protocol is in mavlink/mavlink-devguide#259 What I would "like" to do here is re-define the meaning of MAV_PROTOCOL_CAPABILITY_TERRAIN to mean "Terrain frame is supported" and find some other way to indicate that the terrain protocol is supported - e.g. microservices protocol. Alternatively, maybe add MAV_CAPABILITY_FRAME. Though I still hate that this can't be part of the mission metadata information. |
Ok my bad, I misunderstood the capability flag. |
@DonLakeFlyer Discussed in the dev call. Decided we won't change the meaning of MAV_PROTOCOL_CAPABILITY_TERRAIN. My understanding of your requirement is to be able to know if a vehicle supports the "terrain following frame", irrespective of whether it does this using tiles or distance sensor or whatever. Some options:
I think the last option is the most practical, but I really like using metadata, because generally most flight stacks only support a couple of frames, and it makes sense to me that people should be able to easily find that out. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Now the component information infrastructure exists, do we still think the idea of metadata indicating supported MAV_CMDs in missions/commands is a good idea?
What are our other options?
Thoughts? |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Currently there is no formal way on the protocol level to establish which commands are supported by an autopilot, which makes it hard for a GCS to e.g. hide commands from the UI that are not implemented. A draft is being worked on in this document:
https://docs.google.com/document/d/1wETCft5N7IN4iR9NhfG9cI_fMvlG1PvCXXOPwxSEwGE/edit#heading=h.t3uczm564nmc
@julianoes @hamishwillee Let's have the discussion on the content here and comment in the doc only on implementation specifics.
The text was updated successfully, but these errors were encountered: