Hi all,
Our team is having a problem with our robot where the python line: drivetrain.turn(left, 90, degrees) is not stopping its turn at 90 degrees of rotation. Instead, it just keeps on spinning with no end in sight. Here is a pic of our code.
Hi all,
Our team is having a problem with our robot where the python line: drivetrain.turn(left, 90, degrees) is not stopping its turn at 90 degrees of rotation. Instead, it just keeps on spinning with no end in sight. Here is a pic of our code.
Usually caused by an incorrectly configured drivetrain. Have a read through this topic.
I can’t see any issues in our configuration. We have a 2:1 gear ratio, our wheelbase is configured right. In our driver code, everything is correct and it all works fine. Our problem is that the rotation does not stop after 90 degrees.
ok, lets go through the debug process then.
You ask the robot to turn left for 90 degrees.
Does the robot turn to the left ? (ie. counter-clockwise as viewed from above, front of the robot moving left)
Are you using the inertial sensor or just relying on wheel encoders ?
If using the IMU, is the IMU working correctly (use the devices screen),.
Is the configured left motor for the drivetrain actually the left motor ?
You said 2:1 gearing, is that one gear on the motor driving a second gear on the wheels ? If so, is the drivetrain configured with the direction arrow at the down position ?
I emailed coach so he can help us. If he replies, ill let you know.
Thanks for the guide! Our problem was that we set the drivetrain to reverse and then swapped the motors in the code, so everything was messed up. It works fine now. Thanks!