View Single Post
  #15   Spotlight this post!  
Unread 19-02-2011, 23:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: how to program mecanum wheel drive?

Quote:
Originally Posted by sjspry View Post
As for #1, yeah, as far as I know everything should be backwards because of the Joystick output. They might need to modify it....
The joystick X-axis is + to the right. So your code should be

Code:
front_Left = -mainJoy.getY() + rotJoy.getX() + mainJoy.getX()
front_Right = -mainJoy.getY() - rotJoy.getX() - mainJoy.getX()

back_Left = -mainJoy.getY() + rotJoy.getX() - mainJoy.getX()
back_Right = -mainJoy.getY() - rotJoy.getX() + mainJoy.getX()