Robot not moving straight in task 2

Hello.

Basically, once I run this code, my robot does not move 100 percent straight. It has a slight deviation, which I believe is making me get task 2 wrong.
Can anyone help?

from robot_control_class import RobotControl
robotcontrol = RobotControl()
def move_stop():
    d1 = robotcontrol.get_laser(360)  
    while d1 > 1 :
        robotcontrol.move_straight()
        d1 = robotcontrol.get_laser(360)
    else:
        robotcontrol.stop_robot() 
        robotcontrol.rotate(270)

edit 1: I didn’t change a line of code, but now I ran the test checker 3 times, on the first time I got it 100 percent right, and on the other two I got that the the front laser value is wrong.

Can anyone help?

Thankss :slight_smile:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.