# Slow speeds in S-curves / waypoints close together

@rmackay9 Not certain where to post this, please let me know if I should post somewhere else.

In this post in Dec 2021 Rover S-Curves alpha testing - #13 by rmackay9 you said

“One oddity of SCurves is that they will slow down if waypoints are placed too close together. There’s a built in assumption that the vehicle must be able to stop by the time it reaches the “next next” waypoint.
BTW, sometimes people add lots of waypoints in order to draw a curve. We could potentially add spline waypoint support to provide another way to produce a curve with fewer waypoints.”

I’m curious whether further development of S-Curves is continuing, and if it is, whether this oddity is being removed?

We record the perimeter of our mowing area using our mower in manual mode, recording waypoints every meter or so, resulting in the lots of waypoints situation you describe. Our rover drives them very well and it’s a thing of beauty. Except: the rover goes so slowly!! Like 0.25 m/sec or so.

It would be great if this oddity were removed, and our mower would navigate those curved areas at something approaching a regular speed (limited, of course, by the other s-curve params).

For example, here’s a section of a mowplan showing a manually recorded obstacle in orange. Scale of this image is about 20 meters side-to-side; some of the waypoint black dots are 0.5 meters separated. Our rover navigates this very well … except for the speed.

1 Like

Perhaps the easiest way to explain this is to describe the alternative to our current limitation. Lets say that you have a vehicle that has a top speed of 5 m/s and an acceleration of 1 m/s. To stop from maximum velocity requires a distance of 12.5m.

Ok, lets consider a very slightly curved path that has been defined using 0.5m segments to achieve the desired accuracy. To work out how fast we can travel we would need to look ahead 25 waypoints before we could determine what our current speed should be.

Looking ahead by an unknown number of waypoints isn’t practical.

I can think of two tools you have right now that may help.

The first is to take advantage of S-Curves corner optimisation to reduce the number of points and increase the speed. S-Curves will cut the corner based on the limits you set but they always touch the half way point between waypoints. Knowing this you may be able to simply reduce the number of waypoints and increase the distance to the obstacle. In tight corners you can use closely spaced waypoints to or delays to create sharper corners.

The second option is to use spline waypoints. These are a little more complex and take some work to calculate the path that will be generated but they calculate the speed based on the curvature. However they also are limited by the length of the segments so you again will need to replace a number of your current waypoints with a single spline segment.

The feature I would like to add to our waypoint handling is a circular segment. This would simplify your problem but also make circling an object (circle mode) much more elegant. The limit for that feature is the addition of a new waypoint type so I don’t expect to add this very soon.

3 Likes

Good explanation - very helpful. I never knew that S-curves always touch the half-way point between waypoints. As I understand it adding spline waypoints to rover is still on the development team’s to-do list.

Thank you!

1 Like