6-Motor Mecanum drive - EasyC

I need help programming a 6 motor mecanum drive.
Current drive looks like this
I tried this but either the forward/reverse/rotate worked or strafing worked but not both. When I tried this The drive worked but the joystick for strafing didn’t work. Any ideas on how to get this working are greatly appreciated.

I’m afraid there is no simple way to solve the 6-motor drive conundrum. The problem comes from the torques in the back of the robot not being equal to those in the front of the robot resulting in rotation of the robot as well as strafing.

If you were really clever you could algorithmically test for values s.t. the power given to the back motors would be sufficient to counteract the torque produced in the front motors but not enough to cause rotation. This means that the strafing speed of the robot would be limited to the speed of a 4-motor drive but the forward and rotational movements would be sped up.

Also, just another heads up: Mecanum drive only function when the number of mecanum wheels is a multiple of 4.

Thanks. Look like I will be doing that for the rest of my summer. :rolleyes:

You have a 6-motor drive so that you can have more drive torque, correct? (There’s not much more reason to have a 6-motor drive). Here’s an idea for you: Have 6 wheels, with one motor on each. 4 of these wheels would be mecanums (the ones in the corners), and then the other two wheels would be omnis. You would have less torque while strafing, but it would make your programming job much easier, and you’d still have the full torque of 6 motors while going forward and backward.

This is how I programmed our 6-motor mecanum drive. It is a regular tank drive with two separate buttons for strafing left/right.
[ATTACH]6193[/ATTACH]
Untitled.jpg

This would be a solution to your problem; however, it is likely you’ll experience issues with weight distribution in this scenario. When we built this, we lost a lot of strafing ability simply because our omnis dug deeper into the ground than our mecanums. It’s a mechanical problem to look out for. But based on your picture, it seems like a mechanical change would be worse than a programming fix. So I would do what ucanchinmynirkhe says.

I am going to do this as a temporary drive code for testing until I get the complex coding that ucanchinmynirkhe recommended. Again, thanks for the ideas!

exactly we are doing… Its so much simpler…

We also lost a lot of straifing capability doing this on a test robot due to the height varying as the wheels spin. Also the double torque on 2 wheels doesnt have any affect while it isnt pleasing to look at their is no difference in ability. We used this set up at worlds ask cleansweep man if we had any torque.

A six-wheel meccanum drive is actually possible. Try configuring one like this:

Both diagrams on have unbalanced torques, so they would rotate while driving. Most drivers would probably find that annoying to have to compensate for.

There are probably ways to program around this, correct?

Would they have unbalanced torques? They have 3 motors turning in each direction, so I don’t see which way it would rotate…

Only if motors are incorrectly placed. Just make sure that for every motor, the one opposite it (opposite across the center, so bottom-left -> top-right, etc.) has the same torque and speed.

If, for example, the top-left and middle-left motors were more powerful than the rest, there would be a problem.

Back to the question at hand
I’m not sure if this is true for your set up we had the back wheel just be powered by two motors geared together
I was able to get the two holonomic blocks to work was kind of weird i believe it was like this. This being the pattern inputed into the holonomic gui

first block second block
front left front right back left2 back right2
back left1 back right1 back left1 back right1

Look at the strafing diagram drawn by cbw1538. Assuming the magnitudes of all the forces are the same, the robot should move straight to the left. But after drawing out the torques applied around the center of mass of the robot, all torques cancel except those caused by the middle two mecanum wheels. So your net torque should be 2(Frsin(t)) outwards. The robot would rotate counterclockwise therefore making the robot swerve around instead of having clean strafing.

You can fix this in programming by shutting off the motors that cause the net torque to take a value other than 0 when straight movement is necessary, and then using them when spinning is necessary. I bet there are other ways to fix it as well.