Should we disable Pivot Turns by default in 4.7

I’d like to gets opinions as to whether we should disable pivot turns by default for 4.7. My personal feeling is that we should and I’ve gone ahead and raised a PR to do this but I don’t want to upset users thus this discussion.

The issue with Pivot turns is they suffer from two key weaknesses:

  • pivots rely on a very good heading. If the heading is off then then the vehicle will end up pointing slightly off from the direction of travel towards the next waypoint. This means the vehicle tends to veer off the path at the beginning of each waypoint segment
  • pivots rely on the vehicle stopping precisely on the origin of the next waypoint segment. If they stop too close or too far then again, the vehicle ends up correcting at the beginning of the segment

SCurves on the other hand control the vehicle all the way through the corner meaning there’s no break in control and the vehicle stays mostly on the path

A half-way solution would be to change the default so skid rovers only pivot when faced with very large angles (like 120deg) instead of the current default of 60deg

FYI @Yuri_Rage @ktrussell

@rmackay9, initially I thought you were suggesting to deprecate pivots entirely. While I could be somewhat easily convinced to do so, I think it would cause quite a stir.

However, I read the PR. You are simply suggesting to turn off pivot turns by default in favor of S-Curve behavior (without removing the existing pivot option), and I fully agree. The reasons you gave above are compelling.

I’ve been mowing with a skid-steered Rover for a season and a half without using pivots at all, and the way I’ve tuned, you’d hardly know the difference except in time efficiency, since there are no complete stop/turn events. There is probably some existing hivemind attitude that pivots are absolutely required for navigating an ag/mowing path (without a towed implement), but the reality is that properly tuned S-Curve turn behavior produces superior results in most cases.

In any event, the option to use pivots remains; this is just a nudge toward avoiding them, which is a good thing.

I do think we should edit the wiki to include some additional detail for tuning skid-steered vehicles to take full advantage of S-Curve behavior, discussing how to get near-pivot behavior by tweaking the acceleration and radius parameters, as well as an example of how to mix S-Curve + pivot behavior to avoid turning too short of a very acute turn (as you allude above).

TLDR; Fully agree with the path suggested for Rover-4.7.

3 Likes

For my lawnmower, I’m OK the mixed S-curve half-way option, however I have a second rover that needs pivot turns even for < 60 degree turns. It requires the rover to be in-line with the track as it has a top platform that at every waypoint the rover pauses and allows the top platform to move 90 degrees to the track and then return before moving to the next waypoint. If it used the S-curve, I don’t think the 90-degree movement needed for the upper platform would be the desired perpendicular movement to the track.

1 Like

To be clear, this proposal DOES NOT remove pivots as an option. It just disables them by default as a nudge toward not using them in favor of more performant S-Curve turns. You can still enable pivot turns and use them as always.

3 Likes

OK, after some discussion with @Yuri_Rage and @stephendade we’ve decided to set the default to 0 (as this PR does) and then enhance the wiki a bit with advice for how to get near-pivot-turn behaviour with S-Curves.

It’s hard to make promises but we may try to improve the pivot controller (or turn controlling in general) for 4.8 (the next release is 4.7 and it certainly won’t be done in time for that)

Thanks!

2 Likes

Thanks for gathering our feedback. I also agree that setting the default to 0 is a smart change. S-Curves have been working well for me. I have my pivot angle at 120. I might disable it at some point, but honestly, I just haven’t thought about it.

As Yuri mentioned, a well-written wiki or tutorial on tuning for consistent, near-pivot turns would be really helpful. I’ll admit I haven’t put much effort into tweaking things—ArduRover (with S-Curves) has been performing well overall, with only a few minor hiccups, so I’ve mostly just let it run!

I would like to have the behavior at corners be as consistent as possible for varying mission speeds. The “Tuning Navigation” section of the documentation explains that the degree of corner-cutting is greater for higher speeds. Fine-tuning the acceleration and radius parameters may be all that I need to reduce this difference. In the days of every turn being a pivot turn, one could get consistency with just a somewhat low value for ATC_DECEL_MAX. Before I really ask for help, I need to do a little more observation. This thread would not be the right place for a detailed discussion on the topic, either.

Thanks again!

2 Likes

Hi

I wasn’t aware of S-Curves and thought that sounds good, I went to the Wiki Tuning Navigation — Rover documentation

to try and understand how to switch from Pivot to S-Curves. I don’t understand the Wiki . If I want to use S-Curves or Pivot what do I change ?
Thanks
Michael

Hi @Michael_H,

To disable pivot turns, just set WP_PIVOT_ANGLE = 0 and it will fall back to using SCurves for the corners.