Sie sind auf Seite 1von 2

Robot Path Interpolating Software

Jared Di Carlo, FRC 236

Background
This project was inspired by The Cheesy Poofs 2014 software release which contained a Java application
which generated their autonomous mode paths. It was used to generate their Einstein path to dodge
1114s blocker. It was also inspired by our robots failure in autonomous last year.

Differences from 254s method


254s method was designed to work well in the 2014 season. In future years, more features may be
needed. The implementation between the two pieces of software is quite different, but in the end
result, there are only three major differences. 254s software allows them to generate a series of
functions to represent their robots path on the field. Because their path must be a function, the robot
cannot travel on the same x coordinate more than once, which prohibits them from driving in shapes
like a circle, or anything that loops back on itself. This is likely because interpolating parametric hermite
splines is difficult to do well. To solve this problem, I have used a series of parametric cubic Bezier
curves for the majority of the interpolation. These curves can loop back on themselves and make
shapes like a figure eight or a circle. The Bezier curves work well because they are relaxed and have
the second derivatives at the endpoints equal to zero. The second difference is the lack of hermite
waypoints in my implementation. The robots heading at a waypoint cannot be specified with cubic
Bezier curves. However, quintic polynomials are used in my implementation at the start and endpoint
to allow control over the robots starting and finishing heading. This functionality is advantageous
because it allows me to generate a path without having to think about the heading I would like the robot
to travel at as it passes through each waypoint. It also increases the smoothness of the path. The final
difference is in the user interface of the software. Generating splines that make sense can be difficult
without being able to see the result. My implementation has a graphical drag and drop window. The
spline updates as the points are dragged around the screen. For precision input, exact locations of
waypoints can be typed in manually.

How it works
This section will cover how the math related portions of the program work. The program starts by
interpolating a curve between the second and second to last waypoints. At these points, the robot
heading doesnt matter to us, so we use a cubic Bezier spline. The implementation is from a PDF file
from UCLA which is no longer available online. The program takes the points that lie on the curve and
calculate Bezier control points from these. Then, lines are drawn to connect each segment. After the
Bezier curve has been generated, we need to make a smooth curve that connects the endpoints to the
Bezier curve in the middle. These end curves are bolded in the program.

In order for the curve to be smooth, the second derivative must be continuous, which can be a problem
at the connections between splines. In this situation, the first derivative represents the slope of the line
and is related to the robots heading. The second derivative measures how fast the first derivative
changes, and is related the turning radius at a point. The tighter turns have a smaller turning radius and,
as a result of changing directions quickly, have a larger second derivative. If only the first derivative is
continuous, meaning it must be equal at the endpoints of the splines, the robots heading may be
continuous, but if the second derivatives are not equal, it may suddenly change the tightness of the turn
in a jerky way. In addition, the second derivative is used to help determine the robots velocity. If the
second derivative is very large, the robot is changing directions quickly and needs to travel slower. So, if
the second derivative has a jump the velocity will have a jump too.

To solve this problem a quintic hermite spline is used.

Das könnte Ihnen auch gefallen