-
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
VTOL tiltrotor tilt ("pusher") support in hover #13779
Conversation
fee7b38
to
4326152
Compare
Did some flight testing on a tiltrotor: and standard VTOL: Both flights were done mainly in altitude mode, where I've for testing purposes also enabled the pusher/tilt support in hover. I've removed that for this PR, and think about another one where I want to enable pusher/tilt support in other flight modes (altitude, stabilized, landing,..) (probably controllable per parameter). |
3ef3d07
to
ac35d52
Compare
ac35d52
to
c109985
Compare
// normalized pusher throttle (standard VTOL) or tilt (tiltrotor), initialize to 0 | ||
_hover_pusher_or_tilt_forward_actuation = 0.0f; | ||
|
||
// if the thrust scale param is zero or the drone is on manual mode, |
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.
@sfuhrer The comment does not match reality I think.
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.
changed to "not in position or altitude control mode", and thus also change the logic to enable it in altitude control mode.
@sfuhrer Let's discuss this during our call today. |
0bccd3f
to
2636c57
Compare
-move pusher assist functionality into vtol_type class and adapt it to also work for tiltrotor VTOLs (pitch rotors down to accelerate forward) -for tiltrotor: compensate for lost lift due to tilt by increasing the throttle -enable pusher / tiltassist also in altitude mode Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2636c57
to
d663c84
Compare
Codecov Report
@@ Coverage Diff @@
## master #13779 +/- ##
=========================================
- Coverage 51.05% 36.06% -15%
=========================================
Files 617 548 -69
Lines 52660 47005 -5655
=========================================
- Hits 26885 16951 -9934
- Misses 25775 30054 +4279
|
// desired roll angle in heading frame stays the same | ||
float roll_new = -asinf(body_z_sp(1)); | ||
|
||
_forward_thrust = (sinf(-pitch_down) - sinf(_params->down_pitch_max)) * _params->forward_thrust_scale; |
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.
@sfuhrer It's a bit problematic because it would change the tuning of existing vehicles, but thinking about it we should probably multiply this by the current demanded throttle. Otherwise the calculated forward thrust is only a function of the demanded pitch down command but in theory the demanded thrust could be very little.
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.
yeah right..this would though mainly affect standard VTOL, right? As for tiltrotor the forward thrust actually is reduced together with the combined thrust (not in code, but indirectly as we from the VTOL module only give out a tilt angle, and not a thrust that's then correctly allocated).
It so far though never posed any problems, did it?
@sfuhrer Generally looks good, although I think we don't need to make _forward_thrust a class member. If we get rid of it I think the code even becomes more readable as it's more clear what these functions do. |
- remove gloabl variable and instead give back forward_thrust from function - give back increased vertical thrust from fct thrust_compensation_for_tilt() Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Hi, can you also implement yaw vectoring with tilt rotor vtols? |
yaw is already controlled by tilt servo |
Describe problem solved by this pull request
This PR enables the controller for tiltrotor VTOL to use tilting of the motors to accelerate forward (similar as the standard VTOL can use its pusher/pull motor to do so).
Test data / coverage
Initial testing looked promising, but need to do some more as I've changed the thrust compensation when tilting is applied.
Also needs to be tested on a standard VTOL to check for regressions.
This a video of the first flight: https://drive.google.com/file/d/1gHhwEUxHKgazkDOrzRixyPfx4gMYRJ-x/view?usp=sharing
It was with flying in altitude mode (I've enabled pusher/tilt assist also in altitude mode to test this PR - do you think it's a good idea to enable that in general @RomanBapst ?).