On a mecanum drive base, is there a way to correct for driving direction? For instance, if I want to go 40 degrees to the left of straight, how can I correct any error? I know encoders would be ideal, but is this possible with an accelerometer?
I could use an integrator on an accelerometer to get velocity, but that’s not always very accurate. Any other ideas?
Perhaps I need to elaborate a bit. I don’t mean to be a bother, and I know that people have talked about correcting mecanum drive, but I just want to expand on this.
I would assume that to use an accelerometer to correct for travel direction, one must integrate the accelerometer readings to get velocity to get heading. Does anyone have any hints on this, or is it just integrating? Do I want to filter in case of collisions or other such things? How or when should I calibrate? How do I account for drift?
Using accelerometers on FRC robots to derive position is a hard problem. So hard, in fact, that I don’t know of any teams who have reliably solved it. I wouldn’t even attempt it. Closed-loop control of the wheel speeds using encoders is easy.
Is this for autonomous? or for driving in teleop? If it’s autonomous, you might want to make use of line sensors or camera targets instead. For adding rotation encoders, look for creative ways to drive them using belts, small wheels, etc
Look at team 488 robot, I think they added encoders to little wheels that move on the floor. you could use two Vex omni wheels, oriented 90 degrees to each other, to get feedback on how the robot is moving in both directions.
Might have trouble implementing it in one day though.
If the travel direction is different than the facing direction, such as strafing left and right while facing forward, it does not always drive in the given direction.
I’m not 100% sure, because I’m not with the robot right now, but if I remember correctly it’s straight but in the wrong direction. We are correcting facing direction with the gyro, so that’s not a problem. What are the significances of that, might I ask? We’re new to mecanum, so we’re not up to par with all the tips and tricks to get it working properly…
OK. Now, does it always do pretty much the same thing each time for a given command, or does it do one thing one time and another thing another time? (There’s a reason I keep asking this).
if I remember correctly it’s straight but in the wrong direction. What are the significances of that, might I ask?
Many factors could cause this behavior, including friction, free play, alignment, motor tolerances, wiring, and software. To get to the root cause would require time and patience, things which I’m guessing you probably don’t have right now.
After a bit of tweaking, our Drivetrain is driveable. The accelerometer didn’t work, but I didn’t put a whole lot of effort into trying to (by filters or anything) because in the end, it isn’t significant enough to be worth the copious amounts of work needed to get it done.
At any rate, thank you so much for your help and input. I learned a lot about what does and doesn’t work.