def move_straight(robot, dist): """ Moves the robot dist metres forward and updates the tracker. """ journey = Journey(robot, distance=dist) journey.start() robot.position.move(dist) sleep(0.5)
def turn(robot, alpha=0.524): # 0.524 rad = 30 degrees """ Turns the robot alpha RADIANS and updates the tracker. """ journey = Journey(robot, angle=alpha) journey.start() robot.position.turn(alpha) sleep(0.5)