I am trying to figure out how the block code works with Mecanum wheels. We currently have a drivetrain set up and can’t figure out how to drive each motor on its own.
How do I make it go forward and backwards straight
If your code is telling all the motors to turn forward at the same speed and the robot is turning as it moves forward, that is often an issue related to robot construction.
Are all the wheels parallel? Are all the wheels able to turn without resistance/friction?
Its a good idea to pull the axle out of the motor for each wheel and free spin them by hand. If your frame is well built, the wheels will spin for 10-15 seconds easily. If they stop quickly, loosen screws in the general area and adjust until the friction goes away, then re-tighten.
Also, there are left and right version of the mecanum wheel, so you have to make sure they look like this when looking from the top and all four wheels are firmly touching the ground:
Otherwise you will have inconsistent movements.
How do I set up a deadzone to counter stick drift