-
Notifications
You must be signed in to change notification settings - Fork 13.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
Support thrust reversal for vtol back transition #7666
Conversation
Awesome! Very interested to see a side-by-side comparison. Thrust reversal (airbrakes) is common in real planes and this would fit into the FW controller nicely alongside flaps. Then VTOL would simply set apply_airbrakes at the appropriate time (https://github.com/PX4/Firmware/blob/master/msg/vehicle_attitude_setpoint.msg#L21) during back transition. Planes could then consider using it for braking during landing at the appropriate time. It's the same solution, just moved to a different part of the codebase to enable wider usage. |
@dagar The one corner case I see is that I could see us wanting to brake using this completely even with multicopter engaged. That would be much smoother. |
@sanderux Could you add the same into the fixed wing controller and fix the circle CI error? |
@dagar Implementing this for FW is a good idea, but that cannot be implemented the way i have done now. Currently it applies a fixed reversed throttle for the duration of the back transition without any control on airspeed or velocity. Doing so to slow down a fixed wing will surely lead to problems. After a chat with lorenz the current proposal is to leave it in the vtol attitude controller for now and replace it with a velocity controlled method in the FW controller as soon as we find the time to implement that properly. Do you agree? |
c2c1cb7
to
f5fe51d
Compare
Yes a velocity controller would be preferred, but what I was proposing was simply moving the same implementation into fw_att_control, and enabling with a bool in the attitude setpoint (similar to flaps). During back transition vtol_att would set
Yet another idea is to find a way to do this at the mixer level. The idea of an actuator output with a direction controlled by another output seems even more general than vtol or fw airbrakes. Then you could simply publish a negative thrust during back transition. We'd have to find a way to make a negative thrust correspond to a fixed 20% output on the additional pwm + positive pwm output, but overall it would be much cleaner. All that is to say, I'm not opposed to this implementation right now if you're willing to tolerate some churn (and likely retesting) later on. |
I agree with @dagar that the best place to put this would be in the mixer itself and then simply be able to publish a negative value. |
Wouldnt that then require a different mixer for every esc? |
Is the current mixer capable of doing this? The esc requires a constant PWM between 1000 and 1200 on the reversal channel for normal rotation and a PWM > 1200 for reverse rotation. If the signal goes below 1000 the esc goes into failsafe mode |
It would require a new mixer class that steals 2 outputs and sets the second output according to the sign of the control input received. That way the system can just work with negative thrust to activate it and is independent of the ESC. In that case, any breaking logic implemented works as well with ESCs that support reversal below the midpoint (and have a simple mixer). |
Tested in fairly heavy wind, works: http://logs.px4.io/plot_app?log=f4ab18cc-a717-4a34-a8d5-13b5b24ef86a
|
@dagar @AndreasAntener I added the 2 improvements i suggested based on my flight tests. |
Do you need both mixers? The reason I ask is that this precludes usage of the usual camera triggers, and a VTOL that doesn't have payload is not particularly interesting. |
For this solution you do. How many do you need for cam? There is one left |
On current hardware, we need 2 for cam control. (AUX 5,6) |
I use 3 and 4 on the deltaquad for pusher and reserse so that should work |
9c4f1dd
to
b5350b3
Compare
@dagar so how do you propose we deal with this? |
863a171
to
a54309f
Compare
a54309f
to
10d6189
Compare
Flight tested, this gave fantastic back transitions in wind conditions that would normally result in very eratic behavior. tail wind: https://review.px4.io/plot_app?log=3b1cfd23-f41e-4b57-b13b-6c0a9ed6bfdf @dagar @LorenzMeier Please review, i consider this ready to merge |
@LorenzMeier i dont know why semaphoreci keeps failing. Can you review and merge? |
Need to add:
|
5f43fde
to
9a1b09c
Compare
@dagar points addressed. Please review |
I'm still concerned that with the current implementation the parameter naming implies more functionality than actually exists outside of a very specific setup. VT_B_REV_THR: reverse thottle output during back transition This is simply the pusher throttle value during back transition right? There's nothing special about it that makes it a reverse throttle. A regular user (without the special ESC) is going to see this and enter a number expecting it to reverse somehow. If you describe (and name) what it actually does that removes some of the ambiguity. VT_B_REV_OUT: Output on reverse channel during back transition This is the INDEX_AIRBRAKES value during back transition. Why don't we just say what it actually is with a note that it isn't going to do anything unless you have AIRBRAKES in your mixer. |
693a4e7
to
73c2d50
Compare
@dagar I address a couple more things. can you review again? |
Flight tested new changes, works very well: https://logs.px4.io/plot_app?log=bd8740e0-f43b-418b-8f10-f27f50e9f989 |
This enables active braking during back transition by reversing thrust.
It relies on ESC's that have a channel to control motor direction like the Hobbywing Platinum pro series.
Currently it has only been bench tested, flight test will be performed soon.
/cc @AndreasAntener @Tumbili