PX4-Autopilot
PX4-Autopilot copied to clipboard
Tailsitter: remove thrust spikes around entering/leaving transition modes
Solved Problem
Various throttle spikes and jumps during tailsitter transitions, see screenshot:
The spikes are caused by the VTOL module selecting the FW rate controller output even when it doesn't have anything published yet, resulting in a publication of 0. The same happens during the initial phase of the back transition, as there the MC rate controller hasn't published yet.
The jumps are coming form different thrust level outputs of the MC vs FW controllers.
Solution
- Fix the spikes by waiting 50ms until the new controller output is used.
- Add ramps similar to what we already do for tiltrotor and standard VTOL.
- also wait for differential throttle in FW until 50ms have passed
Changelog Entry
For release notes:
Improvement: Tailsitter: remove thrust spikes around entering/leaving transition modes.
Alternatives
The transition logic between the VTOL types should be synced and simplified.
Test coverage
SITL tested. The spikes are gone and there are no jumps of the throttle.
@sfuhrer Looks like it will do the job. I would also verify what happens in the case of a quadchute, as there we technically don't transition but go straight to MC mode.
@sfuhrer Looks like it will do the job. I would also verify what happens in the case of a quadchute, as there we technically don't transition but go straight to MC mode.
Right, good point, I added the most basic anti-spike protection also in quad-chute now, and handle back-transitions aborts smoothly. See last two commits.
Cleaned up the commits and tested again in SITL. LGTM.