Quote:
Originally Posted by dmitch
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.