I have been experimenting with various drive arc algorithms for my team’s autonomous mode, and I wonder what other teams use? By drive arc, I mean algorithms that take the robot from point A to point B with various characteristics, such as a nice gentle ramp-up, or maybe a PID loop to stop on a dot.
This year 254 ran a system that could generate and drive along a given spline (not an arc, but close enough). The first step was to derive a set of splines to follow given a set of waypoints (x,y,heading combonations) using quintic hermite spline interpolation (an algorithm to generate a 5th order polynomial using the positions, headings and rate of change in heading at consecutive waypoints). After this, the splines are broken down into encoder position, robot heading, velocity, acceleration, and jerk target profiles over time. Then control loops attempt to match the profiles over time. You can find the source code we used for this project here
I apologize if I was a bit unclear. by “drive arc” I was referring to the power vs time profile of driving the robot in a straight line. Eg accelerating to top speed and the gracefully slowing down, an “arc” on a graph of speed vs time.
This is something 254 has been doing since at least 2011, and was incorporated (a prerequisite, really) into their spline following code. There are numerous recent threads on the topic:
Some “motion profile” search results:
You could use some S-Curve acceleration. Just look it up online, should be relatively easy to implement
I’d recommend starting with just a distance PID, since it sounds like you don’t have that yet. Once you get that working, you can decide what to add.
We’ve been using Jared Russel’s method #1 from http://www.chiefdelphi.com/forums/showpost.php?p=1087308&postcount=3 for a few years.
For the drive train, we’ve been happy with a linear ramp over a fraction of a second on start, and let the PID handle the deceleration. For other devices, we’ve done a trapezoidal profile. The fancier you make the profile, the more items to tune (or you need a decent model), so we try to start simple.