using navx accelerometer to drive straight while strafing with mecanum wheels

this is our first year using mecanum wheels. thanks to 1519, we’re able to get the robot to move fairly well. the problem we have is when we’re strafing, so only moving in x direction, no y no rotation, the robot doesn’t quite drive straight. it moves in the y direction. we’re using a navx and was wondering if using the m_navX.getWorldLinearAccelY() to correct the motion would work? basically using the Y acceleration in a proportional feedback loop to correct the robot’s motion in the Y direction. as this is an acceleration, the feedback is a bit strange.
has anyone tried this? or even thought about this?

See the “Displacement” discussion on the navX-MXP FAQ page. For this application you’ll likely want a solution that can measure the linear displacement to an accuracy of an inch or so within 15 seconds - for Mecanum, a good solution is to mount an omniwheel w/an encoder along the strafe dimension (typically, the X axis) to measure the strafe distance. Another approach that’s a tad more complicated but more flexible is to mount a “caster” wheel w/two encoders (one to measure z-axis rotation, the other to measure forward motion in whatever direction the caster is currently pointed). Another approach is to attempt to calibrate the measurements from the mecanum wheel encoders but this is not only more complicated, it will be sensitive to wheel scrub errors that might occur.