ArduPilot / ardupilot

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

Sub: pilot override in POSHOLD mode results in "bounce back" #28120

Open clydemcqueen opened 2 months ago

clydemcqueen commented 2 months ago

Bug report

Issue details

Pilot override in POSHOLD mode results in a ~1m "bounce back".

I saw this on real hardware (BlueROV2 heavy + DVL) running a DEV build. I moved the ROV away from the dock while in POSHOLD mode, when I let go of the stick the ROV seemed to jump back towards the dock.

I can reproduce this in SITL on master and Sub-4.5. I was not able to reproduce on Sub-4.1.

To reproduce:

Version

master, Sub-4.5

Platform [ ] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ x ] Submarine

Airframe type

All

Hardware type

All

Logs

I can provide the BlueROV2 logs, but they are a bit big (replay on, long-ish guided mode test). LMK.

Williangalvani commented 1 month ago

I could replicate this on Sitl, but not on a real vehicle. On SITL the target_position keeps changing when we let go of the sticks: image

This doesn't seem to happen on my rov:

image

clydemcqueen commented 1 month ago

This is from a dive with a BlueROV2 heavy w/ DVL on 2024-sep-11: image

I'll try to dig into the code tomorrow.

clydemcqueen commented 1 month ago

Huge thanks to @Williangalvani for tracking this down!

It looks like a few factors contributed:

Proposed fix:

This is important for our use case so we are motivated to fix it. But I suspect that most users have never experienced this, and probably won't.