drive

fun drive(translation: Translation2d, rotation: Double, fieldOriented: Boolean)

Simple drive method that translates and rotates the robot.

Parameters

translation

The desired X and Y velocity of the robot.

rotation

The desired rotational velocity of the robot.

fieldOriented

Whether the robot's motion should be field oriented or robot oriented.


fun drive(translation: Translation2d, rotation: Double, fieldOriented: Boolean, centerOfRotation: Translation2d)

Advanced drive method that translates and rotates the robot, with a custom center of rotation.

Parameters

translation

The desired X and Y velocity of the robot.

rotation

The desired rotational velocity of the robot.

fieldOriented

Whether the robot's motion should be field oriented or robot oriented.

centerOfRotation

The center of rotation of the robot.


fun drive(velocity: ChassisSpeeds)

Simple drive method that uses ChassisSpeeds to control the robot.

Parameters

velocity

The desired ChassisSpeeds of the robot