PedroPathingActionBuilder

class PedroPathingActionBuilder(follower: Follower, startPose: Pose)

Builder that creates an Action from PedroPathing Paths.

Parameters

follower

the follower used to build the path and follow it when the action is executed

startPose

the starting pose of the path

Constructors

Link copied to clipboard
constructor(follower: Follower, startPose: Pose)

Functions

Link copied to clipboard
fun lineTo(endPose: Pose): PedroPathingActionBuilder

Adds a linear segment to the path from the lastPose to the endPose. The heading will be interpolated linearly between the start and end poses.

Link copied to clipboard

Adds a linear segment to the path from the lastPose to the endPose. The heading will be held constant at the lastPose's heading throughout the segment, regardless of the direction of travel.

Link copied to clipboard

Adds a linear segment to the path from the lastPose the the endPose. The heading will be interpolated tangent to the direction of travel along the segment, meaning the robot will always face the direction it is moving in.

Link copied to clipboard
fun splineTo(endPose: Pose, vararg controlPoses: Pose): PedroPathingActionBuilder

Adds a bézier curve segment to the path defined by the lastPose, controlPoses, and the endPose. The heading will be interpolated linearly between the start and end poses.

Link copied to clipboard
fun splineToConstantHeading(endPose: Pose, vararg controlPoses: Pose): PedroPathingActionBuilder

Adds a bézier curve to the path defined by the lastPose, controlPoses, and the endPose. The heading will be held constant at the lastPose's heading throughout the segment, regardless of the direction of travel.

Link copied to clipboard
fun splineToTangentHeading(endPose: Pose, vararg controlPoses: Pose): PedroPathingActionBuilder

Adds a bézier curve to the path defined by the lastPose, controlPoses, and the endPose. The heading will be interpolated tangent to the direction of travel along the segment, meaning the robot will always face the direction it is moving in.