I did a little more digging on the topic last night and this morning. This is the only similar discussion I found, it’s 5 years old, and I don’t see any follow-on interest.
I’m a bit surprised by the lack of info/discussion, as your case seems a logical one for inclusion in the software, but it doesn’t look like it’s ever been pursued.
I can see three possible solutions, none of which are exactly simple (programming knowledge required):
-
Fork the ArduPilot source code and write the functionality you need into it (probably in AR_Attitude_Control).
-
Use a separate microprocessor as an intermediary to interpret the throttle PWM signal and provide the mixed output you require (this link might help with that).
-
As I mentioned before, use a Lua script to actuate the brake as needed (probably by applying the brake proportional to
vehicle:get_control_output(CONTROL_OUTPUT_THROTTLE)
and/orahrs:groundspeed_vector()
). This is probably the least desirable method, particularly if braking is critical to your vehicle’s controllability.