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.

Parameters

maximumVelocity - maximum robot velocity

maximumAcceleration - maximum robot acceleration

maximumAngularVelocity - maximum angular velocity

maximumAngularAcceleration - maximum angular acceleration (ignored by path-based trajectories)

Constructors

<init>

DriveConstraints(maximumVelocity: Double, maximumAcceleration: Double, maximumAngularVelocity: Double, maximumAngularAcceleration: 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.

Properties

maximumAcceleration

var maximumAcceleration: Double

maximum robot acceleration

maximumAngularAcceleration

var maximumAngularAcceleration: Double

maximum angular acceleration (ignored by path-based trajectories)

maximumAngularVelocity

var maximumAngularVelocity: Double

maximum angular velocity

maximumVelocity

var maximumVelocity: Double

maximum robot velocity

Functions

maximumAcceleration

open fun maximumAcceleration(pose: Pose2d, poseDeriv: Pose2d, poseSecondDeriv: Pose2d): Double

Returns the maximum acceleration for the given pose derivatives.

maximumVelocity

open fun maximumVelocity(pose: Pose2d, poseDeriv: Pose2d, poseSecondDeriv: Pose2d): Double

Returns the maximum velocity 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.