Repository navigation
Conversation
Global Size Summary (Total Flash delta in bytes)Built from 5157938 rebased onto 95e2ddb
|
|
A note on CI: the one red job is sitltest-quadplane-tests1c, and the only test that fails in it is QAUTOTUNE, which ends with "AutoTune: Failed to level" after repeated "Pitch Angle P Up 0%". That looks like the intermittent failure ArduPilot/ardupilot#33628 fixes. I saw the same failure in the same job on ArduPilot/ardupilot#34517, which only changes Tools/autotest/arduplane.py. QAUTOTUNE flies the default quadplane frame, which sets neither Q_FRAME_CLASS nor Q_TAILSIT_MOTMX for a tailsitter, so Tailsitter::setup_enable() leaves Q_TAILSIT_ENABLE alone there. The other 44 tests in that job pass, Tailsitter among them. I have not changed anything for it. Assisted-by: Claude:claude-opus-5-5 |
QuadPlane::setup() chooses the rotation of the VTOL AHRS view from Q_TAILSIT_ENABLE, but the flag was only set from the legacy parameters (Q_FRAME_CLASS, Q_TAILSIT_MOTMX) later, in Tailsitter::setup(). On the first boot with those parameters the view was created without the pitch rotation, so the attitude controller saw a 90 degree pitch error with the vehicle sitting on its tail, saturated the motors and the vehicle could not take off until the next reboot. Move the legacy check into Tailsitter::setup_enable() and call it before the view is created. Assisted-by: Claude:claude-opus-5-5
The test rebooted SITL straight after wiping the parameters, which hid that the copter tailsitter could not take off on its first boot. Remove the reboot so the first boot is the one that flies. Assisted-by: Claude:claude-opus-5-5
16a1514 to
5157938
Compare
|
Rebased onto master to resolve the conflict with the new The one red CI job is again |
|
Friendly ping: this fixes #34001. A tailsitter enabled only through the legacy On CI: the one red job, Assisted-by: Claude:claude-opus-5-5 |
Summary
Fixes #34001. A tailsitter that is enabled through the legacy parameters (
Q_FRAME_CLASSorQ_TAILSIT_MOTMX, withQ_TAILSIT_ENABLEnot set) could not take off in any VTOL mode on its first boot.Q_TAILSIT_ENABLEis now set before the VTOL AHRS view is created.Classification & Testing (check all that apply and add your own)
SITL on macOS (arm64, Apple clang 21),
--model quadplane-copter_tailsitterwith the stock default parameter files, base 9dd2e0f.A pymavlink script that boots SITL, switches to GUIDED, arms and sends
MAV_CMD_NAV_TAKEOFFto 60m, then watches 30s of simulated time:-w)The motor outputs on master match the ones in the issue.
Autotests (
Tools/autotest/autotest.py --no-configure test.QuadPlane.<name>):CopterTailsitterwithout itsreboot_sitl()(as in this PR): fails on master withFailed to attain Altitude want 62.0, reached -0.103, passes with the fix.CopterTailsitteras it is on master (with the reboot) also passes with the fix.Tailsitter,MAV_CMD_NAV_TAKEOFFandBootInAUTOpass with the fix.I did not run the whole QuadPlane suite locally, and I have no hardware to test on.
Description
QuadPlane::setup()creates the VTOL AHRS view withROTATION_PITCH_90iftailsitter.enable > 0. The flag was only set from the legacy parameters later, inTailsitter::setup(). On the first boot with those parameters the view was therefore created without the rotation: with the vehicle sitting on its tail, the attitude controller saw a pitch error of about 90 degrees and saturated the motors.Tailsitter::setup()then savedQ_TAILSIT_ENABLE=1, so every later boot worked. This is the analysis @naruto0916 posted on the issue; I confirmed it in SITL.Plane: the legacy check moves out of
Tailsitter::setup()into a newTailsitter::setup_enable(), whichQuadPlane::setup()calls just before it creates the view. The check itself is unchanged.autotest:
CopterTailsitterrebooted SITL right after wiping the parameters, which is why it never saw this. The reboot is removed, so the test now flies on the first boot.Outside SITL this affects a vehicle whose parameters still rely on the legacy detection, on the first boot after
Q_TAILSIT_ENABLEwas introduced or after a parameter reset.Not changed: the tiltrotor has the same kind of legacy check in
Tiltrotor::setup(). It does not affect the AHRS view, so I left it where it is. The "not both a tailsitter and a tiltrotor" check inQuadPlane::setup()still runs before either legacy check, as before.This contribution was AI-assisted (Claude Code): it reproduced the problem, wrote the change and ran the SITL checks above. I have not reviewed the code myself.
Assisted-by: Claude:claude-opus-5-5