Skip to content
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

common: add MAV_CMD to process custom actions on a waypoint #1516

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions message_definitions/v1.0/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,17 @@
<param index="6">Empty</param>
<param index="7">Empty</param>
</entry>
<entry value="2700" name="MAV_CMD_CUSTOM_ACTION" hasLocation="false" isDestination="false">
<wip/>
<description>Custom action to execute at this specific waypoint. The definition of the action, or set of actions, to execute, as well as the associated metadata is stored in the system that is going to process the action.</description>
<param index="1" label="Action" minValue="0" increment="1">Number of the custom action that will be executed. The metadata associated with this action is stored on the system that is going to process this command.</param>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action is a MAV_CMD, isn't it? So "Number" is a message id, right? If that's correct, I think that "ID" would make it clearer to me than "Number".

Suggested change
<param index="1" label="Action" minValue="0" increment="1">Number of the custom action that will be executed. The metadata associated with this action is stored on the system that is going to process this command.</param>
<param index="1" label="Action" minValue="0" increment="1">ID of the custom action that will be executed. The metadata associated with this action is stored on the system that is going to process this command.</param>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action is a MAV_CMD, isn't it? So "Number" is a message id, right?

The action is something that gets executed by this MAV_CMD. Can even be another MAV_CMD, or a time split sequence of them, or something else. The number represents the action that will be executed. Maybe ID can still fit better though.

<param index="2" label="Execution control" minValue="0" increment="1" maxValue="2">Control when the Vehicle moves to the next waypoint. 0: Use ACK from component responsible for executing the action, to move to the next Waypoint. Otherwise, move when timeout (param 3) is reached; 1: Waits for an amount of time (param 3) before moving to the next waypoint, even if the ACK is received from the component responsible for executing the action; 2: Wait for the ACK component responsible for executing the action and blocks the navigation (just moves when an ACK is received).</param>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an enum for this. It makes documenting it easier and leads to a cleaner implementation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looked too short to me to justify an enum, but yes I guess I can do that. Thanks for the feedback @amilcarlucas!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • What is difference between 0 and 3?
  • Which ACK? Success only? What if fail or in progress or whatever? The problem with an ACK is that typically something has to be sent back very quickly, while you might want to have the thing sitting there for ages, but not as long as your timeout.

Some real examples might help here.

<param index="3" label="Timeout / Max execution time" units="s" minValue="0">Used by the navigation module to set the timeout for the receiving feedback of successful execution, or to set the time of execution before moving to the next waypoint.</param>
<param index="4" reserved="true" default="NaN"/>
<param index="5" reserved="true" default="NaN"/>
<param index="6" reserved="true" default="NaN"/>
<param index="7" reserved="true" default="NaN"/>
</entry>
<entry value="2800" name="MAV_CMD_PANORAMA_CREATE" hasLocation="false" isDestination="false">
<description>Create a panorama at the current position</description>
<param index="1" label="Horizontal Angle" units="deg">Viewing angle horizontal of the panorama (+- 0.5 the total angle)</param>
Expand Down