core / com.acmerobotics.roadrunner.profile / MotionProfile

MotionProfile

class MotionProfile

Trapezoidal motion profile composed of motion segments.

Parameters

segments - profile motion segments

Constructors

<init>

MotionProfile(segments: List<MotionSegment>)

Trapezoidal motion profile composed of motion segments.

Functions

duration

fun duration(): Double

Returns the duration of the motion profile.

end

fun end(): MotionState

Returns the end MotionState.

flipped

fun flipped(): MotionProfile

Returns a flipped version of the motion profile.

get

operator fun get(t: Double): MotionState

Returns the MotionState at time t.

plus

operator fun plus(other: MotionProfile): MotionProfile

Returns a new motion profile with other concatenated.

reversed

fun reversed(): MotionProfile

Returns a reversed version of the motion profile.

start

fun start(): MotionState

Returns the start MotionState.