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

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

Open
clydemcqueen opened this issue Sep 16, 2024 · 3 comments · May be fixed by #28205
Open

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

clydemcqueen opened this issue Sep 16, 2024 · 3 comments · May be fixed by #28205
Labels
Milestone

Comments

@clydemcqueen
Copy link
Contributor

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:

  • run sim_vehicle.py with -w, etc.
  • run QGC w/ joystick
  • wait for EKF3 IMU0 is using GPS
  • arm, poshold
  • use the joystick to move forward aggressively a few meters
  • let go of the stick, the sub will move back a meter or so

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 Williangalvani added this to the Sub-4.5 milestone Sep 16, 2024
@Williangalvani
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

Huge thanks to @Williangalvani for tracking this down!

It looks like a few factors contributed:

  • Sub poshold mode calls position_control->set_max_speed_accel_xy with WPNAV_SPEED. In our case, we set WPNAV_SPEED very low for running survey transects.
  • Sub poshold does not limit the pilot xy speed. In our case, the pilot was easily able to exceed WPNAV_SPEED.
  • When the pilot let go of the stick, the PSC velocity controller took over and quickly wound up until acceleration hit the max, and the sub lurched backward.

Proposed fix:

  • Add a PILOT_SPEED parameter for xy pilot control, and use it in poshold.

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.

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 a pull request may close this issue.

2 participants