Package com.acmerobotics.roadrunner

Types

Link copied to clipboard
fun interface AccelConstraint
Link copied to clipboard
class AngularVelConstraint(val maxAngVel: Double) : VelConstraint
Link copied to clipboard
class Arclength

Arclength parameter for DualNum.

Link copied to clipboard
data class ArclengthReparamCurve2(val curve: PositionPath<Internal>, val samples: IntegralScanResult) : PositionPath<Arclength>

Arclength reparameterization of curve.

Link copied to clipboard
class CancelableProfile(    val baseProfile: DisplacementProfile,     val disps: List<Double>,     val minAccels: List<Double>)
Link copied to clipboard
class CompositeAccelConstraint(val constraints: List<AccelConstraint>, val partitions: List<Double>) : AccelConstraint
Link copied to clipboard
data class CompositePosePath(val paths: List<PosePath>, val offsets: List<Double> = paths.scan(0.0) { acc, path -> acc + path.length() }) : PosePath
Link copied to clipboard
data class CompositePositionPath<Param> @JvmOverloads constructor(val paths: List<PositionPath<Param>>, val offsets: List<Double> = paths.scan(0.0) { acc, path -> acc + path.length() }) : PositionPath<Param>
Link copied to clipboard
class CompositeVelConstraint(val constraints: List<VelConstraint>, val partitions: List<Double>) : VelConstraint
Link copied to clipboard
data class ConstantHeadingPath(val heading: Rotation2d, val length: Double) : HeadingPath
Link copied to clipboard
class ConstantPathBuilder
Link copied to clipboard
class ConstantTrajectoryBuilder
Link copied to clipboard
data class DisplacementProfile(    val disps: List<Double>,     val vels: List<Double>,     val accels: List<Double>)

Motion profile parameterized by displacement.

Link copied to clipboard
class DisplacementTrajectory(val path: PosePath, val profile: DisplacementProfile)
Link copied to clipboard
class DualNum<Param>
Link copied to clipboard
interface HeadingPath
Link copied to clipboard
data class HeadingPosePath(val posPath: PositionPath<Arclength>, val headingPath: HeadingPath) : PosePath
Link copied to clipboard
class HolonomicController(    val axialPosGain: Double,     val lateralPosGain: Double,     val headingGain: Double,     val axialVelGain: Double,     val lateralVelGain: Double,     val headingVelGain: Double)

Proportional position-velocity controller for a holonomic robot.

Link copied to clipboard
data class IntegralScanResult(val values: List<Double>, val sums: List<Double>)
Link copied to clipboard
class Internal

Generic, internal parameter for DualNum.

Link copied to clipboard
data class Line(    val begin: Vector2d,     val dir: Vector2d,     val length: Double) : PositionPath<Arclength>

Line beginning at position begin, pointed in direction dir, and having length length.

Link copied to clipboard
data class LinearHeadingPath(    val begin: Rotation2d,     val angle: Double,     val length: Double) : HeadingPath
Link copied to clipboard
data class MecanumKinematics @JvmOverloads constructor(val trackWidth: Double, val lateralMultiplier: Double = 1.0)
Link copied to clipboard
data class MinMax(val min: Double, val max: Double)
Link copied to clipboard
class MinVelConstraint(val constraints: List<VelConstraint>) : VelConstraint
Link copied to clipboard
data class MotorFeedforward(    val kS: Double,     val kV: Double,     val kA: Double)
Link copied to clipboard
class PathBuilder
Link copied to clipboard
data class Pose2d(val trans: Vector2d, val rot: Rotation2d)
Link copied to clipboard
data class Pose2dDual<Param>(val trans: Vector2dDual<Param>, val rot: Rotation2dDual<Param>)

Dual version of Pose2d.

Link copied to clipboard
interface PosePath
Link copied to clipboard
class PosePathSeqBuilder
Link copied to clipboard
interface PositionPath<Param>
Link copied to clipboard
data class PositionPathView<Param>(    val path: PositionPath<Param>,     val offset: Double,     val length: Double) : PositionPath<Param>
Link copied to clipboard
class PosPathSeqBuilder
Link copied to clipboard
class ProfileAccelConstraint(val minAccel: Double, val maxAccel: Double) : AccelConstraint
Link copied to clipboard
data class QuinticSpline1(    val a: Double,     val b: Double,     val c: Double,     val d: Double,     val e: Double,     val f: Double)
Link copied to clipboard
data class QuinticSpline2(val x: QuinticSpline1, val y: QuinticSpline1) : PositionPath<Internal>

Path comprised of two QuinticSpline1s.

Link copied to clipboard
class RamseteController @JvmOverloads constructor(    val trackWidth: Double,     val zeta: Double = 0.7,     val bBar: Double = 2.0)
Link copied to clipboard
class RestrictedPathBuilder
Link copied to clipboard
class RestrictedPosePathBuilder

Do not instantiate directly. See SafePosePathBuilder.

Link copied to clipboard
class RestrictedTrajectoryBuilder
Link copied to clipboard
data class Rotation2d(val real: Double, val imag: Double)
Link copied to clipboard
data class Rotation2dDual<Param>(val real: DualNum<Param>, val imag: DualNum<Param>)

Dual version of Rotation2d.

Link copied to clipboard
class SafePathBuilder
Link copied to clipboard
class SafePosePathBuilder

Wrapper for PosePathSeqBuilder that provides the same guarantees without throwing PosePathSeqBuilder.RotationContinuityException.

Link copied to clipboard
class SafeTrajectoryBuilder
Link copied to clipboard
data class SplineHeadingPath(    val begin: Rotation2d,     val spline: QuinticSpline1,     val length: Double) : HeadingPath
Link copied to clipboard
data class TangentPath(val path: PositionPath<Arclength>, val offset: Double) : PosePath
Link copied to clipboard
class TangentPathBuilder
Link copied to clipboard
class TangentTrajectoryBuilder
Link copied to clipboard
data class TankKinematics(val trackWidth: Double)
Link copied to clipboard
class Time

Time parameter for DualNum.

Link copied to clipboard
data class TimeProfile @JvmOverloads constructor(val dispProfile: DisplacementProfile, val times: List<Double> = timeScan(dispProfile))

Motion profile parameterized by time.

Link copied to clipboard
class TimeTrajectory(val path: PosePath, val profile: TimeProfile)
Link copied to clipboard
class Trajectory(    val path: PosePath,     val profile: CancelableProfile,     val offsets: List<Double>)
Link copied to clipboard
class TrajectoryBuilder
Link copied to clipboard
class TranslationalVelConstraint(val minTransVel: Double) : VelConstraint
Link copied to clipboard
data class Twist2d(val transVel: Vector2d, val rotVel: Double)

2D twist (velocities)

Link copied to clipboard
data class Twist2dDual<Param>(val transVel: Vector2dDual<Param>, val rotVel: DualNum<Param>)

Dual version of Twist2d.

Link copied to clipboard
data class Twist2dIncr(val transIncr: Vector2d, val rotIncr: Double)
Link copied to clipboard
data class Twist2dIncrDual<Param>(val transIncr: Vector2dDual<Param>, val rotIncr: DualNum<Param>)
Link copied to clipboard
data class Vector2d(val x: Double, val y: Double)
Link copied to clipboard
data class Vector2dDual<Param>(val x: DualNum<Param>, val y: DualNum<Param>)

Dual version of Vector2d.

Link copied to clipboard
fun interface VelConstraint

Functions

Link copied to clipboard
fun backwardProfile(    disps: List<Double>,     maxVels: List<Double>,     endVel: Double,     minAccels: List<Double>): DisplacementProfile

Computes an approximately time-optimal backward profile from the center-sampled constraints. No restriction is imposed on the maximum acceleration.

fun backwardProfile(    path: PosePath,     velConstraint: VelConstraint,     endVel: Double,     accelConstraint: AccelConstraint,     resolution: Double): DisplacementProfile

fun backwardProfile(    length: Double,     maxVel: (Double) -> Double,     endVel: Double,     minAccel: (Double) -> Double,     resolution: Double): DisplacementProfile

Computes an approximately time-optimal backward profile by sampling the constraints according to the resolution resolution. No restriction is imposed on the minimum acceleration.

Link copied to clipboard
fun clamp(    x: Double,     lo: Double,     hi: Double): Double
Link copied to clipboard
fun constantProfile(    length: Double,     beginEndVel: Double,     maxVel: Double,     minAccel: Double,     maxAccel: Double): CancelableProfile

Computes an exact, time-optimal profile.

Link copied to clipboard
fun forwardProfile(    disps: List<Double>,     beginVel: Double,     maxVels: List<Double>,     maxAccels: List<Double>): DisplacementProfile

Computes an approximately time-optimal forward profile from the center-sampled constraints. No restriction is imposed on the minimum acceleration.

fun forwardProfile(    path: PosePath,     beginVel: Double,     velConstraint: VelConstraint,     accelConstraint: AccelConstraint,     resolution: Double): DisplacementProfile

fun forwardProfile(    length: Double,     beginVel: Double,     maxVel: (Double) -> Double,     maxAccel: (Double) -> Double,     resolution: Double): DisplacementProfile

Computes an approximately time-optimal forward profile by sampling the constraints according to the resolution resolution. No restriction is imposed on the minimum acceleration.

Link copied to clipboard
fun integralScan(    a: Double,     b: Double,     eps: Double,     f: (Double) -> Double): IntegralScanResult
Link copied to clipboard
fun lerp(    x: Double,     fromLo: Double,     fromHi: Double,     toLo: Double,     toHi: Double): Double
Link copied to clipboard
fun merge(p1: DisplacementProfile, p2: DisplacementProfile): DisplacementProfile

Merges p1 and p2 into another profile with the minimum velocity of the two at every point.

Link copied to clipboard
fun profile(    path: PosePath,     beginEndVel: Double,     velConstraint: VelConstraint,     accelConstraint: AccelConstraint,     resolution: Double): CancelableProfile

fun profile(    disps: List<Double>,     beginEndVel: Double,     maxVels: List<Double>,     minAccels: List<Double>,     maxAccels: List<Double>): CancelableProfile

Computes an approximately time-optimal profile from center-sampled constraints.

fun profile(    length: Double,     beginEndVel: Double,     maxVel: (Double) -> Double,     minAccel: (Double) -> Double,     maxAccel: (Double) -> Double,     resolution: Double): CancelableProfile

Computes an approximately time-optimal profile by sampling the constraints according to the resolution resolution.

Link copied to clipboard
fun project(    path: PosePath,     query: Vector2d,     init: Double): Double
fun project(    path: PositionPath<Arclength>,     query: Vector2d,     init: Double): Double

Project position query onto position path path starting with initial guess init.

Link copied to clipboard
fun range(    begin: Double,     end: Double,     samples: Int): List<Double>
Link copied to clipboard
fun rangeMiddle(    begin: Double,     end: Double,     samples: Int): List<Double>
Link copied to clipboard
fun snz(x: Double): Double