mecanum drive and joystick

Ok our idea was to use a 4 wheel mecanum drive set up. The issue is its our first time using them so we have no idea how to program it in labview. Problem number 2 is that we want to use the logitech extreme 3d pro controller because of the fact that you can turn the stick. We wanted to use one controller to do all the driving,so forward and backward and to go right and left but to use the twist to spin (or turn the bot left and right). Again we have no idea how to do this or implement it into the code.

So if any one could help and explain it (to beginners) wile having pictures for examples it would be really appreciated:D .

There’s a vi for that in LabVIEW.

I feel badly posting this, because I don’t like to discourage teams from trying things. But:

Meccanum is not trivial to implement, and perhaps you might consider getting some off-season experience with it before committing to it during build season.

This is our code but the problem is that (twist right= forward) (twist left= back) (stick forward= spin right) (stick back= spin left’ish) (stick left= right wheel error) (stick right= right wheel error).





My first thought is that your right wheels are simply spinning in the wrong direction. In the 4 Motor Open function in Begin, there is a place to invert those motors.

Check your motor controllers to make sure they are plugged into the correct spots on the Digital Sidecar. If that doesn’t help, remember that 2 of the motors must be inverted in Begin.vi for it to work correctly (I generally invert both left motors. If they all function correctly, but the joystick is backwards, then invert the other two instead.) Hover over the Open 4 Motors.vi and you will see 4 green dots (2 on top and 2 on bottom) that reference the inversions.

Ok ill try that out thank you, also this is my begin if you think there can be any changes.





do they have to be set to true or false for to be inverted?

True means it is inverted. Basically, you have to do this because motors face the opposite direction on different sides of the robot. The same concept can be achieved by setting all motor inversions to False and swapping the leads of the motor around at the motor controllers on one side of the robot. (Note: Do NOT swap the power leads leading from the Power Distribution board. If you decide to go this route, only swap the leads on the motor side of the speed controller.)

If you are going the code route, two of them should be inverted. Just make sure they are both from the same side (either right or left), not front and back inverted from each other.

Another thing to check on is the mapping of your joystick axes.
They may not match what LabVIEW is calling axis 1,2, & 3 and it’s easy to verify with Joystick Exploreror your own front panel.

ok so it now works but how do I get it to go diagonally?

Diagonal movement is a combination of left/right and forward/back motion. Try pushing your joystick to the upper left or right corner. It should move diagonally in that direction.

lol yah we found that out. Thank you for all the help and thank you for dealing with my stupid questions.

No problem. That’s what we are here for.