How to calculate motor velocities to rotate and move holonomically?

Hi everyone,

In the wake of the absence of the VEX Forum, I’ve had to turn to here to get help with figuring out the math for my VRC team’s mecanum drive; it should be applicable to FIRST as well.

Basically, I’m trying to figure out how to rotate and move a mecanum drive holonomically at the same time. For example, let’s say that my robot starts at (0,0) with a heading of 90 degrees, and I want it to end at (2, 4) with a heading of 180 degrees all in one smooth movement.

What equation would I need to use to find out the speeds for each of my 4 motors?

Thanks

1 Like

That is some very complex mathematics to find all that out. What I would recommend is seeing if any documentation (for vex or FRC. The concept is the same for both) exists about doing this programmatically. I don’t know about Vex but WPIlib for FRC has classes for mechanum drive so we can operate them without manually crunching the numbers.

1 Like

For general mecanum math, you could read over the wpilib implementation and follow the math methods it calls to figure out how it works or look at Team 2605’s interactive guide on their programming resource site.

Path following is more complicated—there’s more than one path between two points, so depending on which path you want, the implementation changes. The simplest path is a straight line with an angular velocity such that the robot ends up facing the way you want it to at the end of the line. However, linear paths are not always ideal, so if you want to do curved paths, you have to do a lot more math (with which I’m not familiar).

3 Likes

Ether’s work also provides an explanation of the math going on, though perhaps you want working code, not just math.

3 Likes

Here is a guide ment for FTC that talks about some of the basics behind mecanum drive that you might find helpful: Programming Tutorial - Mecanum Drivetrain - Game Manual 0

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.