-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
Plane: Support a set of offboard MAVLink guided controls with rates #13637
Plane: Support a set of offboard MAVLink guided controls with rates #13637
Conversation
Note/s this code (with only slight variations ) has been extensively flown over the last 18months on a number of different branches, starting from 3.8.5, and including 3.9.7 and 4.0-beta1. it's also been simmed a lot too. |
ArduPlane/Log.cpp
Outdated
@@ -287,6 +326,36 @@ void Plane::Log_Write_Vehicle_Startup_Messages() | |||
gps.Write_AP_Logger_Log_Startup_messages(); | |||
} | |||
|
|||
/* |
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.
Anything wrong with the existing log_MAVLink_Command
?
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.
The mavlink interface should be created in terms of the existing messages, rather than creating new ones.
To be clear; MAV_CMD_DO_CHANGE_SPEED could get a |
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.
There are a lot of style things that need to be fixed up, and debug prints that need to be removed here, it's actually making a bit hard to review in detail because of that.
Interesting, but I don't see the advantages of those messages agains SET_POSITIONS one's in body_frame. They are already able to do this and more with a single interface |
@khancyr Note these are commands, not messages. Commands give you direct feedback on success/failure. We do have commands which I believe can be stretched to add the rate parameters - thus my comments here. |
d86a75f
to
4084e66
Compare
This comment has been minimized.
This comment has been minimized.
34b05ab
to
b70c32c
Compare
I've just finished flying this latest code around in the sim in GUIDED and sending it the appropriate MAV_CMD_GUIDED_CHANGE_SPEED , MAV_CMD_GUIDED_CHANGE_HEADING, and MAV_CMD_GUIDED_CHANGE_ALTITUDE, and entering/exiting from this with GUIDED and leaving GUIDED mode, and all the expected new behaviours for these are working. |
b70c32c
to
037bbbd
Compare
latest push includes fixes so it builds under HAL_MINIMIZE_FEATURES, hopefully this will get CI to pass. Also now fixed fabs() to fabsf() to avoid double maths. |
47bd71e
to
6b9c4da
Compare
Latest version makes logging more consistent with existing layouts, and fixes a bug i briefly had that crashed sitl due to it doing extra checks on the formatting layout/s of packets, and it now passes test.QuadPlane.LoggerDocumentation CI test. Oh, i've also just extensively re-flown this in sitl triggering all the COMMAND_INT packet types that it uses, and checked they are all logging correctly and displaying their FMTs corrrectly. |
6b9c4da
to
1327333
Compare
3cecf1d
to
66b044d
Compare
66b044d
to
9046f05
Compare
I've rebased, fixed the conflict and fixed the submodule update |
Depends on ArduPilot/mavlink#109
This creates extra GUIDED commands for a companion computer to autonomously control not just heading, speed and altitude, but specifically the RATE at which the vehicle 'slews' toward each of it's targets.
These commands have zero effect on a standard vehicle until such time as it is put in GUIDED and also any of these new mavlink command/s are used by a companion computer. Changing vehicle mode to any other mode even briefly reverts to standard behaviour, including standard GUIDED behaviour.
Using any single packet (eg heading) will cause the other behaviour/s (speed and alt) to be left as per normal GUIDED behaviour, but using all three gives full and 3d dynamic control of the vehicle envelope.