Thread: Arcade Mecanums
View Single Post
  #5   Spotlight this post!  
Unread 16-02-2011, 15:33
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
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: Arcade Mecanums

Quote:
Originally Posted by dmitch View Post
I was wondering how you could code an arcade drive with mecanum wheels? Basically, we want forward on both to be forward, left on both to strafe left, and then forward on left back on right to be turn right, and vice versa for all of these.

I was thinking that for left and right, and front and back, you could half the joystick values and then add them, and feed the subsequent number to the x and y inputs on the mecanums vi. However, I am stumped on the rotation. Any helpo would be greatly appreciated thank you!
Pseudo-code for Tank drive for mecanum can be found here and here.


If you want to use the LabVIEW mecanum vi, then process your 2 joystick values to create Y, X, and rotation inputs for the vi:

Y = (Yleft + Yright)/2

X = (Xleft + Xright)/2

rotation = K*(Yright - Yleft)/2

Start with K=0 and make sure the fwd/reverse and strafe work. Then slowly increase K from 0 to +1 until you find the right gain sensitivity for the rotation.




Last edited by Ether : 16-02-2011 at 20:31. Reason: typo. changed Y2 to Yright, and Y1 to Yleft
Reply With Quote