Code not working in task 3

I’m trying to do task 3, and I’ve been running into some trouble.
The idea with the 1000 was just if our reading is greater than this for both sides ,i.e, not close to walls, the robot stops.
If anyone can help it would be great!
Thanks


from robot_control_class import RobotControl
class ExamControl:
    def __init__(self):
        self.rc = RobotControl()
    def get_laser_readings(self):
        left = self.rc.get_laser(719)
        right = self.rc.get_laser(0)
        return right, left
    def main(self):
        right, left = self.get_laser_readings()
        if right < 1000 and left < 1000:
            self.rc.move_straight()
        else:
            self.rc.stop_robot()

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