-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Add airspeed control to AP_DDS for plane in GUIDED #29829
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
Open
Ryanf55
wants to merge
3
commits into
ArduPilot:master
Choose a base branch
from
Ryanf55:dds-plane-airspeed-guided
base: master
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.
+40
−0
Conversation
This file contains hidden or 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
980de3d
to
d51f9d8
Compare
39294c4
to
7aed7ea
Compare
It would be nice if support for climb rate control was also added! otherwise great feature. |
IamPete1
reviewed
Apr 21, 2025
Ryanf55
added a commit
to Ryanf55/ardupilot
that referenced
this pull request
Apr 22, 2025
* Precursor to ArduPilot#29829 Signed-off-by: Ryan Friedman <[email protected]>
Ryanf55
added a commit
to Ryanf55/ardupilot
that referenced
this pull request
Apr 22, 2025
* Precursor to ArduPilot#29829 Signed-off-by: Ryan Friedman <[email protected]>
Ryanf55
added a commit
to Ryanf55/ardupilot
that referenced
this pull request
Apr 23, 2025
* Precursor to ArduPilot#29829 Signed-off-by: Ryan Friedman <[email protected]> Co-authored-by: Peter Barker <[email protected]>
Ryanf55
added a commit
to Ryanf55/ardupilot
that referenced
this pull request
Apr 23, 2025
* Precursor to ArduPilot#29829 Signed-off-by: Ryan Friedman <[email protected]> Co-authored-by: Peter Barker <[email protected]>
Ryanf55
added a commit
to Ryanf55/ardupilot
that referenced
this pull request
Apr 23, 2025
* Precursor to ArduPilot#29829 Signed-off-by: Ryan Friedman <[email protected]> Co-authored-by: Peter Barker <[email protected]>
peterbarker
added a commit
that referenced
this pull request
Apr 29, 2025
* Precursor to #29829 Signed-off-by: Ryan Friedman <[email protected]> Co-authored-by: Peter Barker <[email protected]>
Time for a rebase |
* Similar to MAV_CMD_GUIDED_CHANGE_SPEED Signed-off-by: Ryan Friedman <[email protected]>
* Similar to MAV_CMD_GUIDED_CHANGE_SPEED Signed-off-by: Ryan Friedman <[email protected]>
* Similar to MAV_CMD_GUIDED_CHANGE_SPEED Signed-off-by: Ryan Friedman <[email protected]>
7aed7ea
to
f43e694
Compare
Done, retestested with the same test cases. Ready for final review. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
I want to control plane's airspeed from DDS while in GUIDED mode, similar to MAV_CMD_GUIDED_CHANGE_SPEED.
Description
We already have low level velocity control in the DDS interface, currently implemented on copter. We can use the same topic for airspeed commands, assuming the linear Y and Z components are NaN, and it's in the body frame obeying the ROS REP-103 FLU convention. I assume that ROS users will want airspeed control in plane rather than local GPS speed control.
The guided code was pulled from GCS_Mavlink_Plane::handle_command_int_guided_slew_commands where it handled MAV_CMD_GUIDED_CHANGE_SPEED:
ardupilot/ArduPlane/GCS_MAVLink_Plane.cpp
Lines 672 to 709 in 8e34fd1
Example Command
Tests Performed
In another terminal, take off and get the vehicle into GUIDED so it's ready to accept airspeed commands
mavproxy.py --master :14551 mode takeoff arm throttle # wait till at altitude mode guided
In another terminal, send the airspeed command to 26 m/s.
Observe the plane speed up from 23 to 26 m/s in mavproxy's console.

Now, slow it down to 15 m/S.
ros2 topic pub /ap/cmd_vel geometry_msgs/msg/TwistStamped "{header: {stamp: now, frame_id: base_link}, twist: {linear: {x: 15.0, y: .nan, z: .nan}}}" --once
Observe it slow down.
YOu can also try with 9 to see it's rejected (too slow) and 31 (too fast), or in another mode like FBWB to see it's rejected.