I have finally received a set of mechanum wheels and have big plans for them. However, when I tried them out, I was unable to successfully strafe the robot. The robot traveled in an arc path in the shape of an upside-down U. It wasn’t a dramatic arc, but it still made the robot uncontrollable.
What is causing this?
The 4 motors driving the wheels are brand new 393’s out of the box configured for torque. All of them are connected to PWM controllers, so their power curves should be equal. And yes, the batteries are all charged.
The robot was back-heavy at first, but balancing it or even making it slightly front-heavy had no effect on the arc.
There isn’t any noticeable difference in wheel RPM’s when the robot is off the ground, but when it is on the floor the front and rear wheels spin at slightly different RPM’s.
It travels in this arc regardless if the robot is on the field tiles or flat, hard, laminate tile.
Any suggestions or solutions? Anyone else who is or has experienced this problem before?
This is what our team calls “rainbow-strafing.” Usually, “rainbow-strafing” is caused by uneven weight distribution, but since you say you experimented with that, then I think your wheels might not all be oriented correctly. See Banditofernando’s link for that.
If that is not the problem, then the cause may simply be the fact that some motors spin faster than others. Encoders can help you control this.
This is pretty normal. Your wheels may be experiencing different amounts of friction and some of your motors may be stronger than others. No robot ever goes perfectly straight, and mecanum drives seem to especially prone to curving when they strafe.
Trying to reduce friction anywhere it might be happening will probably help. Test each of your motors by grabbing its wheel and feeling how much force it takes to stop it from turning (but don’t do this for more than half a second or so because stalling motors is bad for them). If need be, change your configuration so that the axles with more friction have stronger motors.
Once you get the robot’s natural curvature as low as you can, you have two choices: the driver can compensate for the curvature manually, or you can compensate for it with code. Compensating with code will mean that learning to drive the robot will be easier, but experienced drivers often don’t like code compensation because it can make the robot a little bit less responsive. If you want to use code, you will need a shaft encoder on each wheel. You can probably find good guides on this forum that will teach you to program a robot to drive straight in either RobotC or EasyC. I don’t know enough about the subject to recommend one, I’m afraid, but someone else reading this probably does.