Log in

View Full Version : Understanding Mecanum Drive


Matt_4505
06-01-2014, 22:40
Hello Everyone,

I have a technical question regarding programming a mecanum drivetrain. Looking at wpilib (https://wpilib.screenstepslive.com/s/3120/m/7912/l/95588-getting-your-robot-to-drive-with-the-robotdrive-class#!prettyPhoto) one would setup the mecanumDrive_Polar method by using a joystick's Y axis for both the magnitude and direction parameter. How does the method determine if the joystick is moving right or left if it's only sampling the Y axis?

Thank you!

Joe Ross
06-01-2014, 23:30
I have a technical question regarding programming a mecanum drivetrain. Looking at wpilib (https://wpilib.screenstepslive.com/s/3120/m/7912/l/95588-getting-your-robot-to-drive-with-the-robotdrive-class#!prettyPhoto) one would setup the mecanumDrive_Polar method by using a joystick's Y axis for both the magnitude and direction parameter. How does the method determine if the joystick is moving right or left if it's only sampling the Y axis?

That looks like an error to me. I think the second getY should be getX.

BradAMiller
07-01-2014, 02:46
Thanks Matt and Joe.

The example has been updated.

Brad