Skip to content
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

Enable motor controls for tailsitter VTOLs in fixed wing mode (enable Quad Tailsitters) #20511

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Oct 30, 2022

Describe problem solved by this pull request

For tailsitter VTOLs, motors are not used for attitude control in fixedwing mode. This is because of the distinction between control surfaces and motor controls being enabled / disabled depending on whether the vehicle is in fixed wing or multicopter mode.

Describe your solution

This commit enables motor controls in fixed-wing mode for tailsitters. This is enabled when VT_FW_DIFTHR_EN is enabled on a tailsitter. This is needed for enabling control surface-less quad tailsitters (#19747)

Describe possible alternatives

This feels like a hack and would be great if we can discuss how bad this hack is 😅 @sfuhrer @tstastny

IMHO, it would be better if this comes implicitly from the geometry of the control allocation framework. However, vehicle geomtetry doesnt seem to propagate back to vtol_att_control. We could probably do something like "Lock motor attitude control in fixedwing mode" as we do for control surfaces in fixedwing mode. However not sure how control surfaces and motors should be allocated if they are both available.

Test data / coverage

Tested in SITL Gazebo, with the control surfaces disabled for the quadtailsitter

make px4_sitl gazebo_tailsitter
  • Flight log: log
    • Note that the position and attitude controllers were not retuned, and therefore the tracking performance is quite bad. If this PR seems to be a good way to support quad tailsitters, I will add a gazebo model dedicated for quad tailsitters and retune the vehicle

Additional context

This commit enable motor controls in fixed wing mode for tailsitters

This is needed for enabling quad tailsitters
@Jaeyoung-Lim Jaeyoung-Lim changed the title Enable motor controls for fixed wing mode in tailsitters Enable motor controls for tailsitter VTOLs in fixed wing mode (enable Quad Tailsitters) Oct 30, 2022
@Jaeyoung-Lim Jaeyoung-Lim added the Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! label Oct 30, 2022
@sfuhrer
Copy link
Contributor

sfuhrer commented Oct 31, 2022

With that proposal it would be no longer possible to use on e.g. a quad tailsitter with elevons the elevons for fixed-wing roll and pitch control and the differential thrust for yaw, right?
Maybe it's necessary to have that still. For it something like here 17a020c (as part of the testing branch I created some time ago) may be needed.
And yes I feel there should be some sort of feedback from the allocator to the controller with the actuator setup - or we push harder for the unified rate controller and move all the allocation customization to the control allocation module.

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Oct 31, 2022

Maybe it's necessary to have that still. For it something like here 17a020c (as part of the testing branch I created some time ago) may be needed.

So, as far as I understand, this would be basically adding a parameter to enable differential thrust for each axis, and the user is responsible to turn off the differential thrust when the control surface for the axis exist.

Did I understand this correctly?

Until now only suppoted on yaw axis. Not to be supported also on Roll and Pitch.

- VT_FW_DIFTHR_EN: make bitmask for all three axes independently. First bit is Yaw,
sucht that existing meaning of VT_FW_DIFTHR_EN doesn't change.
- VT_FW_DIFTHR_SC: rename to VT_FW_DIFTHR_S_Y and add same params for roll (_R) and
pitch (_P).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Nov 1, 2022

@sfuhrer Addressed review comments on latest commit

  • Flight log: log

@Jaeyoung-Lim Jaeyoung-Lim marked this pull request as ready for review November 1, 2022 12:15
@Jaeyoung-Lim
Copy link
Member Author

Airspeed seems to get invalid after transition:
image

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the right iterative step for me to start enabling control surface less tailsitters without big controller reworks. Next up for me would be to remove the dual controller setup - especially with a plane that uses the same actuators in hover and fixed-wing there should be no controller switch necessary.

@Jaeyoung-Lim
Copy link
Member Author

@sfuhrer Thanks!

@Jaeyoung-Lim Jaeyoung-Lim merged commit a9542ba into main Nov 7, 2022
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-quad-tailsitter branch November 7, 2022 14:29
@aoberai
Copy link

aoberai commented Nov 24, 2022

@Jaeyoung-Lim @sfuhrer Has this been tried on physical hardware like the SWAN K1? Would it be able to couple both elevons and differential thrust for control authority--or just one or the other?

Planning on using this on a drone in 2 weeks, just want to know if I can bank on it working or if more work needs to be done first. (Mentions that the solution was a bit of a hack so not sure what that means performance wise)

Thanks

@sfuhrer
Copy link
Contributor

sfuhrer commented Nov 25, 2022

@Jaeyoung-Lim @sfuhrer Has this been tried on physical hardware like the SWAN K1? Would it be able to couple both elevons and differential thrust for control authority--or just one or the other?

Planning on using this on a drone in 2 weeks, just want to know if I can bank on it working or if more work needs to be done first. (Mentions that the solution was a bit of a hack so not sure what that means performance wise)

No hasn't been tried on a real drone yet. There is an ongoing effort to add proper simulation for it in #20558.
Likely more work to be done. Check out the state of the simulation, and if you're satisfied with how it flies try it out on the real one, that would give us valuable feedback.

And about using both elevons and MC for control: never had it in hind to combine the two, but it may work, and you should be able to quite easily bench test it to be sure.

@aoberai
Copy link

aoberai commented Nov 25, 2022

I see, I assumed the PR being merged might mean it is fully ready. In that case just to confirm, PX4 for sure works with quadrotor tailsitter with elevons (without thrust differential) as a back up for now? If that is correct, I can still probably use it but otherwise I would have to switch over to a software like Ardupilot which does this well but has significantly worse gazebo simulation support which would be unfortunate.

I will look into the simulation efforts going on and pitch in if I can.

@sfuhrer
Copy link
Contributor

sfuhrer commented Nov 29, 2022

PX4 for sure works with quadrotor tailsitter with elevons

I unfortunately don't have a quad tailsitter with elevons to try it out, but as the gazebo model is such a vehicle I'm fairly confident that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Control Surfaceless VTOL Quad Tailsitters
3 participants