PathMaker

open inner class PathMaker

Utility construction class for Path instances that can be executed by PurePursuit. Pathing generated through this builder must follow continuity.

Constructors

Link copied to clipboard
constructor(startPoseAtRuntime: Supplier<Pose2d>)
Create a new PathMaker.

Functions

Link copied to clipboard
Adds a task to the AutonomousBunyipsOpMode queue that will build and run the path when executed.
Link copied to clipboard
Adds a task to the AutonomousBunyipsOpMode queue that builds the path now and returns a task that will track the path when executed.
Link copied to clipboard
open fun back(distance: Double, unit: Distance): PurePursuit.PathMaker
Adds a line straight backward.
Link copied to clipboard
open fun buildPath(): Path
Builds the path and returns it.
Link copied to clipboard
Build a task that will build and run the path when executed.
Link copied to clipboard
Builds the path now and returns a task that will track the path when executed.
Link copied to clipboard
open fun forward(distance: Double, unit: Distance): PurePursuit.PathMaker
Adds a line straight forward.
Link copied to clipboard
open fun lineTo(endPosition: Vector2d, unit: Distance): PurePursuit.PathMaker
Adds a line segment with tangent heading interpolation.
Link copied to clipboard
open fun lineToConstantHeading(endPosition: Vector2d, unit: Distance): PurePursuit.PathMaker
Adds a line segment with constant heading interpolation.
Link copied to clipboard
open fun lineToLinearHeading(endPose: Pose2d, vectorUnit: Distance, angleUnit: Angle): PurePursuit.PathMaker
Adds a line segment with linear heading interpolation.
Link copied to clipboard
open fun lineToSplineHeading(endPose: Pose2d, vectorUnit: Distance, angleUnit: Angle): PurePursuit.PathMaker
Adds a line segment with spline heading interpolation.
Link copied to clipboard
Run this path backwards by adding a 180-degree tangent to the start pose.
Link copied to clipboard
open fun splineTo(endPosition: Vector2d, distanceUnit: Distance, endTangent: Double, angleUnit: Angle): PurePursuit.PathMaker
Adds a spline segment with tangent heading interpolation.
Link copied to clipboard
open fun splineToConstantHeading(endPosition: Vector2d, distanceUnit: Distance, endTangent: Double, angleUnit: Angle): PurePursuit.PathMaker
Adds a spline segment with constant heading interpolation.
Link copied to clipboard
open fun splineToLinearHeading(endPose: Pose2d, vectorUnit: Distance, angleUnit: Angle, endTangent: Double, endTangentUnit: Angle): PurePursuit.PathMaker
Adds a spline segment with linear heading interpolation.
Link copied to clipboard
open fun splineToSplineHeading(endPose: Pose2d, vectorUnit: Distance, angleUnit: Angle, endTangent: Double, endTangentUnit: Angle): PurePursuit.PathMaker
Adds a spline segment with spline heading interpolation.
Link copied to clipboard
open fun strafeLeft(distance: Double, unit: Distance): PurePursuit.PathMaker
Adds a segment that strafes left in the robot reference frame.
Link copied to clipboard
open fun strafeRight(distance: Double, unit: Distance): PurePursuit.PathMaker
Adds a segment that strafes right in the robot reference frame.
Link copied to clipboard
open fun strafeTo(endPosition: Vector2d, unit: Distance): PurePursuit.PathMaker
Adds a strafe segment (i.e., a line segment with constant heading interpolation).
Link copied to clipboard
Set a custom task name of the path to show up in the telemetry.
Link copied to clipboard
Set the priority level of the task if being added to a AutonomousBunyipsOpMode via the add task methods.
Link copied to clipboard
Run this path with this defined starting tangent.
Link copied to clipboard
Set a timeout for the path, to be applied to the overhead task running the path.