def step(): inp = io.SensorInput() #print '2: ', inp.sonars[2] #print '3: ', inp.sonars[3] #print '4: ', inp.sonars[4] robot.behavior.step(inp).execute() io.done(robot.behavior.isDone())
def step(): # no_commands = True # # while no_commands == True: # # Check the value of movement_list in the database at an interval of 0.5 # # seconds. Continue checking as long as the movement_list is not in the # # database (ie. it is None). If movement_list is a valid list, the program # # exits the while loop and controls the eBot to perform the movements # # specified in the movement_list in sequential order. Each movement in the # # list lasts exactly 1 second. # # # Get movement list from Firebase # movement_list = firebase.get('/carpark') # if movement_list!= '0': # no_commands = False # else: # no_commands = True # sleep(0.5) inp = firebase.get('/carpark') #inp=4 print io.SensorInput().odometry.theta robot.behavior.step(inp) io.done(robot.behavior.isDone())
def step(): robot.behavior.step(io.SensorInput(cheat=True)).execute() io.done(robot.behavior.isDone())
def step(): robot.behavior.step(io.SensorInput()).execute() io.done(robot.behavior.isDone())
def step(): inp = io.SensorInput() # print inp.sonars[3] robot.behavior.step(inp).execute() io.done(robot.behavior.isDone())
def step(): inp = io.SensorInput() print inp.sonars[1], robot.behavior.step(inp).execute() io.done(robot.behavior.isDone())
def step(): inp = io.SensorInput() #print inp.sonars[3] #print "%8.2f,%8.2f,%8.2f" %(inp.sonars[2],inp.sonars[3],inp.sonars[4]) robot.behavior.step(inp).execute() io.done(robot.behavior.isDone())
def step(): inp = io.SensorInput() robot.behavior.step(inp).execute() io.done(robot.behavior.isDone())
def step(): robot.count += 1 inp = io.SensorInput(cheat=False) robot.behavior.step(inp).execute() io.done(inp.odometry.point().isNear(goalPoint, gridSquareSize))