PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

Tailsitter: remove thrust spikes around entering/leaving transition modes

Open sfuhrer opened this issue 1 year ago • 2 comments

Solved Problem

Various throttle spikes and jumps during tailsitter transitions, see screenshot: image

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. image

sfuhrer avatar Apr 19 '24 18:04 sfuhrer

@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.

RomanBapst avatar Apr 21 '24 17:04 RomanBapst

@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.

sfuhrer avatar Apr 21 '24 22:04 sfuhrer

Cleaned up the commits and tested again in SITL. LGTM.

sfuhrer avatar Jun 07 '24 12:06 sfuhrer