RobotCommandID = 0 RobotStatusID = 0 RobotCommandState = CommandStateType.READY RobotPose = PoseLocationType() GripperCommandID = 0 GripperStatusID = 0 GripperCommandState = CommandStateType.READY def except_info(): exc_type, exc_value = sys.exc_info()[:2] return str(exc_type.__name__) + ": " + str(exc_value) AprsDB = MySQLdbConn() def robot_reader(conn): global DEBUG, RobotCommandID, RobotStatusID, RobotCommandState, RobotPose size = 1024 while True: try: data = conn.recv(size) except: break if not data: break try: tree = ET.parse(StringIO.StringIO(data.rstrip(' \t\n\r\0'))) root = tree.getroot() if root.tag == "CRCLStatus":