core / com.acmerobotics.roadrunner.trajectory.constraints / DriveConstraints

DriveConstraints

open class DriveConstraints : TrajectoryConstraints

This class describes general robot trajectory constraints. More specifically, for paths, the robot velocity, robot acceleration, and robot angular velocity are limited. For point turns, the angular velocity and angular acceleration are limited. If maxJerk or maxAngJerk are 0, acceleration-limited fallbacks will be used.

Parameters

maxVel - maximum robot velocity

maxAccel - maximum robot acceleration

maxJerk - maximum robot jerk (ignored by dynamic profiles)

maxAngVel - maximum angular velocity

maxAngAccel - maximum angular acceleration (ignored by trajectories)

maxAngJerk - maximum angular jerk (ignored by trajectories)

Constructors

<init>

DriveConstraints(maxVel: Double, maxAccel: Double, maxJerk: Double, maxAngVel: Double, maxAngAccel: Double, maxAngJerk: Double)

This class describes general robot trajectory constraints. More specifically, for paths, the robot velocity, robot acceleration, and robot angular velocity are limited. For point turns, the angular velocity and angular acceleration are limited. If maxJerk or maxAngJerk are 0, acceleration-limited fallbacks will be used.

Properties

maxAccel

var maxAccel: Double

maximum robot acceleration

maxAngAccel

var maxAngAccel: Double

maximum angular acceleration (ignored by trajectories)

maxAngJerk

var maxAngJerk: Double

maximum angular jerk (ignored by trajectories)

maxAngVel

var maxAngVel: Double

maximum angular velocity

maxJerk

var maxJerk: Double

maximum robot jerk (ignored by dynamic profiles)

maxVel

var maxVel: Double

maximum robot velocity

Functions

get

open fun get(pose: Pose2d, deriv: Pose2d, secondDeriv: Pose2d): SimpleMotionConstraints

Returns the maximum velocity and acceleration for the given pose derivatives.

Inheritors

MecanumConstraints

open class MecanumConstraints : DriveConstraints

Mecanum-specific drive constraints that also limit maximum wheel velocities.

SwerveConstraints

open class SwerveConstraints : DriveConstraints

Mecanum-specific drive constraints that also limit maximum wheel velocities.

TankConstraints

open class TankConstraints : DriveConstraints

Tank-specific drive constraints that also limit maximum wheel velocities.