Holomonic drive problem

So I’ve built a holonomic drive just for fun. When I commanded my drive to go forward it moved forward but tilted to the left. I checked all the angles and they are all at a 45 degree angle. The motors are all in high speed and the power levels are all the same. the one thing is that the holonomic is not a square. It is 15" in width and 18" in length. Is it because my drive is a rectangular shape?

That may be a problem with some motors being faster than others. All motors are not the same. The more you use them, the more they gradually get slower.

But all the motors are brand new

Can you post your code?

/*+++++++++++++++++++++++++++++++++++++++++++++| Notes |++++++++++++++++++++++++++++++++++++++++++++++
Mecanum Drive - Basic

  • This program allows you to remotely control a robot with mecanum wheels.
  • The left joystick Y-axis controls the robot’s forward and backward movement.
  • The left joystick X-axis controls the robot’s left and right movement.
  • The right joystick X-axis controls the robot’s rotation.
  •      [Name]              [Type]                [Description]

Motor Port 2 frontRight VEX Motor Front Right motor
Motor Port 3 backRight VEX Motor Back Right motor
Motor Port 4 frontLeft VEX Motor Front Left motor
Motor Port 5 backLeft VEX Motor Back Left motor
task usercontrol()
int shooterSpeed = -127;
//Loop Forever
while(1 == 1)
//Remote Control Commands
motor[frontRight] = vexRT[Ch1] - vexRT[Ch3] + vexRT[Ch4];
motor[backRight] = vexRT[Ch1] - vexRT[Ch3] - vexRT[Ch4];
motor[frontLeft] = vexRT[Ch1] + vexRT[Ch3] - vexRT[Ch4];
motor[backLeft] = vexRT[Ch1] + vexRT[Ch3] + vexRT[Ch4];

    if(vexRT[Btn5D] == 1)
  motor[feederMotor] = - 127;
  motor[pullerMotor] = - 127;
else if(vexRT[Btn5U] == 1)
  motor[feederMotor] =  127;
  motor[pullerMotor] =  127;
  motor[feederMotor] = 0;
  motor[pullerMotor] = 0;
//Speed Switch
if(vexRT[Btn8D] == 1)
    shooterSpeed = -70;
else if(vexRT[Btn8R] == 1)
    shooterSpeed = -127;
//Full Power shooter
    if(vexRT[Btn6U] == 1)
  motor[lsMotor] =  shooterSpeed;
  motor[rsMotor] = shooterSpeed;
else if(vexRT[Btn6D] == 1)
 SensorValue(piston) = 0;
  motor[lsMotor] = 0;
  motor[rsMotor] = 0;
  SensorValue(piston) = 1;
    /*if(vexRT[Btn8D] == 1)
  motor[lsMotor] =  100;
  motor[rsMotor] = 100;


The shape of your base shouldn’t really matter as long as it is all symmetrical. That’s why I thought it was your code. Try this code. This is the basic X-drive code formatted for your motors.

Motor[frontRight] = vexRT[ch3] - vexRT[ch1] - vexRT[ch4];
Motor[backRight]= vexRT[ch3] - vexRT[ch1] + vexRT[ch4];
motor[frontLeft] = vexRT[ch3] + vexRT[ch1] + vexRT[ch4];
Motor[backLeft] = vexRT[ch3] + vexRT[ch1] - vexRT[ch4];

The motors, even when new, can vary by up to ±10%, which is enough to cause drift. You could use encoders and PID to even it out, or give some motors less or more power to cause them to match.

Just to reinforce this, we have a very squished x-drive that looks a tad weird, but even this drives dead straight with new motors. So it will be motor variance or excess friction issues that will cause drift. Check all the motors and their connections to the wheels are solid but not too tight and make sure there is no excess friction (maybe using some lubrication if you are forced to).

Robot weight distribution can also do this. One or two sets of wheels may not be getting the traction it needs.

I recently had this problem with my holonomic drive. All of the motors were driving at full speed forward, but it still drifts left. I would suggest flipping the robot on its side so you can see each wheel spin. Then place a piece of white tape on each wheel so that you can easily tell the relative speeds of each wheel just by looking at them. Start by running your “drive forward” program and compare the speeds of each wheel. From this point you have two options, you can either make slight adjustments to your code and keep testing it and altering the motor values until the wheels all spin at the same speed, or you can put optical shaft encoders on each wheel and, within the program, dynamically alter the power values so that the motors all run at the same speed. Personally, I’d go with the second option. It requires a little bit more coding, but it will always work the same no matter what motors you use and no matter what the voltage on the battery is and no matter how the weight of the robot changes throughout the season. Once you’ve managed to make the motors spin at equal speeds, look at traction. Examine each wheel to make sure they aren’t damaged, then place some sort of weight near each wheel or find another way to ensure that they all touch the ground while the robot is running (If you change the weight distribution and chose not to use encoders earlier, you will need to fine-tune your values again). If the robot still won’t drive straight, thoroughly examine each wheel setup to look for significant sources of friction. Once those are resolved, it should drive straight.

P.S. For my drive the code works out to:

backRightMotorPower = getJoystickValue(Ch3)+getJoystickValue(Ch4)-getJoystickValue(Ch1);
backLeftMotorPower = getJoystickValue(Ch3)-getJoystickValue(Ch4)+getJoystickValue(Ch1);
frontRightMotorPower = getJoystickValue(Ch3)-getJoystickValue(Ch4)-getJoystickValue(Ch1);
frontLeftMotorPower = getJoystickValue(Ch3)+getJoystickValue(Ch4)+getJoystickValue(Ch1);

where positive Ch3 is to drive forward, positive Ch4 is to drive directly to the right, and positive Ch1 is for turning right.

As a team that has used this drive for the past four years we have had this problem a few times. first how good is the build quality. we check this by pulling the axle out of the motor and spinning the wheel. after that if it still does not work correctly ask the question how old are the motors this really does help and the same could be said about encoders if you are using them.

Are you assuming that all of the motors are high-speed? Or just normal? Maybe you can also try to check the internal gearing on all of the motors to see if they all are the same.

Another way is to use the gyroscope for auto-alignment that would be enabled whenever the forward joystick channel is above 5 or below -5, and also for the strafing joystick channel is above 5 or below -5. That should be the easiest way for an auto-alignment program…

@1815 Delta II That will fix it but will tune you down to your slowest motor. You should try and make sure you have as good of a build as possible to avoid such issues.

I recommend you make a test program and measure the ticks per second you see on the wheel encoders. You don’t really care about the units in revolutions, just the angular velocities in ticks will do. Do one wheel at a time and log the events or graph them using the new robot C graphing feature.


Then look at the slower wheels and see if it is the motor, the internal gearing, or the build is off. Check the motors first with the wheels connected then pull the shaft out of the problem motor a touch and test the motor by itself to see if it is the motor or the build.

For build effects of friction, check the bearing blocks and give them a good reaming to open them up a few thousandths of an inch to spin better. A build not being quite square can cause forces to act on the shaft too to make it not as free spinning.