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

Rover: Circle mode instabilities #25825

Open
stephendade opened this issue Dec 23, 2023 · 2 comments
Open

Rover: Circle mode instabilities #25825

stephendade opened this issue Dec 23, 2023 · 2 comments
Labels

Comments

@stephendade
Copy link
Contributor

Whilst attempting to tune my rover, I experienced some serious instabilities and "wandering off" in circle mode:

5m circle at 2m/s speed:
xmaxx-2ms

A 5m circle at 1m/s speed was fine.

My current theory is that the default steering PID values are too low for this particular vehicle. I've confirmed in manual mode that the vehicle can definitely turn at the rates needed for a 5m circle at 2m/s (23deg/sec).

I could replicate it in SITL via restricting the ATC_STR_ACC_MAX and ATC_STR_RAT_MAX parameters to below the minimum degrees/sec required for the circle. So:

param set CIRC_RADIUS 5
param set CIRC_SPEED 4
param set ATC_STR_ACC_MAX 90
param set ATC_STR_RAT_MAX 30

SITL result:
sitl

I usually wouldn't be concerned about an untuned vehicle performing badly in these higher level flight modes, but given the Quiktune feature requires running in circle mode, it should be expected that untuned vehicles will be running in this mode.

For a fix, I'd suggest that circle mode needs to stop the vehicle if it gets more than X metres outside the circle (where X is +20% on radius?) and suggest to the user that they either a) Increase the radius b) decrease the speed c) increase the Steering PID FF(?).

Alternatively, maybe the way circle mode calculates it's trajectory needs to be improved? I feel that it does wander more than necessary ... it's like it gives up after a while!

@rmackay9 rmackay9 added the Rover label Dec 25, 2023
@rmackay9
Copy link
Contributor

yes, I've seen these problems as well actually but haven't found a way to protect against the problem. I think the issue occurs because we pass a target position, velocity and acceleration to the position controller but even a large position error does not overpower the velocity and acceleration inputs. So maybe the solution should be that the desired velocity and acceleration only get to use whatever control bandwidth is left after the velocity and acceleration required to shrink the position error has been calculated.

@stephendade
Copy link
Contributor Author

stephendade commented Jan 2, 2024

As an update to anyone with a similar problem: Increasing ATC_STR_RAT_FF can "fix" the issue until a quiktune can be run.

So maybe the solution should be that the desired velocity and acceleration only get to use whatever control bandwidth is left after the velocity and acceleration required to shrink the position error has been calculated.

So, emphasising having the correct position over having the correct forward velocity? It'd be sensible that the vehicle would slow down its velocity if it can't make the turn in time - much like AUTO mode's slowing-down-in-corners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants