Tank Drive Mecanum

Has anybody accomplished such a thing in Labview? If so, how?

Normally, with Mecanum, the driver has one joystick axis for forward, one for strafe, and one for twist, which may or may not be spread across two joysticks (depending on whether you have joysticks with a twist axis) using the holonomic drive VI.

Normally for tank drive, the driver has one axis to control forward/back motion of each pair of wheels (left/right). This would eliminate the strafing movement that is usually the point of having Mecanum, but can be done using the stock tank drive VI if that’s what you want.

Can you please elaborate on what you would expect to happen for various joystick movements? I don’t quite understand what result you are trying to achieve.

I mean, the right ‘joystick’ would control the right half of the robot(top right and bottom right wheels) and the left ‘joystick’ controlls the left half(top left and bottom left wheels). Thus by pushing BOTH of the controllers back and forth, the robot would go backwards and forwards respectively. To rotate, the driver would push the right joystick forward and the left joystick back in order to go in a counter clockwise fasion and the opposite for a clockwise motion. In order to strafe, the driver would lean the joystick’s both in the same direction horizontally, thus both joysticks leaning left would cause the robot to strafe left and the oposite to strafe right.

See my p.o.v?

Ok. I understand, and this is possible. I haven’t done it before, but it would require reverse-engineering the Holonomic drive VIs a bit to figure out how to manipulate your joystick inputs before feeding them to the stock VI to get the desired result. Basically, you’ll need to mathematically convert your two Y and two X axes into an X, Y, and Z (rotation) value, each of which should be in the range -1 to 1, with 0 being stop.

If you use holonomic cartesian, you can get an effect just like movement in Halo or most first person shooters using unmodified axis inputs. Left Y axis = forward/reverse (Y input), left X axis = strafe (X input), right X axis = twist (Rotation input). You can, of course, reverse the X axes to match your driver’s personal taste. This is very easy to code, and will work out of the box (although you should initially test on blocks to make sure you have the correct motor polarities in Begin.VI (all motors should go forward when you’re pushing the left stick forward, and any that are backwards can be fixed by setting the appropriate invert option on the RobotDrive 4 Motor Open to True)).

Given the amount of time you have until your competition and the amount of testing you will need to do on practice day, my recommendation would be to do this the easy way and pick a driver who is comfortable with Halo-style controls. If you still want to go with the hard way, I’ll be happy to provide more advice, but I don’t think the benefits are going to outweigh the time cost for development and testing at this point in your season.

The easiest way might be to use the average of the two sticks’ y axis for what it wants as the y axis input, 1/2 the difference in y for rotational input, and the average of their x axis for side to side motion.

Not sure why you want to do it this way.

Bottom line is if you want to gain the maneuverability of mecanum wheels and use the built libraries of LabView, you must pass the holonomic vi a vector (magnitude and direction) plus a rotation signal representing what you want the robot to do. This years holonomic vi also allows you to work in cartesian coordinates as well.

However you generate those signals from the joysticks is up to you. The easiest way is to take the x and y signal from the joystick and pass it to the holonomic vi. If that doesn’t work for you, you would be on your own for coding the correct signals to the drive system with mecanum wheels…definitely not for the faint of heart at this point in the game.

Post some sample code of what you are trying to do.