# 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()
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()
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: try: sys.stdin.read() except KeyboardInterrupt: break l.stop()