gz-sim icon indicating copy to clipboard operation
gz-sim copied to clipboard

Lift Drag Plugin: #2189 breaks reverse thrust when used to model propellers

Open srmainwaring opened this issue 1 year ago • 2 comments

Environment

Not environment specific.

Description

Previous behaviour

  • Prior to #2189 the lift-drag plugin applied to propeller blades would result in reverse thrust when the propeller direction is reversed.

Changed behaviour

  • A reversed propeller has zero thrust.

Steps to reproduce

  1. The iris quadcopter example in ardupilot_gazebo models propeller thrust by applying the lift drag plugin to each propeller blade. The upwards direction is along the axis of rotation and the forward direction is along the +/- y-direction depending upon whether the rotation is cw or ccw and which blade is being modelled (for a two blade prop).
  2. When spinning in the intended direction the prop provides the expected thrust. When reversed the prop now provides no thrust, previously the thrust would be reversed provided suitable lift drag parameters were selected.

This is the change from #2189 that altered the behaviour.

https://github.com/gazebosim/gz-sim/blob/90a7ba7e79e76d50b2cb97e4a20aad5ebba9b023/src/systems/lift_drag/LiftDrag.cc#L306-L310

srmainwaring avatar Jul 12 '24 17:07 srmainwaring

Slightly related is this conversation: https://github.com/gazebosim/gz-sim/pull/2189/files#r1348128692

I'm open to removing this line, but it seems that there are two different use cases: (1) for reversible thrust in the case of propellers and (2) for no reversible thrust (I dont think a reversed airfoil would have the same lift-drag coefficients). We probably should have a simple reversible tag that defaults to true. I should have thought of this when reviewing said PR :facepalm: .

arjo129 avatar Jul 16 '24 02:07 arjo129

We probably should have a simple reversible tag that defaults to true.

That would be a good solution that preserves previous behaviour. I'll raise a PR with the change.

Most airfoils are not symmetric when reversed, but there are exceptions: https://en.wikipedia.org/wiki/Sikorsky_S-72

srmainwaring avatar Jul 16 '24 07:07 srmainwaring