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 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.