core / com.acmerobotics.roadrunner.profile / MotionProfileBuilder

MotionProfileBuilder

class MotionProfileBuilder

Easy-to-use builder for creating motion profiles.

Parameters

start - start motion state

Constructors

<init>

MotionProfileBuilder(start: MotionState)

Easy-to-use builder for creating motion profiles.

Functions

appendAccelerationControl

fun appendAccelerationControl(accel: Double, dt: Double): MotionProfileBuilder

Appends a constant-acceleration control for the provided duration.

appendJerkControl

fun appendJerkControl(jerk: Double, dt: Double): MotionProfileBuilder

Appends a constant-jerk control for the provided duration.

appendProfile

fun appendProfile(profile: MotionProfile): MotionProfileBuilder

Appends a MotionProfile to the current queue of control actions.

build

fun build(): MotionProfile

Constructs and returns the MotionProfile instance.