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

DriveConstraints

open class DriveConstraints : TrajectoryConstraints (source)

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>

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.

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

Properties

maxAccel

maximum robot acceleration

var maxAccel: Double

maxAngAccel

maximum angular acceleration (ignored by trajectories)

var maxAngAccel: Double

maxAngJerk

maximum angular jerk (ignored by trajectories)

var maxAngJerk: Double

maxAngVel

maximum angular velocity

var maxAngVel: Double

maxJerk

maximum robot jerk (ignored by dynamic profiles)

var maxJerk: Double

maxVel

maximum robot velocity

var maxVel: Double

Functions

get

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

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

Inheritors

MecanumConstraints

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

open class MecanumConstraints : DriveConstraints

SwerveConstraints

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

open class SwerveConstraints : DriveConstraints

TankConstraints

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

open class TankConstraints : DriveConstraints