-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Mission command timeout #3495
Open
hamishwillee
wants to merge
5
commits into
main
Choose a base branch
from
mission_command_timeout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mission command timeout #3495
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8b1be06
Add gripper mission command timeout
hamishwillee b705eb7
gimbal mission timout settings
hamishwillee e742d56
Add info about the mission timeout to mission modes
hamishwillee 742d51c
Add release note
hamishwillee 1c36be4
Update en/releases/main.md
hamishwillee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ The mission is typically created and uploaded with a Ground Control Station (GCS | |
## Description | ||
|
||
Missions are usually created in a ground control station (e.g. [QGroundControl](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/plan_view/plan_view.html)) and uploaded prior to launch. | ||
They may also be created by a developer API, and/or uploaded in flight. | ||
They may also be created by a MAVLink API such as [MAVSDK](../robotics/mavsdk.md), and/or uploaded in flight. | ||
|
||
Individual [mission commands](#mission-commands) are handled in a way that is appropriate to multicopter flight characteristics (for example loiter is implemented as _hover_ ). | ||
|
||
|
@@ -191,6 +191,16 @@ Please add an issue report or PR if you find a missing/incorrect message. | |
|
||
::: | ||
|
||
## Mission Command Timeouts | ||
|
||
Some mission commands/items can take time to complete, such as a gripper opening and closing, a winch extending or retracting, or a gimbal moving to point at a region of interest. | ||
|
||
Where provided PX4 may use sensor feedback from the hardware to determine when the action has completed and then move to the next mission item. | ||
If not provided, or if the feedback is lost, a mission command timeout can be used to ensure that these kinds of actions will progress to the next mission item rather than blocking progression. | ||
|
||
The timeout is set using the [MIS_COMMAND_TOUT](../advanced_config/parameter_reference.md#MIS_COMMAND_TOUT) parameter. | ||
This should be set to be a small amount greater than the time required for the longest long-running action in the mission to complete. | ||
Comment on lines
+194
to
+202
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, add this to all the vehicle mission mode sections. |
||
|
||
## Rounded turns: Inter-Waypoint Trajectory | ||
|
||
PX4 expects to follow a straight line from the previous waypoint to the current target (it does not plan any other kind of path between waypoints - if you need one you can simulate this by adding additional waypoints). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianoes Is this accurate? Specifically, my assumption is that all gimbal commands are sent to MAV_COMP_ID_GIMBAL but I couldn't find where.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had no idea this param existed.
I would be surprised if this worked at all. Something to check...
In terms of timeout: Usually the gimbals just answer with Ack, and then go to the setpoint, however slow they want. This behavior makes sense when used as a command - where you might want to send a new setpoint while it's still moving - but less as part of a mission, unfortunately. It might requiring adding in a wait command explicitly after.
In my mind, if a command is not answered immediately, it should be followed up by a IN_PROGRESS to avoid a timeout, as per protocol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a new param added in PX4/PX4-Autopilot#23960
Essentially it copies what was done for payload delivery - if you have feedback then the mission item completes on getting that, but if you don't then it completes after a timeout - ensuring the gimbal has time to reach your target setpoint, or your gripper has time to open/closed.
This is what is done, and will work. Is it the right thing? Depends on whether the gimbal protocol provides feedback on reaching the target as you suggest or just acknowledges the command. We don't define the camera commands as long running, so I suspect the former is what happens. Is there any other way to get feedback?
In any case, can you confirm that commands are sent to MAV_COMP_ID_GIMBAL ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to test this. On my list now. Being able to set the timeout can be good of course.