ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.1k stars 17.68k forks source link

SITL Plane treats SERVOn_FUNCTION = 0 as valid ouput #12293

Open vierfuffzig opened 5 years ago

vierfuffzig commented 5 years ago

Stumbled across the plane flying funny squiggles if rudder servo is disabled (SERVO4_FUNCTION = 0). It doesn't if i leave _FUNCTION at 21 and fix pwm output to 1500. My guess is SITL treats PWM 0 as a valid output here.

SITL ArduPlane V3.10.0-dev (b4537beb)

Log: https://github.com/vierfuffzig/Chibios-miscellaneous/raw/master/SITL_OUTPUT_0.BIN

peterbarker commented 5 years ago

Please check again in master.

I broke it and tridge reverted that commit.

vierfuffzig commented 5 years ago

@peterbarker thanks for looking into this. tested on latest commit https://github.com/ArduPilot/ardupilot/commit/8b92df51 as well as https://github.com/ArduPilot/ardupilot/commit/6c6a7cc prior to your respective commit https://github.com/ArduPilot/ardupilot/commit/1735563 , the issue persists in both, so imho this is unrelated. on a sidenote, it requires restarting SITL after you set SERVO4_FUNCTION = 0 to show the effect. setting it back to active however solves the squiggly flight pattern promptly on param write.

marck3131 commented 2 years ago

Hello @peterbarker , is this issue resolved yet? I could see no responses in this thread , Can I work on this issue? Thankyou.

hendjoshsr71 commented 2 years ago

If you are interested in it go ahead! First PR to be submitted and merged wins!

peterbarker commented 1 year ago

Reproduction is straight-forward.

First, see normal behaviour with:

mode fbwa
arm throttle
rc 3 2000

takes off in a straight line

then disable the rudder servo:

param set SERVO4_FUNCTION 0

then try the same takeoff again. You should see the thing essentially turning on the spot. That's not what it should do.

divyaS09 commented 1 year ago

I would like to contribute to resolving this issue. Please assign this issue to me.