View Single Post
  #13   Spotlight this post!  
Unread 04-01-2015, 13:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Which controler for driving mecnum?

Quote:
Originally Posted by thinker&planner View Post
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 method1 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)