def set_speed(speed): robot_speed = speed if not robot_debug: Robot_client.Robot__left_speed(speed) Robot_client.Robot__right_speed(speed)
def stop(duration=MEDIUM_DURATION): print('robot_controller, stop, robot_debug =', robot_debug) if not robot_debug: Robot_client.Robot_stop() pause(duration, True)
def left(duration=SHORT_DURATION): print('robot_controller, left, robot_debug =', robot_debug) if not robot_debug: seconds = pause(duration) Robot_client.Robot_left_glide(robot_speed, seconds)
def right_rot(duration=SHORT_DURATION): print('robot_controller, right_rot, robot_debug =', robot_debug) if not robot_debug: seconds = pause(duration) Robot_client.Robot_right(robot_speed, seconds)
def backward(duration=LONG_DURATION): print('robot_controller, backward, robot_debug =', robot_debug) if not robot_debug: seconds = pause(duration) Robot_client.Robot_backward(robot_speed, seconds)