getVelocityConstraint

fun getVelocityConstraint(maxVel: Double, maxAngularVel: Double, trackWidth: Double): TrajectoryVelocityConstraint

Creates a velocity constraint for a Mecanum drive.

This function combines an AngularVelocityConstraint and a MecanumVelocityConstraint into a MinVelocityConstraint to ensure the bot adheres to both constraints.

Return

A TrajectoryVelocityConstraint that enforces the specified constraints.

Parameters

maxVel

The maximum linear velocity.

maxAngularVel

The maximum angular velocity.

trackWidth

The track width of the bot.