Strange problem with autonomous

As others have suggested, the call to RightBackDriveMotor.rotateTo will block if the motor never reaches its target position.

A call to rotateTo instructs the motor to move to the requested position. The code then monitors status of the motor until what we call the “zero position flag” is set or a timeout condition is reached. When a motor instance is created the timeout is actually set to disabled, there seemed to be no good value for it and we leave it to your code to call the setTimeout method with a reasonable number. The motor uses its PID algorithm to try and achieve the target position and set the “zero position flag”, for the motor to complete the move it must be within 3 encoder counts of the final position, with the green gear cartridge that is less than 0.01 of a revolution. Depending on the load on the motor that may not be achievable, as @Xenon27 mentions, it could happen if the motor has become hot and power is being limited. It could also be caused by excessive friction and a number of other factors, that’s why we provide both a timeout and the ability for your own code to monitor progress and choose to abort if necessary.