Mecanum - Cartesian problems

We’re trying to set up strafing capability on our robot using the HolonomicDrive.vi, and we’re running into some problems.

We tried simply wiring the X and Y axes from the drive into the X and Y inputs in the VI, but this merely makes the robots spin instead of strafe.

We’ve verified that our wheels are mounted correctly (X shape from above, Y from below), and the out-of-the-box Teleop.vi functions perfectly.

Our code’s attached below. The False case has a simple ArcadeDrive.Vi with the inputs from the joystick.





You need to make sure the left motors are reversed in the begin VI.
If they are still not correct switch them around till you get the right direction.

We’ve had the same problem trying to program our robot for Mecanum wheels. The Axes of the rotation and strafing have actually switched somehow.
Reversing the motors in the Begin VI changes the direction the robot moves, but doesn’t change the actually motions used.
When we tried actually swaped the wires of the rotation and the x-strafing axis, more axes started switching and it gets really confusing.
We also have not messed with the code in any way, and have verified correct wheel position.

for our mecanum drive last year I had to work through all the configurations to get the right direction by swapping all of the x, y and rotation as well as the Pwms in order to get the right configuration so if you don’t figure it out by tomorrow
I will try to post the one I have that works!
Good Luck!
Jon

Posting that would be very helpful. We did manage to make a way that the drive move right by switching and inverting axes but since the axes are all messed up, when we tried to put a servo on another axes, it didnt even register.
Also when i pulled up the front panel of the joystickget VI the axes on that screen were all reading as they are suppost to be, not as it was outputing on the robot. Its all rather frustrating.
Oh the joys of being the only Programmer on a Rookie team!

A servo requires power in order to work. Until you put a jumper on the “servo power” pins by the PWM output connector, the Digital Sidecar will not supply that power.

As for your axis confusion, you should probably start at the beginning. Make sure your 4 Motor Drive is opened with all the right PWM signals going to each corner of the robot. Make sure your motor controllers are actually wired with those PWM signals. Put the robot up on blocks and verify that each motor goes in the direction you expect when you drive forward and reverse. If some don’t, use the “invert” options on the Drive Open appropriately to make them do what they should. Double-check that you have the wheels mounted correctly (the rollers should make a diamond pattern on the carpet, not an X).

Then try it again. If it doesn’t work as you expect, don’t just start changing things without thinking them through. Post your results here and let someone see if there’s an obvious answer to your problem.

I believe you’ve wired you’re x-axis to both the x input and the y input and you’re y axis to nowhere.

There is similar issues happening to us too. I attached the VI picture to this post of the teleop and where I call the motors.

not working.JPG
not working 2.JPG


not working.JPG
not working 2.JPG

I don’t know if you’ve probed the throttle to see the value, or what type of joystick is being used, but if the throttle is nonzero, that would cause the robot to constantly spin.

Greg McKaskle

it looks like your front left motor is inverted and your back left motor is not inverted, which might be what’s causing your problems

It turns out that the drive on our robot’s motors were messing up, which caused the trouble with our strafing.