Mechanum Wheel Strafing Problems

Our team decided to use mecanum wheels a while ago, and we successfully made a program that utilizes the wheels, however there is some offset while we are moving that we are trying to correct using a gyro, but don’t know how to.

Any suggestions?

My team is using mechanum wheels and it drives pretty accurately. It might be possible to correct the error with a gyro, but I would recommend testing each wheel to see which ones are slower, and try testing for possible issues like a bad motor, bent axles, bad bearings, etc. that could be slowing down that particular wheel. Also could you post the code you use to control the drive, in case that is the issue?

Edit: Another thing I just thought of is that if somewhere in your code you set the brake type of some of the drive motors to be different than the other drive motors, than it can make the robot drive weirdly. I accidentally did this earlier this year and was confused for awhile

3 Likes

The issue is not the mounting of the wheels, and they’re almost brand new. Our code itself is fine for moving the robot, our issue is that we try to correct its movement when the robot doesn’t necessarily go straight. We’re trying to do this using a gyro.

This is our current function for trying to correct movement, we pass the function the joystick values + the inertial sensor’s current angle value.

driveCartesianSnip

Are you sure this is not the offset weight of the robot. For example if you are a tray bot it might mess up the straving because most of the weight would most likley on the back wheels.

We’re assuming that the weight is the issue, but we can’t change that because of our robot’s design, so we’re compensating with programming.

The goal is to use the inertial sensor to detect those changes in strafing and adjust the power of the wheels accordingly.

Do you have an anti-tip. This might help out a bit. I know how you feel we also have mecanum. I tried to convince my team to change to omni because we can’t really strave well anymore but they didn’t care.

But if I’m being honest I don’t know how you are going to do that with a sensors. I’m pretty sure they can’t sense pressure or degrees of the whole robot.

It is very possible using sensors, we just don’t know how to apply the gyro properly i guess?

The idea of is that the gyro would be set to a value, lets say 0, and while strafing right , if the gyro angle value changes from that point 0, it would correct it so that it would remain on the 0 path.

We did something similar using vision sensor to follow and track a cube for judge demonstrations.

That’s cool I would have no idea how to do that. I’m an ameture when it comes to coding. I can make a selection screen and just learned how to code autonomous with raw but not much.

I’ve had some experience using gyros and inertial sensors for auto/programming skills. Both are useful but neither is insanely accurate, error begins to accumulate over time, especially with major jolts to the robot. I would caution you against basing your driver control code off of a gyro, because if something goes wrong in a match it could make it more difficult to drive. If you continue to test with a gyro, I would just make sure to limit the amount the gyro can affect the program, just to be safe. If you think weight distribution on your robot is a problem, I agree with @CodeMaster that if you don’t already you should add wheelie bars, especially ones with omni wheels that are in constant contact with the ground. That way it will keep your robot from tipping back and losing traction on the front wheels, if that is the issue.

1 Like

The new sensor for us is almost perfectly accurate, the drift is in the ten thousandths place, essentially none. So using it would not necessarily be a problem. Those are possible solutions, but not the one’s we’re looking for with the chassis. We really want to be able to implement the gyro to be able to correct any inaccuracies in driving, whether we use mecanum wheels or omni, so that our driving straight would truly be straight.