Quote:
Originally Posted by biojae
so you took your spline and split it into discrete points? then calculated the angle to the next point, and arced to the point, or did you turn, then drive straight?
|
Splitting the spline up into points is one way to do it. Create a list of fairly evenly spaced points, and go to the next point on the list when you get within a certain distance of the last point. I think our programmer wrote some equation that did it without points, but I'm fuzzy on that detail of the code.
You don't have to worry about what it does between the points. Just apply forwards power, and PID your heading. The robot can't make sharp turns easily, so it'll take a bit to make the turn and that will smooth the turn out. You can also just up the number of points. This is the same thing as approximating a circle as a many sided polygon. The more sides, the better the approximation.