Quote:
Originally Posted by thinker&planner
I'll try to find the algorithm and put it here soon.
|
Here's a common way to do it:
Forward = (Yleft + Yright) / 2
RotateCW = (Yleft - Yright) / 2
Then feed the Forward and RotateCW values into the Y and Rotation inputs, respectively, to the MecanumDrive_Cartesian method
1 in WPILib (or LabVIEW). Use a joystick X axis or something else for the X (strafe) input.
1void RobotDrive::MecanumDrive_Cartesian(float x, float y, float rotation, float gyroAngle)