$search
00001 """autogenerated by genmsg_py from cop_get_methods_listRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class cop_get_methods_listRequest(roslib.message.Message): 00007 _md5sum = "9771833f2c32d57f27ce31a3ac1aee18" 00008 _type = "vision_srvs/cop_get_methods_listRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 uint64 algorithmtype 00013 00014 """ 00015 __slots__ = ['algorithmtype'] 00016 _slot_types = ['uint64'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 algorithmtype 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(cop_get_methods_listRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.algorithmtype is None: 00036 self.algorithmtype = 0 00037 else: 00038 self.algorithmtype = 0 00039 00040 def _get_types(self): 00041 """ 00042 internal API method 00043 """ 00044 return self._slot_types 00045 00046 def serialize(self, buff): 00047 """ 00048 serialize message into buffer 00049 @param buff: buffer 00050 @type buff: StringIO 00051 """ 00052 try: 00053 buff.write(_struct_Q.pack(self.algorithmtype)) 00054 except struct.error as se: self._check_types(se) 00055 except TypeError as te: self._check_types(te) 00056 00057 def deserialize(self, str): 00058 """ 00059 unpack serialized message in str into this message instance 00060 @param str: byte array of serialized message 00061 @type str: str 00062 """ 00063 try: 00064 end = 0 00065 start = end 00066 end += 8 00067 (self.algorithmtype,) = _struct_Q.unpack(str[start:end]) 00068 return self 00069 except struct.error as e: 00070 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00071 00072 00073 def serialize_numpy(self, buff, numpy): 00074 """ 00075 serialize message with numpy array types into buffer 00076 @param buff: buffer 00077 @type buff: StringIO 00078 @param numpy: numpy python module 00079 @type numpy module 00080 """ 00081 try: 00082 buff.write(_struct_Q.pack(self.algorithmtype)) 00083 except struct.error as se: self._check_types(se) 00084 except TypeError as te: self._check_types(te) 00085 00086 def deserialize_numpy(self, str, numpy): 00087 """ 00088 unpack serialized message in str into this message instance using numpy for array types 00089 @param str: byte array of serialized message 00090 @type str: str 00091 @param numpy: numpy python module 00092 @type numpy: module 00093 """ 00094 try: 00095 end = 0 00096 start = end 00097 end += 8 00098 (self.algorithmtype,) = _struct_Q.unpack(str[start:end]) 00099 return self 00100 except struct.error as e: 00101 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00102 00103 _struct_I = roslib.message.struct_I 00104 _struct_Q = struct.Struct("<Q") 00105 """autogenerated by genmsg_py from cop_get_methods_listResponse.msg. Do not edit.""" 00106 import roslib.message 00107 import struct 00108 00109 import vision_msgs.msg 00110 00111 class cop_get_methods_listResponse(roslib.message.Message): 00112 _md5sum = "29050bd853f52e655a64046a89bf0b56" 00113 _type = "vision_srvs/cop_get_methods_listResponse" 00114 _has_header = False #flag to mark the presence of a Header object 00115 _full_text = """vision_msgs/algorithm_evaluation[] method 00116 00117 00118 ================================================================================ 00119 MSG: vision_msgs/algorithm_evaluation 00120 #Message that contains basic information regarding an algorithm U. Klank klank@in.tum.de 00121 string plugin_name # Perception primitive that caused this answer 00122 float64 basic_evaluation # A score describing the basic score of this algorithm, should reflect the significance of the results 00123 object_algorithm_relation[] objects # All objects that were executed with this algotihm and their results 00124 00125 ================================================================================ 00126 MSG: vision_msgs/object_algorithm_relation 00127 #Message that contains basic information regarding the evaluation of an algorithm and its objects U. Klank klank@in.tum.de 00128 uint64 object_id 00129 float64 basic_evaluation 00130 00131 """ 00132 __slots__ = ['method'] 00133 _slot_types = ['vision_msgs/algorithm_evaluation[]'] 00134 00135 def __init__(self, *args, **kwds): 00136 """ 00137 Constructor. Any message fields that are implicitly/explicitly 00138 set to None will be assigned a default value. The recommend 00139 use is keyword arguments as this is more robust to future message 00140 changes. You cannot mix in-order arguments and keyword arguments. 00141 00142 The available fields are: 00143 method 00144 00145 @param args: complete set of field values, in .msg order 00146 @param kwds: use keyword arguments corresponding to message field names 00147 to set specific fields. 00148 """ 00149 if args or kwds: 00150 super(cop_get_methods_listResponse, self).__init__(*args, **kwds) 00151 #message fields cannot be None, assign default values for those that are 00152 if self.method is None: 00153 self.method = [] 00154 else: 00155 self.method = [] 00156 00157 def _get_types(self): 00158 """ 00159 internal API method 00160 """ 00161 return self._slot_types 00162 00163 def serialize(self, buff): 00164 """ 00165 serialize message into buffer 00166 @param buff: buffer 00167 @type buff: StringIO 00168 """ 00169 try: 00170 length = len(self.method) 00171 buff.write(_struct_I.pack(length)) 00172 for val1 in self.method: 00173 _x = val1.plugin_name 00174 length = len(_x) 00175 buff.write(struct.pack('<I%ss'%length, length, _x)) 00176 buff.write(_struct_d.pack(val1.basic_evaluation)) 00177 length = len(val1.objects) 00178 buff.write(_struct_I.pack(length)) 00179 for val2 in val1.objects: 00180 _x = val2 00181 buff.write(_struct_Qd.pack(_x.object_id, _x.basic_evaluation)) 00182 except struct.error as se: self._check_types(se) 00183 except TypeError as te: self._check_types(te) 00184 00185 def deserialize(self, str): 00186 """ 00187 unpack serialized message in str into this message instance 00188 @param str: byte array of serialized message 00189 @type str: str 00190 """ 00191 try: 00192 end = 0 00193 start = end 00194 end += 4 00195 (length,) = _struct_I.unpack(str[start:end]) 00196 self.method = [] 00197 for i in range(0, length): 00198 val1 = vision_msgs.msg.algorithm_evaluation() 00199 start = end 00200 end += 4 00201 (length,) = _struct_I.unpack(str[start:end]) 00202 start = end 00203 end += length 00204 val1.plugin_name = str[start:end] 00205 start = end 00206 end += 8 00207 (val1.basic_evaluation,) = _struct_d.unpack(str[start:end]) 00208 start = end 00209 end += 4 00210 (length,) = _struct_I.unpack(str[start:end]) 00211 val1.objects = [] 00212 for i in range(0, length): 00213 val2 = vision_msgs.msg.object_algorithm_relation() 00214 _x = val2 00215 start = end 00216 end += 16 00217 (_x.object_id, _x.basic_evaluation,) = _struct_Qd.unpack(str[start:end]) 00218 val1.objects.append(val2) 00219 self.method.append(val1) 00220 return self 00221 except struct.error as e: 00222 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00223 00224 00225 def serialize_numpy(self, buff, numpy): 00226 """ 00227 serialize message with numpy array types into buffer 00228 @param buff: buffer 00229 @type buff: StringIO 00230 @param numpy: numpy python module 00231 @type numpy module 00232 """ 00233 try: 00234 length = len(self.method) 00235 buff.write(_struct_I.pack(length)) 00236 for val1 in self.method: 00237 _x = val1.plugin_name 00238 length = len(_x) 00239 buff.write(struct.pack('<I%ss'%length, length, _x)) 00240 buff.write(_struct_d.pack(val1.basic_evaluation)) 00241 length = len(val1.objects) 00242 buff.write(_struct_I.pack(length)) 00243 for val2 in val1.objects: 00244 _x = val2 00245 buff.write(_struct_Qd.pack(_x.object_id, _x.basic_evaluation)) 00246 except struct.error as se: self._check_types(se) 00247 except TypeError as te: self._check_types(te) 00248 00249 def deserialize_numpy(self, str, numpy): 00250 """ 00251 unpack serialized message in str into this message instance using numpy for array types 00252 @param str: byte array of serialized message 00253 @type str: str 00254 @param numpy: numpy python module 00255 @type numpy: module 00256 """ 00257 try: 00258 end = 0 00259 start = end 00260 end += 4 00261 (length,) = _struct_I.unpack(str[start:end]) 00262 self.method = [] 00263 for i in range(0, length): 00264 val1 = vision_msgs.msg.algorithm_evaluation() 00265 start = end 00266 end += 4 00267 (length,) = _struct_I.unpack(str[start:end]) 00268 start = end 00269 end += length 00270 val1.plugin_name = str[start:end] 00271 start = end 00272 end += 8 00273 (val1.basic_evaluation,) = _struct_d.unpack(str[start:end]) 00274 start = end 00275 end += 4 00276 (length,) = _struct_I.unpack(str[start:end]) 00277 val1.objects = [] 00278 for i in range(0, length): 00279 val2 = vision_msgs.msg.object_algorithm_relation() 00280 _x = val2 00281 start = end 00282 end += 16 00283 (_x.object_id, _x.basic_evaluation,) = _struct_Qd.unpack(str[start:end]) 00284 val1.objects.append(val2) 00285 self.method.append(val1) 00286 return self 00287 except struct.error as e: 00288 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00289 00290 _struct_I = roslib.message.struct_I 00291 _struct_d = struct.Struct("<d") 00292 _struct_Qd = struct.Struct("<Qd") 00293 class cop_get_methods_list(roslib.message.ServiceDefinition): 00294 _type = 'vision_srvs/cop_get_methods_list' 00295 _md5sum = '53c8c94190c8c2dfb2174d3427ac0057' 00296 _request_class = cop_get_methods_listRequest 00297 _response_class = cop_get_methods_listResponse