PathBuilder

public final class PathBuilder

Easy-to-use builder for creating Path instances.

Parameters

startPose

start pose

startDeriv

start derivative

startSecondDeriv

start second derivative

See also

Constructors

Link copied to clipboard
public PathBuilder PathBuilder(Pose2d startPose, Angle startTangent)
public PathBuilder PathBuilder(Pose2d startPose, Boolean reversed)
public PathBuilder PathBuilder(Path path, Double s)
public PathBuilder PathBuilder(Pose2d startPose, Pose2d startDeriv, Pose2d startSecondDeriv)

Functions

Link copied to clipboard
public final PathBuilder addLine(Vector2d endPosition, HeadingInterpolation headingInterpolation)

Adds a line segment with the specified heading interpolation.

Link copied to clipboard
public final PathBuilder addSpline(Vector2d endPosition, Angle endTangent)
public final PathBuilder addSpline(Vector2d endPosition, Angle endTangent, Double startTangentMag)
public final PathBuilder addSpline(Vector2d endPosition, Angle endTangent, Double startTangentMag, Double endTangentMag)
public final PathBuilder addSpline(Vector2d endPosition, Angle endTangent, Double startTangentMag, Double endTangentMag, HeadingInterpolation headingInterpolation)

Adds a spline segment with the specified heading interpolation.

Link copied to clipboard
public final PathBuilder back(Double distance)

Adds a line straight backward.

Link copied to clipboard
public final Path build()

Constructs the Path instance.

Link copied to clipboard
public final PathBuilder forward(Double distance)

Adds a line straight forward.

Link copied to clipboard
public final PathBuilder lineTo(Vector2d endPosition)

Adds a line segment with tangent heading interpolation.

Link copied to clipboard
public final PathBuilder lineToConstantHeading(Vector2d endPosition)

Adds a line segment with constant heading interpolation.

Link copied to clipboard
public final PathBuilder lineToLinearHeading(Pose2d endPose)

Adds a line segment with linear heading interpolation.

Link copied to clipboard
public final PathBuilder lineToSplineHeading(Pose2d endPose)

Adds a line segment with spline heading interpolation.

Link copied to clipboard
public final Path preBuild()

Constructs the Path instance without reparameterizing the curves.

Link copied to clipboard
public final PathBuilder splineTo(Vector2d endPosition, Angle endTangent)

Adds a spline segment with tangent heading interpolation.

Link copied to clipboard
public final PathBuilder splineToConstantHeading(Vector2d endPosition, Angle endTangent)

Adds a spline segment with constant heading interpolation.

Link copied to clipboard
public final PathBuilder splineToLinearHeading(Pose2d endPose, Angle endTangent)

Adds a spline segment with linear heading interpolation.

Link copied to clipboard
public final PathBuilder splineToSplineHeading(Pose2d endPose, Angle endTangent)

Adds a spline segment with spline heading interpolation.

Link copied to clipboard
public final PathBuilder strafeLeft(Double distance)

Adds a segment that strafes left in the robot reference frame.

Link copied to clipboard
public final PathBuilder strafeRight(Double distance)

Adds a segment that strafes right in the robot reference frame.

Link copied to clipboard
public final PathBuilder strafeTo(Vector2d endPosition)

Adds a strafe segment (i.e., a line segment with constant heading interpolation).