Path

public class Path

This is the Path class. This class handles containing information on the actual path the Follower will follow, not just the shape of the path that the BezierCurve class handles. This contains information on the stop criteria for a Path, the heading interpolation, and deceleration.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Constructors

Link copied to clipboard
public void Path(BezierCurve curve)
Creates a new Path from a BezierCurve.

Properties

Link copied to clipboard
public double closestPointCurvature
Link copied to clipboard
Link copied to clipboard
public double closestPointTValue
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
public Pose getClosestPoint(Pose pose, int searchLimit)
This gets the closest Point from a specified pose to the BezierCurve with a Newton search that is limited to some specified step limit.
Link copied to clipboard
public double getClosestPointCurvature()
This returns the curvature of the BezierCurve at the closest Point.
Link copied to clipboard
This returns the heading goal at the closest Point.
Link copied to clipboard
This returns the normal Vector at the closest Point.
Link copied to clipboard
This returns the tangent Vector at the closest Point.
Link copied to clipboard
public double getClosestPointTValue()
This returns the t-value of the closest Point on the BezierCurve.
Link copied to clipboard
Returns the ArrayList of control points for this BezierCurve.
Link copied to clipboard
public double getCurvature(double t)
This returns the curvature of the BezierCurve at a specified t-value.
Link copied to clipboard
This returns a 2D Array of doubles containing the x and y positions of points to draw on FTC Dashboard.
Link copied to clipboard
This returns the unit tangent Vector at the end of the BezierCurve.
Link copied to clipboard
Returns the first control point for this BezierCurve.
Link copied to clipboard
public double getHeadingGoal(double t)
This gets the heading goal at a specified t-value.
Link copied to clipboard
Returns the last control point for this BezierCurve.
Link copied to clipboard
This gets the heading stop criteria.
Link copied to clipboard
This gets the Path end correction time.
Link copied to clipboard
This gets the translational stop criteria.
Link copied to clipboard
This gets the parametric end criteria.
Link copied to clipboard
This gets the velocity stop criteria.
Link copied to clipboard
public Point getPoint(double t)
This returns the point on the Bezier curve that is specified by the parametric t value.
Link copied to clipboard
Returns the second control point, or the one after the start, for this BezierCurve.
Link copied to clipboard
Returns the second to last control point for this BezierCurve.
Link copied to clipboard
This gets the deceleration multiplier.
Link copied to clipboard
public boolean isAtParametricEnd()
This returns if the robot is at the end of the Path, according to the parametric t-value.
Link copied to clipboard
public boolean isAtParametricStart()
This returns if the robot is at the beginning of the Path, according to the parametric t-value.
Link copied to clipboard
public boolean isReversed()
Returns if the path is being followed in reverse
Link copied to clipboard
public double length()
This returns the approximated length of the BezierCurve.
Link copied to clipboard
public String pathType()
Returns the type of path.
Link copied to clipboard
public void setConstantHeadingInterpolation(double setHeading)
This sets the heading interpolation to maintain a constant heading.
Link copied to clipboard
public void setLinearHeadingInterpolation(double startHeading, double endHeading)
public void setLinearHeadingInterpolation(double startHeading, double endHeading, double endTime)
This sets the heading interpolation to linear with a specified start heading and end heading for the Path.
Link copied to clipboard
public void setPathEndHeadingConstraint(double set)
This sets the heading stop criteria.
Link copied to clipboard
public void setPathEndTimeoutConstraint(double set)
This sets the Path end timeout.
Link copied to clipboard
public void setPathEndTranslationalConstraint(double set)
This sets the translational stop criteria.
Link copied to clipboard
public void setPathEndTValueConstraint(double set)
This sets the parametric end criteria.
Link copied to clipboard
public void setPathEndVelocityConstraint(double set)
This sets the velocity stop criteria.
Link copied to clipboard
public void setReversed(boolean set)
This sets whether to follow the tangent heading facing away from (reverse) or towards the tangent.
Link copied to clipboard
This sets the heading interpolation to tangential.
Link copied to clipboard
public void setZeroPowerAccelerationMultiplier(double set)
This sets the path's deceleration factor in terms of the natural deceleration of the robot when power is cut from the drivetrain.