robot = Robot() else: robot = HistogramFilter(world, 6, 4, start_orientation) robot.draw() robot.connect_color() markov = Markov(world, start_orientation, "rddesmit") found = False while not found: location = markov.current_estimate() destination = (1, 1) # drive robot.drive(0.10) markov.move() # rotate direction = Orientation.calculate_direction((location[1], location[2]), destination) while direction != markov._orientation: rotate_direction = Orientation.rotate(markov._orientation, direction) if rotate_direction == Orientation.LEFT: markov.rotate_left() robot.turn_left() time.sleep(3) elif rotate_direction == Orientation.RIGHT: markov.rotate_right() robot.turn_right() time.sleep(3) else: