Mecanum Wheels Code Problems

I have reviewed your code. It is mostly correct but very hard to make sense of because you don’t use descriptive variable names.

I assume that in the second code snippet ANALOG_LEFT_Y is forward, ANALOG_RIGHT_X is turn and ANALOG_LEFT_X is sideways consisten with this code:

Then for the first code snippet I didn’t identify any problem except first strafe() call using E_CONTROLLER_ANALOG_LEFT_X is pointless if you override it with the second call.

The problem must be either with the rest of the code or with mechanical.

Do all wheels evenly contact ground and are they installed correctly?

Then if you can see if all motors are setup correctly forward and reverse and work in both directions when you lift your robot from the ground, then your problem has to be somewhere in the remaining code.

1 Like