Log in

View Full Version : Mecanum wheels not strafing correctly


bacarpenter
02-03-2015, 08:45
I've been working on the mecanum drive programming, I got the wheels to spin in the correct direction and all the motor controllers are hooked up correctly, but every time I try to strafe on the ground instead of going horizontally it'll move diagonally or rotate. Has anyone else had this problem and know how to help?

Bryan Herbst
02-03-2015, 09:11
Do the wheels appear to be going at somewhat close to the same speed? If you have encoders, checking this is easier.

If you are using Talons, have you calibrated them?

Are you sure that the wheels have been installed correctly? The axles on the rollers should form an X, not an O.

DarkRune
02-03-2015, 09:38
Sounds like your problem may not be the programming but the wheels. When we first installed our wheels we had the same problem. The axles on the wheels should line up like this:
\-----/

/-----\

Alan Anderson
02-03-2015, 14:57
If the problem were only the wheels, it would drive forward and strafe okay but fail to rotate well.

The trouble with mecanum drive is that there are so many places to get things reversed. A miswired motors or wrongly-mounted wheels or swapped PWMs or mismatched program definitions will cause very confusing results. The only reasonably way to get it to work properly is to make sure to keep the hardware and software in perfect synchronization from the beginning. Once it's messed up, you have to focus on one motor at a time and verify that it moves when it should and in the direction it should. Do that with each motor in turn, correcting the wiring and/or programming as necessary.

And recognize that if you don't use some form of closed-loop control, weight balance will become extremely important.

bacarpenter
02-03-2015, 16:23
I've checked all of these things and the programming and the pwms are right and the wheels are in the correct orientation.

Ether
02-03-2015, 16:34
Step1

Print this diagram (http://www.chiefdelphi.com/forums/attachment.php?attachmentid=18389&d=1424102667).

Step2

Put your bot up on blocks and observe wheel directions for all six commands (forward, reverse, spin right, spin left, strafe right, strafe left) and carefully compare them to the printout. Mark up the printout to show any wheel directions which do not agree with the attachment.

Step3

Tilt your bot on its side, and take a photo of the bottom showing all 4 wheels.

Step4

Take a picture of the marked-up printout and post it, along with your code and the photo from Step3.

ay2b
02-03-2015, 16:40
I've been working on the mecanum drive programming, I got the wheels to spin in the correct direction and all the motor controllers are hooked up correctly, but every time I try to strafe on the ground instead of going horizontally it'll move diagonally or rotate. Has anyone else had this problem and know how to help?

Assuming the wheels really are all spinning correctly, it sounds to me like a weight and/or gearing issue. Is this a fully functional robot, or just a drive chassis? Can you take 50 lbs off, and see if it starts working correctly? Does it strafe correctly when you first put in a brand new battery and then quickly stop working? Any of these issues could indicate a weight balance problem, or that your gearing is too high (try regearing to something lower). My team had similar problems when we first tried mecanum on a fully loaded robot (it had worked fine when it was just the chassis, but when we added the rest of the robot, it stopped strafing except for about 10 seconds with a brand new battery -- we fixed it by adding another gear reduction).


And recognize that if you don't use some form of closed-loop control, weight balance will become extremely important.

Even if you do have closed-loop control, weight balance is important.

--Andy

1uan
09-03-2015, 14:08
Make joystick 1 or your second joystick and try to drive it
that worked for us

GeeTwo
09-03-2015, 15:15
Another cause of imbalanced weight across the wheels is if the wheels aren't in the same plane, or if the floor has a significant curvature or irregularity.

bacarpenter
09-03-2015, 15:43
Thanks for the help guys! We made the weight balance better and it works well :]