Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)