core / com.acmerobotics.roadrunner.profile / MotionProfile

MotionProfile

class MotionProfile (source)

Trapezoidal motion profile composed of motion segments.

Parameters

segments - profile motion segments

Constructors

<init>

Trapezoidal motion profile composed of motion segments.

MotionProfile(segments: List<MotionSegment>)

Properties

segments

profile motion segments

val segments: List<MotionSegment>

Functions

duration

Returns the duration of the motion profile.

fun duration(): Double

end

Returns the end MotionState.

fun end(): MotionState

flipped

Returns a flipped version of the motion profile.

fun flipped(): MotionProfile

get

Returns the MotionState at time t.

operator fun get(t: Double): MotionState

plus

Returns a new motion profile with other concatenated.

operator fun plus(other: MotionProfile): MotionProfile

reversed

Returns a reversed version of the motion profile.

fun reversed(): MotionProfile

start

Returns the start MotionState.

fun start(): MotionState