core / com.acmerobotics.roadrunner.trajectory / PathTrajectorySegment

PathTrajectorySegment

class PathTrajectorySegment : TrajectorySegment

Trajectory segment backed by a list of Path objects.

Parameters

paths - paths

trajectoryConstraintsList - motion constraints for each respective path

resolution - resolution used for the motion profile (see MotionProfileGenerator.generateMotionProfile)

Constructors

<init>

PathTrajectorySegment(path: Path, trajectoryConstraints: TrajectoryConstraints, resolution: Int = 250)PathTrajectorySegment(paths: List<Path> = emptyList(), trajectoryConstraintsList: List<TrajectoryConstraints> = emptyList(), resolution: Int = 250)

Trajectory segment backed by a list of Path objects.

Properties

paths

val paths: List<Path>

paths

profile

val profile: MotionProfile

trajectoryConstraintsList

val trajectoryConstraintsList: List<TrajectoryConstraints>

motion constraints for each respective path

Functions

acceleration

fun acceleration(time: Double): Pose2d

Returns the pose acceleration at the given time.

duration

fun duration(): Double

Returns the duration of the segment.

get

operator fun get(time: Double): Pose2d

Returns the pose at the given time.

velocity

fun velocity(time: Double): Pose2d

Returns the pose velocity at the given time.