Rover Drives Past Last Waypoint

No, I never figured it out and the problem still exists today. As a work around, I just added the last waypoint away from any obstacles so it goes there after the mission. After going to that last waypoint, it continues to drive another 10’ or so and then stops.

That sounds more like a tuning problem than a flight mode one. Look at your throttle tuning and trim values.

Hi Yuri,

I just realised the link to the log file above was broken so below are the bin as well as my config. Look in the log and you will see the rover reach the waypoint but still have a RCOUT signal to the 4 motors that decays until the rover stops. As for tuning, I am not sure which parameter(s) controls the behavior after the rover reaches the last waypoint. Any help is appriciated.

Log: Dropbox - 2020-10-01 09-27-32.bin - Simplify your life
Config: Dropbox - Rover-23 Oct 2021.param - Simplify your life

How does it behave in acro mode?

I am not sure since I only have 3 modes configured. Hold, Manual, and Auto. The rover stops immediately after the throttle is cut from the radio in manual mode.

Then I think we may have discovered your problem. If you haven’t tuned the Rover, that log won’t show anything useful. The documentation leads you to tune in acro mode because a lot of the control loop logic works similarly in acro as in auto. Have you done any tuning of the throttle and steering parameters?

I followed the “First Drive with Rover” documentation when I was first setting it up and yes, tuned the throttle. Maybe it was done poorly but the rover is pretty happy navigating my yard while in Auto and performs as expected in Manual. If it stops raining, I can change the flight modes to Hold, Acro, and Auto but don’t ever remember the rover “carrying on” when it was tuned. Seems to only happen when in Auto at the end of the mission.

2 Likes

Your Rover is tuned very poorly. Neither the throttle nor the steering is ever able to achieve or even come close to its target value:

Tuning Speed and Throttle — Rover documentation (ardupilot.org)
Tuning Turn Rate — Rover documentation (ardupilot.org)
Tuning Pivot Turns — Rover documentation (ardupilot.org)

And amazingly enough, drives autonomously following a waypoint mission ~12 hours a day without issues.

ArduPilot is a pretty incredible platform and can overcome a lot of user induced issues. But you’ve admitted that it does indeed have at least one issue, and I think we’ve found a possible root cause.

That’s really interesting. My rover also cannot achieve its speed targets, so if that can cause this issue, I think that might explain my case as well. Thanks!

1 Like

Do you think this is an integral term wind up issue?

EDIT:

It is absolutely an I windup. This is a zoomed in look at the end of your mission, and you can see that I has saturated and slowly comes back to zero after the mission ends.

image

You’ll want to tune SPEED_MAX, CRUISE_SPEED, and CRUISE_THROTTLE for sure.

The expedient fix is to zero the I term, since it’s doing you no good right now anyway, but you should probably go back to square one with tuning.

1 Like

The rover parked itself for the day due to lack of sunshine and low battery voltage. The ground is now muddy so I will look at this later this week.

I did change the some of the speed settings in the past (after tuning) because I was getting errant failsafes when the rover thought it was caught on something but was in fact just moving slowly. I remember looking and there was no way to tune around it which was unfortunate because my rover is SLOW. If I just moved up the target speed, I introduced additional error and hence the wind up problem.

I agree with your assessment that I should go back to square one with tuning. Thank you for your help!

2 Likes

Any idea why the controller doesn’t immediately transition to Hold after the mission is completed?

I bet it needs to see ATC_STOP_SPEED or less before making the flight mode switch.

EDIT: see my next post below

I decided to brave the mud and set ATC_SPEED_I = 0. I ran one lap of the normal route and the rover stopped immediately after reaching the last waypoint. Yuri, thank you for helping diagnose the problem.

2 Likes

I’ve gone through the speed control PID tune steps and the vehicle now stops reliably at its last waypoint! One oddity, though, is that it still doesn’t switch the mode to Hold after it stops. I see ‘Mission Completed’ in the messages and the ground speed is below that ATC_STOP_SPEED threshold, but it just sits there in Auto. Which is fine, functionally-- but it’s a bit strange. Are there any other conditions it might be waiting for?

See here. Though it’s slightly dated, I think the info still applies. If you want to select the hold flight mode explicitly, you could use a Lua script if scripting is supported on your autopilot.

1 Like

Aha! Thanks for the info. It doesn’t make a difference for my application as long as the rover actually stops, I just wanted to make sue nothing else was amiss. But that’s good to know about the scripting functionality anyway.