public class FalconPathPlanner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
double[][] |
heading
Array of expected heading readings (in degrees).
|
double |
numFinalPoints
Total number of setpoints generated as part of the path planning process
|
double[][] |
smoothLeftVelocity
Array of desired left wheel velocities.
|
double[][] |
smoothRightVelocity
Array of desired right wheel velocities.
|
Constructor and Description |
---|
FalconPathPlanner(double[][] path)
Constructor, takes a Path of Way Points defined as a double array of column vectors
representing the global cartesian points of the path in {x,y} coordinates.
|
Modifier and Type | Method and Description |
---|---|
void |
calculate(double totalTime,
double timeStep,
double robotTrackWidth)
This code will calculate a smooth path based on the program parameters.
|
static void |
main(java.lang.String[] args) |
void |
poofExample() |
static void |
print(double[] path) |
static void |
print(double[][] path)
Prints Cartesian Coordinates to the System Output as Column Vectors in the Form X Y
|
void |
setPathAlpha(double alpha)
Advanced path adjustment.
|
void |
setPathBeta(double beta)
Advanced path adjustment.
|
void |
setPathTolerance(double tolerance)
Advanced path adjustment.
|
void |
setVelocityAlpha(double alpha)
Advanced path adjustment.
|
void |
setVelocityBeta(double beta)
Advanced path adjustment.
|
double[][] |
smoother(double[][] path,
double weight_data,
double weight_smooth,
double tolerance)
Optimization algorithm, which optimizes the data points in path to create a smooth
trajectory.
|
public double[][] smoothRightVelocity
public double[][] smoothLeftVelocity
public double[][] heading
public double numFinalPoints
public FalconPathPlanner(double[][] path)
path
- array of waypoints to plot a path for.public static void print(double[] path)
public static void print(double[][] path)
path
- public double[][] smoother(double[][] path, double weight_data, double weight_smooth, double tolerance)
path
- weight_data
- weight_smooth
- tolerance
- public void setPathAlpha(double alpha)
alpha
- public void setPathBeta(double beta)
alpha
- public void setPathTolerance(double tolerance)
alpha
- public void setVelocityAlpha(double alpha)
alpha
- public void setVelocityBeta(double beta)
alpha
- public void calculate(double totalTime, double timeStep, double robotTrackWidth)
totalTime
- - time the user wishes to complete the path in seconds. (this is the maximum
amount of time the robot is allowed to take to traverse the path.)timeStep
- - the frequency at which the robot controller is running on the robot.robotTrackWidth
- - total distance between left and right side wheels of a skid steer
chassis. Known as the track width.public static void main(java.lang.String[] args)
public void poofExample()