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

Add support for quadtailsitter in SITL Gazebo #20558

Merged
merged 5 commits into from
May 29, 2023
Merged

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Nov 7, 2022

Describe problem solved by this pull request

The current tailsitter model has control surfaces, and a control surface-less tailsitter was not available for testing in simulation

Describe your solution

This PR adds support for a quadtailsitter, which models the HEQ SWAN K1.

The 3D mesh was provided by Holybro

Test data / coverage

Tested in SITL Gazebo

make px4_sitl gazebo_quadtailsitter

Additional context

@sfuhrer
Copy link
Contributor

sfuhrer commented Nov 7, 2022

Very cool push, the model looks nice! But doesn't really work in FW for me, does it for you? Maybe there is more work from https://github.com/PX4/PX4-Autopilot/commits/pr-enable-quad-tailsitter-diff-thrust-main we can pull to improve the control.

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Nov 7, 2022

Very cool push, the model looks nice! But doesn't really work in FW for me, does it for you? Maybe there is more work from https://github.com/PX4/PX4-Autopilot/commits/pr-enable-quad-tailsitter-diff-thrust-main we can pull to improve the control.

Thanks! Yes, the fixedwing attitude control still needs a bit(a lot) of tuning 😄 For some reason after the geometry changed from the previous tailsitter, it seems to be harder to tune.

@julianoes
Copy link
Contributor

julianoes commented May 12, 2023

Switching to the advanced lift drag plugin helped a lot in getting this stable.

Screen recording:
https://drive.google.com/file/d/1oNJdV5LIlWNSMnXIyUK-sKrcVp2RqCd1/view

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented May 12, 2023

@julianoes Thanks! Might need a bit more tuning to make it nicer, but overall I think it is ready to get in

Roll rate seems to oscillate a lot in a bank

@sfuhrer @tstastny Could you have a look?

@julianoes
Copy link
Contributor

@Jaeyoung-Lim wow the back transition in the video happens out nowhere, that's a bit suboptimal, although probably unrelated to this PR.

@sfuhrer
Copy link
Contributor

sfuhrer commented May 15, 2023

I've STIL tested it quite extensively and proposed some tuning adaptions.

I noticed that the FW rate controller saturation logic is wrong with this model, as here we have the FW actuators in the matrix instance 0 and not 1. It results in the rate controller I being disabled in the FW flight. I'm checking what we could do against it short term.

if (_control_allocator_status_subs[_vehicle_status.is_vtol ? 1 : 0].update(&control_allocator_status)) {

@Jaeyoung-Lim
Copy link
Member Author

@julianoes tailsitter SITL tests seems to be reliably failing after PX4/PX4-SITL_gazebo-classic#980

@sfuhrer sfuhrer force-pushed the pr-sitl-quadtailsitter branch 2 times, most recently from 71d7dfe to 053993f Compare May 15, 2023 11:34
@sfuhrer
Copy link
Contributor

sfuhrer commented May 15, 2023

Force pushed to remove unrelated commit and push that in a separate PR: #21592

@julianoes
Copy link
Contributor

@julianoes tailsitter SITL tests seems to be reliably failing after PX4/PX4-SITL_gazebo-classic#980

I think that's funny. We should swap it to the advanced lift drag plugin. The model working before seemed pretty much nonsense.

@sfuhrer
Copy link
Contributor

sfuhrer commented May 16, 2023

@julianoes tailsitter SITL tests seems to be reliably failing after PX4/PX4-SITL_gazebo-classic#980

I think that's funny. We should swap it to the advanced lift drag plugin. The model working before seemed pretty much nonsense.

I've adapted the tuning now also for the tailsitter with control surfaces, see last two commits.

@Jaeyoung-Lim
Copy link
Member Author

@tstastny @sfuhrer @julianoes Anything else to address to get this in? I would rather merge it and address improvements separately

@sfuhrer
Copy link
Contributor

sfuhrer commented May 29, 2023

@Jaeyoung-Lim let's resolve the conflict and get this in, I also don't see any blocker.

Jaeyoung-Lim and others added 5 commits May 29, 2023 10:52
This is now using the advanced lift drag plugin.

The important step was to enable airmode for yaw, otherwise yaw gets
saturated at low throttle and we can barely roll.

The other trick was to raise airspeed a little bit to avoid operating
too much at the lower end of throttle where control authority is low.

Signed-off-by: Julian Oes <julian@oes.ch>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
5s is a more reasobale time for tailsitters, which rely differently on this param
than other VTOL types. Tailsitters will ramp the pitch up withing this time,
while for other VTOLS types its only the max transitiont time.

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

@sfuhrer Thanks! Done!

@sfuhrer sfuhrer merged commit f0b476b into main May 29, 2023
0 of 2 checks passed
@sfuhrer sfuhrer deleted the pr-sitl-quadtailsitter branch May 29, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! Sim: gazebo classic Gazebo classic simulator
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants