core / com.acmerobotics.roadrunner.trajectory / TrajectorySegment

TrajectorySegment

interface TrajectorySegment

Generic trajectory segment.

Functions

acceleration

abstract fun acceleration(time: Double): Pose2d

Returns the pose acceleration at the given time.

duration

abstract fun duration(): Double

Returns the duration of the segment.

get

abstract operator fun get(time: Double): Pose2d

Returns the pose at the given time.

velocity

abstract fun velocity(time: Double): Pose2d

Returns the pose velocity at the given time.

Inheritors

PathTrajectorySegment

class PathTrajectorySegment : TrajectorySegment

Trajectory segment backed by a list of Path objects.

PointTurn

class PointTurn : TrajectorySegment

Point turn trajectory segment.

WaitSegment

class WaitSegment : TrajectorySegment

Static trajectory segment that holds a constant pose. Used for giving trajectories extra time to settle.