Go to the documentation of this file.00001 import sys
00002 import time
00003 import math
00004 from robot import RobotControlClient
00005
00006
00007 HOST = 'localhost'
00008
00009 PORT = 5512
00010
00011 if(len(sys.argv) >= 2):
00012 HOST = sys.argv[1]
00013 if(len(sys.argv) >= 3):
00014 PORT = int(sys.argv[2])
00015
00016 print "Using host: " + HOST + " on port: %d" % PORT
00017
00018 robotControlClient = RobotControlClient(HOST, PORT)
00019 robotControlClient.connect()
00020
00021
00022 robotControlClient.moveForward(0.3);
00023 time.sleep(5);
00024
00025
00026 robotControlClient.turnLeft(20.0 * math.pi / 180.0);
00027 time.sleep(5);
00028
00029
00030 robotControlClient.turnRight(20.0 * math.pi / 180.0);
00031 time.sleep(5);
00032
00033
00034 robotControlClient.stop()
00035 time.sleep(5);
00036
00037
00038 robotControlClient.moveForward(0.3);
00039 time.sleep(3);
00040
00041
00042 robotControlClient.stop()
00043
00044
00045 robotControlClient.disconnect()