Quote:
Originally Posted by chsrobotics3283
And what other additonal things do you need to do to have mecanum wheels?
|
The holonomic drive vi wants three inputs: magnitude, direction, and rotation.
Magnitude is a value from 0 to 1 describing how fast you want to move.
Direction is an angle in degrees, with zero being straight ahead.
Rotation is -1 for full speed counterclockwise, +1 for full speed clockwise.
Rotation could be taken directly from a joystick axis, but magnitude and direction are a vector that you'll have to derive based on how you want your joystick control to behave.
We made our own SubVI to replace the example's Joystick Read. It uses the difference between the left and right joysticks' y axes to determine rotation. The average of the y axes and the average of the x axes go into a rectangular-to-polar coordinate conversion (the Re/Im to r/theta vi), and the angle from that conversion is further scaled and rotated to match the "0 is forward" requirement of the holonomic drive vi.