$search
00001 """autogenerated by genmsg_py from system_error.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class system_error(roslib.message.Message): 00007 _md5sum = "a26e239d3a42fd6822d79621c90c2d42" 00008 _type = "vision_msgs/system_error" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """uint64 MANIPULATION_POSE_UNREACHABLE = 64 00011 uint64 GRASP_FAILED = 128 # Grasp into the void 00012 uint64 OBJECT_NOT_FOUND = 256 00013 uint64 VISION_PRIMITIVE_FAILED = 512 00014 uint64 CONTRADICTING_TACTILE_FEEDBACK = 1024 # Collide without expecting it 00015 uint64 CONTRADICTING_VISION_RESULTS = 2048 00016 uint64 GRASP_FAILED_AND_CRASHED = 4096 # Throwing something out of the way 00017 uint64 JLO_ERROR = 8192 # Could not get position 00018 uint64 VECTOR_FIELD_CANT_REACH = 16384 # The arm got stuck along the way, did not reach the final grasping pose 00019 00020 uint64 error_id # One of the error constants defined above 00021 string node_name # The node causing this error 00022 string error_description # Further information about the error 00023 00024 """ 00025 # Pseudo-constants 00026 MANIPULATION_POSE_UNREACHABLE = 64 00027 GRASP_FAILED = 128 00028 OBJECT_NOT_FOUND = 256 00029 VISION_PRIMITIVE_FAILED = 512 00030 CONTRADICTING_TACTILE_FEEDBACK = 1024 00031 CONTRADICTING_VISION_RESULTS = 2048 00032 GRASP_FAILED_AND_CRASHED = 4096 00033 JLO_ERROR = 8192 00034 VECTOR_FIELD_CANT_REACH = 16384 00035 00036 __slots__ = ['error_id','node_name','error_description'] 00037 _slot_types = ['uint64','string','string'] 00038 00039 def __init__(self, *args, **kwds): 00040 """ 00041 Constructor. Any message fields that are implicitly/explicitly 00042 set to None will be assigned a default value. The recommend 00043 use is keyword arguments as this is more robust to future message 00044 changes. You cannot mix in-order arguments and keyword arguments. 00045 00046 The available fields are: 00047 error_id,node_name,error_description 00048 00049 @param args: complete set of field values, in .msg order 00050 @param kwds: use keyword arguments corresponding to message field names 00051 to set specific fields. 00052 """ 00053 if args or kwds: 00054 super(system_error, self).__init__(*args, **kwds) 00055 #message fields cannot be None, assign default values for those that are 00056 if self.error_id is None: 00057 self.error_id = 0 00058 if self.node_name is None: 00059 self.node_name = '' 00060 if self.error_description is None: 00061 self.error_description = '' 00062 else: 00063 self.error_id = 0 00064 self.node_name = '' 00065 self.error_description = '' 00066 00067 def _get_types(self): 00068 """ 00069 internal API method 00070 """ 00071 return self._slot_types 00072 00073 def serialize(self, buff): 00074 """ 00075 serialize message into buffer 00076 @param buff: buffer 00077 @type buff: StringIO 00078 """ 00079 try: 00080 buff.write(_struct_Q.pack(self.error_id)) 00081 _x = self.node_name 00082 length = len(_x) 00083 buff.write(struct.pack('<I%ss'%length, length, _x)) 00084 _x = self.error_description 00085 length = len(_x) 00086 buff.write(struct.pack('<I%ss'%length, length, _x)) 00087 except struct.error as se: self._check_types(se) 00088 except TypeError as te: self._check_types(te) 00089 00090 def deserialize(self, str): 00091 """ 00092 unpack serialized message in str into this message instance 00093 @param str: byte array of serialized message 00094 @type str: str 00095 """ 00096 try: 00097 end = 0 00098 start = end 00099 end += 8 00100 (self.error_id,) = _struct_Q.unpack(str[start:end]) 00101 start = end 00102 end += 4 00103 (length,) = _struct_I.unpack(str[start:end]) 00104 start = end 00105 end += length 00106 self.node_name = str[start:end] 00107 start = end 00108 end += 4 00109 (length,) = _struct_I.unpack(str[start:end]) 00110 start = end 00111 end += length 00112 self.error_description = str[start:end] 00113 return self 00114 except struct.error as e: 00115 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00116 00117 00118 def serialize_numpy(self, buff, numpy): 00119 """ 00120 serialize message with numpy array types into buffer 00121 @param buff: buffer 00122 @type buff: StringIO 00123 @param numpy: numpy python module 00124 @type numpy module 00125 """ 00126 try: 00127 buff.write(_struct_Q.pack(self.error_id)) 00128 _x = self.node_name 00129 length = len(_x) 00130 buff.write(struct.pack('<I%ss'%length, length, _x)) 00131 _x = self.error_description 00132 length = len(_x) 00133 buff.write(struct.pack('<I%ss'%length, length, _x)) 00134 except struct.error as se: self._check_types(se) 00135 except TypeError as te: self._check_types(te) 00136 00137 def deserialize_numpy(self, str, numpy): 00138 """ 00139 unpack serialized message in str into this message instance using numpy for array types 00140 @param str: byte array of serialized message 00141 @type str: str 00142 @param numpy: numpy python module 00143 @type numpy: module 00144 """ 00145 try: 00146 end = 0 00147 start = end 00148 end += 8 00149 (self.error_id,) = _struct_Q.unpack(str[start:end]) 00150 start = end 00151 end += 4 00152 (length,) = _struct_I.unpack(str[start:end]) 00153 start = end 00154 end += length 00155 self.node_name = str[start:end] 00156 start = end 00157 end += 4 00158 (length,) = _struct_I.unpack(str[start:end]) 00159 start = end 00160 end += length 00161 self.error_description = str[start:end] 00162 return self 00163 except struct.error as e: 00164 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00165 00166 _struct_I = roslib.message.struct_I 00167 _struct_Q = struct.Struct("<Q")