Vex C++ Autonomous not driving straight

Hi, we are having a problem with getting our autonomous to drive straight. We are using vex coding studio. We know that it is not


BR.rotateTo(1000, vex::rotationUnits::deg, 50, velocityUnits::pct, false);
FL.rotateTo(1000, vex::rotationUnits::deg, 50, velocityUnits::pct, false);
BL.rotateTo(1000, vex::rotationUnits::deg, 50, velocityUnits::pct, false);
FR.rotateTo(1000, vex::rotationUnits::deg, 50, velocityUnits::pct);

Try changing pct to rpm. This will cause the encoders to try to match speed.

This sounds more or less like a mechanical issue. Of course, you will never get a robot to drive straight 100% and as last resort you should do what @reflxshn said, but I think it’s better to get to the core of things to figure out how to fix the problem as much as possible, not patch it. Would it be possible to send some pictures?

Wait a second here, is rpm any different from pct??? I thought they were just two different units of measurement.

rpm says: send enough power to go exactly 50 rotations a minute
pct says: send half power.

I assumed 50pct on a 200rpm motor would just be exactly the same as 100rpm

If there was minimal friction yes. If you want it to use pid to stay at 100 rpm then you would use rpm.
I might be wrong here, but I’ve been using rpm just in case.

I’m fairly certain both use PID, and 50pct is just fifty percent of your maximum rpm

You’re probably right.

Yes, this is correct. You can test it by running a motor with either pct or rpm value and applying friction with your hand – you will feel it maintaining speed. You can also monitor the voltage of that motor, and see the voltage increase when you add friction.

What this implies for a drive that is not running straight is that the problem is not a high-friction build error on one side. You can have a fair amount of friction on one side and still drive straight, as the high friction motor will just receive more power.

If you are not seeing a straight drive with V5, it is likely that the two sides of your drive base are not parallel.

Or there are different gear cartridges in either side. Probably not, but I’ve seen brain farts like that.

We had the same problem but found that our omni wheels had been completely dug out by the axle. We switched the wheels out and made sure to make everything spaced correctly and tight and haven’t had much issues since. Try checking your wheels.