# MecanumDrive for x-drive?

Sorry for a basic question, but can the MecanumDrive class be used for x-drive? I searched for this question hoping it had already been answered, but could not find it. Apologies if I missed it.

If X-drive refers to four omniwheels (placed like http://i.ytimg.com/vi/Z0lUTMBbu9A/maxresdefault.jpg), then I think it should work.

Assuming that’s what you mean, the drive programming is the same. Note that X-drive needs to be geared at about 71% of the speed of mecanum (or equivalently mecanum needs to be geared at about 142% of the speed of X drive) to achieve the same top speed and acceleration.

Edit/explanation: Let’s assume 7" wheels in both cases. (I know there aren’t any 7" wheels out there, but approximating 22/7 for pi makes the explanation easier.)
If you drive all wheels forward one revolution with mecanum, you’ll go forward 7"*pi =~22".
If you drive all wheels forward one revolution with omni, you go forward about 31 1/2". Think of one particular wheel, let’s use the right front as an example. You rotate it one turn forward, and if it weren’t on a robot, it would travel 22" forward and to the left. However, it is on the robot, so the rollers allow it to roll forward and to the right until it is in a straight forward line, which means another 22" forward and to the right. Adding two 22" translations at right angles, we find that the wheel actually moves somewhere over 31" forward.

Thank you both, JohnGilb and GeeTwo. That’s exactly what I was referring to, and that’s exactly what I needed to know.