Some example commands for controlling a robot in Pyro Setting the motor speeds ------------------------ robot.translate(0.1) # moves robot forward at speed 0.1 robot.rotate(0.3) # rotates robot at speed 0.3 robot.stop() # stops the robot robot.move(0.3, -0.1) # sets forward speed and rotation speed robot.motors(1, -1) # sets motor speeds individually translate, rotate, and motor speeds range from -1 to +1 Reading the sensors ------------------- robot.range.count # the number of sonar sensors on the robot robot.range.units # the units used for reporting sensor readings robot.range[0] # sonar sensor #0 robot.range[0]. (hit TAB key) # shows possible command completions # gives a distance reading from sonar sensor #0 (in ROBOT units) robot.range[0].distance() # a list of sensors #2 through #5 robot.range[2:6] # a list of distance readings for sensors #2-5 [s.distance() for s in robot.range[2:6]] # a list of distance readings for sensors in 'front-all' group [s.distance() for s in robot.range['front-all']] # minimum distance reading for 'front-all' sensor group min([s.distance() for s in robot.range['front-all']])