mecanumDriveFieldCentric

fun mecanumDriveFieldCentric(frontLeft: NextMotor, frontRight: NextMotor, backLeft: NextMotor, backRight: NextMotor, gamepad: Gamepad, heading: Supplier<Double>, kinematics: MecanumKinematics = MecanumKinematics()): Command

Command that drives a mecanum drivetrain from gamepad's sticks, field-centric.

Rotates stick input by heading (radians, field-relative) so "forward" on the stick always moves the robot away from the driver, regardless of robot orientation.

Parameters

heading

Supplies the robot's current field-relative heading in radians — e.g. { follower.pose.heading } from Pedro Pathing, or an IMU reading zeroed to match the robot's starting orientation on the field.