'trayIs': ([ 0, ], 'empty') } if __name__ == '__main__': """ Run pose and location updates for the currentRobot """ from robotFactory import Factory robot = Factory.getCurrentRobot() import locations from history import SensorLog l = locations.RobotLocationProcessor(robot) rp = PoseUpdater(robot) sr = SensorLog(rp.channels, rp.robot.name) rp.start() sr.start() l.start() while True: try: sys.stdin.read() except KeyboardInterrupt: break l.stop() sr.stop() rp.stop()
config.server_config['zwave_port']) elif sensorType == 'ZigBee': sensor = ZigBee(config.server_config['udp_listen_port']) elif sensorType == 'ZigBeeDirect': sensor = ZigBeeDirect(config.server_config['zigbee_usb_port']) elif sensorType == 'GEOSystem': sensor = GEOSystem(config.server_config['mysql_geo_server'], config.server_config['mysql_geo_user'], config.server_config['mysql_geo_password'], config.server_config['mysql_geo_db'], config.server_config['mysql_geo_query']) if sensor != None: sensorPollers.append(sensor) dataUpdaters.append( SensorLog(sensor.channels, sensor.__class__.__name__)) for sensorPoller in sensorPollers: sensorPoller.start() for dataUpdater in dataUpdaters: dataUpdater.start() while True: try: sys.stdin.read() except KeyboardInterrupt: break for sensorPoller in sensorPollers: sensorPoller.stop()
# center=128 # width=127 # l=50 # robot = CareOBot('Care-O-Bot 3.2', 'http://cob3-2-pc1:11311') # while True: # for i in range(0, l): # red = (math.sin(frequency*i + phase1) * width + center) / 255 # grn = (math.sin(frequency*i + phase2) * width + center) / 255 # blu = (math.sin(frequency*i + phase3) * width + center) / 255 # robot.setLight([red, grn, blu]) import locations from history import SensorLog l = locations.RobotLocationProcessor(robot) rp = PoseUpdater(robot) sr = SensorLog(rp.channels, rp.robot.name) rp.start() sr.start() l.start() while True: try: sys.stdin.read() except KeyboardInterrupt: break l.stop() sr.stop() rp.stop()
from config import server_config import sys if __name__ == '__main__': robot = CareOBot() z = sensors.ZigBee(server_config['udp_listen_port']) g = sensors.GEOSystem(server_config['mysql_geo_server'], server_config['mysql_geo_user'], server_config['mysql_geo_password'], server_config['mysql_geo_db'], server_config['mysql_geo_query']) l = locations.RobotLocationProcessor(robot) rp = PoseUpdater(robot) sz = SensorLog(z.channels, 'ZigBee') sg = SensorLog(g.channels, 'GEO') sr = SensorLog(rp.channels, rp.robot.name) z.start() sz.start() g.start() sg.start() rp.start() sr.start() l.start() while True: