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

Control Allocation: fixes in yaw saturation detection for vehicles with tilt-for-yaw #21994

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Aug 23, 2023

Solved Problem

VTOL Tiltrotors require a special yaw saturation detection. Simply looking at whether there is unallocated yaw torque leads to almost constant saturation reporting, as often one of the tilts is saturated (they usually can't tilt backwards). I patched this previously in #20518, where I simply declared the yaw saturated if the torque setpoint was saturated. Given that there is also a collective tilt this assumption is quite rough.

While flying a tricopter with sideways tiltable tail I further noticed that there the reported unallocated yaw was never 0, while the tilt servo clearly never reached saturation:
image
I didn't investigate further why the unallocated torque calculation is so wrong, but given that MC tilt vehicles would anyway have the same issues as VTOL tiltrotor if they have tilts that only tilt in one direction, it makes sense to me to customize the saturation handling anyway also for them.

Solution

Customize yaw saturation detection for VTOL tiltrotor and MC tilts. Taking the sign of the yaw effectiveness of the corresponding tilt into account, check if the tilt is at the min or max value and set the positive or negative saturation flag if all the tilts are saturated in this direction.

Changelog Entry

For release notes:

Bugfix: fix yaw saturation logic for tilting motors (tiltrotor VTOL and MC with tilts)

Alternatives

Extend it to have it generic for all axis with tilt actuation. I wonder though if we also should first remove the tilts from the effectiveness matrix and do custom allocation of them (something similar to what is done in the Helicopter allocation).

Test coverage

SITL tested (tiltrotor).

…TOL Tiltrotor)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer added the bug label Aug 23, 2023
@sfuhrer sfuhrer requested review from bkueng and MaEtUgR August 23, 2023 07:37
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

Makes sense.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer merged commit 410206a into main Aug 24, 2023
83 of 86 checks passed
@sfuhrer sfuhrer deleted the pr-effectiveness-fix-yaw-saturation-tilts-main branch August 24, 2023 11:59
royratcliffe pushed a commit to royratcliffe/PX4-Autopilot that referenced this pull request Sep 6, 2023
…th tilt-for-yaw (PX4#21994)

* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt


---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
antbre pushed a commit to BioMorphic-Intelligence-Lab/PX4-Autopilot that referenced this pull request Sep 14, 2023
…th tilt-for-yaw (PX4#21994)

* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt


---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
ryrobotics pushed a commit to ryrobotics/PX4-Autopilot that referenced this pull request Jan 2, 2024
…th tilt-for-yaw (PX4#21994)

* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
ryrobotics pushed a commit to ryrobotics/PX4-Autopilot that referenced this pull request Jan 3, 2024
…th tilt-for-yaw (PX4#21994)

* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
ryrobotics pushed a commit to ryrobotics/PX4-Autopilot that referenced this pull request Jan 4, 2024
…th tilt-for-yaw (PX4#21994)

* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
ryrobotics pushed a commit to ryrobotics/PX4-Autopilot that referenced this pull request Jan 4, 2024
…th tilt-for-yaw (PX4#21994)

* ActuatorEffectiveness: base yaw saturation on tilt actuator limits (VTOL Tiltrotor)

* ActuatorEffectiveness: add custom yaw saturation for MC Tilt

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants