$search
00001 """autogenerated by genmsg_py from GetObjectModelRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetObjectModelRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "worldmodel_msgs/GetObjectModelRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 """ 00013 __slots__ = [] 00014 _slot_types = [] 00015 00016 def __init__(self, *args, **kwds): 00017 """ 00018 Constructor. Any message fields that are implicitly/explicitly 00019 set to None will be assigned a default value. The recommend 00020 use is keyword arguments as this is more robust to future message 00021 changes. You cannot mix in-order arguments and keyword arguments. 00022 00023 The available fields are: 00024 00025 00026 @param args: complete set of field values, in .msg order 00027 @param kwds: use keyword arguments corresponding to message field names 00028 to set specific fields. 00029 """ 00030 if args or kwds: 00031 super(GetObjectModelRequest, self).__init__(*args, **kwds) 00032 00033 def _get_types(self): 00034 """ 00035 internal API method 00036 """ 00037 return self._slot_types 00038 00039 def serialize(self, buff): 00040 """ 00041 serialize message into buffer 00042 @param buff: buffer 00043 @type buff: StringIO 00044 """ 00045 try: 00046 pass 00047 except struct.error as se: self._check_types(se) 00048 except TypeError as te: self._check_types(te) 00049 00050 def deserialize(self, str): 00051 """ 00052 unpack serialized message in str into this message instance 00053 @param str: byte array of serialized message 00054 @type str: str 00055 """ 00056 try: 00057 end = 0 00058 return self 00059 except struct.error as e: 00060 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00061 00062 00063 def serialize_numpy(self, buff, numpy): 00064 """ 00065 serialize message with numpy array types into buffer 00066 @param buff: buffer 00067 @type buff: StringIO 00068 @param numpy: numpy python module 00069 @type numpy module 00070 """ 00071 try: 00072 pass 00073 except struct.error as se: self._check_types(se) 00074 except TypeError as te: self._check_types(te) 00075 00076 def deserialize_numpy(self, str, numpy): 00077 """ 00078 unpack serialized message in str into this message instance using numpy for array types 00079 @param str: byte array of serialized message 00080 @type str: str 00081 @param numpy: numpy python module 00082 @type numpy: module 00083 """ 00084 try: 00085 end = 0 00086 return self 00087 except struct.error as e: 00088 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00089 00090 _struct_I = roslib.message.struct_I 00091 """autogenerated by genmsg_py from GetObjectModelResponse.msg. Do not edit.""" 00092 import roslib.message 00093 import struct 00094 00095 import geometry_msgs.msg 00096 import worldmodel_msgs.msg 00097 import std_msgs.msg 00098 00099 class GetObjectModelResponse(roslib.message.Message): 00100 _md5sum = "7db65d70fef30d6f864880ed7f1d35c9" 00101 _type = "worldmodel_msgs/GetObjectModelResponse" 00102 _has_header = False #flag to mark the presence of a Header object 00103 _full_text = """ObjectModel model 00104 00105 00106 ================================================================================ 00107 MSG: worldmodel_msgs/ObjectModel 00108 # This message represents a collection of known objects. 00109 worldmodel_msgs/Object[] objects 00110 00111 ================================================================================ 00112 MSG: worldmodel_msgs/Object 00113 # This message represents an estimate of an object's pose and identity. 00114 00115 # The header. 00116 # stamp: Timestamp of last update. 00117 # frame_id: Coordinate frame, in which the pose is given 00118 Header header 00119 00120 # The pose 00121 geometry_msgs/PoseWithCovariance pose 00122 00123 # Further information about the object 00124 ObjectInfo info 00125 00126 # The tracked state of the object 00127 ObjectState state 00128 00129 ================================================================================ 00130 MSG: std_msgs/Header 00131 # Standard metadata for higher-level stamped data types. 00132 # This is generally used to communicate timestamped data 00133 # in a particular coordinate frame. 00134 # 00135 # sequence ID: consecutively increasing ID 00136 uint32 seq 00137 #Two-integer timestamp that is expressed as: 00138 # * stamp.secs: seconds (stamp_secs) since epoch 00139 # * stamp.nsecs: nanoseconds since stamp_secs 00140 # time-handling sugar is provided by the client library 00141 time stamp 00142 #Frame this data is associated with 00143 # 0: no frame 00144 # 1: global frame 00145 string frame_id 00146 00147 ================================================================================ 00148 MSG: geometry_msgs/PoseWithCovariance 00149 # This represents a pose in free space with uncertainty. 00150 00151 Pose pose 00152 00153 # Row-major representation of the 6x6 covariance matrix 00154 # The orientation parameters use a fixed-axis representation. 00155 # In order, the parameters are: 00156 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) 00157 float64[36] covariance 00158 00159 ================================================================================ 00160 MSG: geometry_msgs/Pose 00161 # A representation of pose in free space, composed of postion and orientation. 00162 Point position 00163 Quaternion orientation 00164 00165 ================================================================================ 00166 MSG: geometry_msgs/Point 00167 # This contains the position of a point in free space 00168 float64 x 00169 float64 y 00170 float64 z 00171 00172 ================================================================================ 00173 MSG: geometry_msgs/Quaternion 00174 # This represents an orientation in free space in quaternion form. 00175 00176 float64 x 00177 float64 y 00178 float64 z 00179 float64 w 00180 00181 ================================================================================ 00182 MSG: worldmodel_msgs/ObjectInfo 00183 # This message contains information about the estimated class affiliation, object id and corresponding support 00184 00185 # A string identifying the object's class (all objects of a class look the same) 00186 string class_id 00187 00188 # A string identifying the specific object 00189 string object_id 00190 00191 # A string that contains the name or a description of the specific object 00192 string name 00193 00194 # The support (degree of belief) of the object's presence given as log odd ratio 00195 float32 support 00196 00197 00198 ================================================================================ 00199 MSG: worldmodel_msgs/ObjectState 00200 # The state of an object estimate used to track 00201 # states smaller than 0 disable all updates 00202 00203 int8 UNKNOWN = 0 00204 int8 PENDING = 1 00205 int8 ACTIVE = 2 00206 int8 CONFIRMED = -1 00207 int8 DISCARDED = -2 00208 int8 APPROACHING = -3 00209 00210 int8 state 00211 00212 """ 00213 __slots__ = ['model'] 00214 _slot_types = ['worldmodel_msgs/ObjectModel'] 00215 00216 def __init__(self, *args, **kwds): 00217 """ 00218 Constructor. Any message fields that are implicitly/explicitly 00219 set to None will be assigned a default value. The recommend 00220 use is keyword arguments as this is more robust to future message 00221 changes. You cannot mix in-order arguments and keyword arguments. 00222 00223 The available fields are: 00224 model 00225 00226 @param args: complete set of field values, in .msg order 00227 @param kwds: use keyword arguments corresponding to message field names 00228 to set specific fields. 00229 """ 00230 if args or kwds: 00231 super(GetObjectModelResponse, self).__init__(*args, **kwds) 00232 #message fields cannot be None, assign default values for those that are 00233 if self.model is None: 00234 self.model = worldmodel_msgs.msg.ObjectModel() 00235 else: 00236 self.model = worldmodel_msgs.msg.ObjectModel() 00237 00238 def _get_types(self): 00239 """ 00240 internal API method 00241 """ 00242 return self._slot_types 00243 00244 def serialize(self, buff): 00245 """ 00246 serialize message into buffer 00247 @param buff: buffer 00248 @type buff: StringIO 00249 """ 00250 try: 00251 length = len(self.model.objects) 00252 buff.write(_struct_I.pack(length)) 00253 for val1 in self.model.objects: 00254 _v1 = val1.header 00255 buff.write(_struct_I.pack(_v1.seq)) 00256 _v2 = _v1.stamp 00257 _x = _v2 00258 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00259 _x = _v1.frame_id 00260 length = len(_x) 00261 buff.write(struct.pack('<I%ss'%length, length, _x)) 00262 _v3 = val1.pose 00263 _v4 = _v3.pose 00264 _v5 = _v4.position 00265 _x = _v5 00266 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00267 _v6 = _v4.orientation 00268 _x = _v6 00269 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00270 buff.write(_struct_36d.pack(*_v3.covariance)) 00271 _v7 = val1.info 00272 _x = _v7.class_id 00273 length = len(_x) 00274 buff.write(struct.pack('<I%ss'%length, length, _x)) 00275 _x = _v7.object_id 00276 length = len(_x) 00277 buff.write(struct.pack('<I%ss'%length, length, _x)) 00278 _x = _v7.name 00279 length = len(_x) 00280 buff.write(struct.pack('<I%ss'%length, length, _x)) 00281 buff.write(_struct_f.pack(_v7.support)) 00282 _v8 = val1.state 00283 buff.write(_struct_b.pack(_v8.state)) 00284 except struct.error as se: self._check_types(se) 00285 except TypeError as te: self._check_types(te) 00286 00287 def deserialize(self, str): 00288 """ 00289 unpack serialized message in str into this message instance 00290 @param str: byte array of serialized message 00291 @type str: str 00292 """ 00293 try: 00294 if self.model is None: 00295 self.model = worldmodel_msgs.msg.ObjectModel() 00296 end = 0 00297 start = end 00298 end += 4 00299 (length,) = _struct_I.unpack(str[start:end]) 00300 self.model.objects = [] 00301 for i in range(0, length): 00302 val1 = worldmodel_msgs.msg.Object() 00303 _v9 = val1.header 00304 start = end 00305 end += 4 00306 (_v9.seq,) = _struct_I.unpack(str[start:end]) 00307 _v10 = _v9.stamp 00308 _x = _v10 00309 start = end 00310 end += 8 00311 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00312 start = end 00313 end += 4 00314 (length,) = _struct_I.unpack(str[start:end]) 00315 start = end 00316 end += length 00317 _v9.frame_id = str[start:end] 00318 _v11 = val1.pose 00319 _v12 = _v11.pose 00320 _v13 = _v12.position 00321 _x = _v13 00322 start = end 00323 end += 24 00324 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00325 _v14 = _v12.orientation 00326 _x = _v14 00327 start = end 00328 end += 32 00329 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00330 start = end 00331 end += 288 00332 _v11.covariance = _struct_36d.unpack(str[start:end]) 00333 _v15 = val1.info 00334 start = end 00335 end += 4 00336 (length,) = _struct_I.unpack(str[start:end]) 00337 start = end 00338 end += length 00339 _v15.class_id = str[start:end] 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 start = end 00344 end += length 00345 _v15.object_id = str[start:end] 00346 start = end 00347 end += 4 00348 (length,) = _struct_I.unpack(str[start:end]) 00349 start = end 00350 end += length 00351 _v15.name = str[start:end] 00352 start = end 00353 end += 4 00354 (_v15.support,) = _struct_f.unpack(str[start:end]) 00355 _v16 = val1.state 00356 start = end 00357 end += 1 00358 (_v16.state,) = _struct_b.unpack(str[start:end]) 00359 self.model.objects.append(val1) 00360 return self 00361 except struct.error as e: 00362 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00363 00364 00365 def serialize_numpy(self, buff, numpy): 00366 """ 00367 serialize message with numpy array types into buffer 00368 @param buff: buffer 00369 @type buff: StringIO 00370 @param numpy: numpy python module 00371 @type numpy module 00372 """ 00373 try: 00374 length = len(self.model.objects) 00375 buff.write(_struct_I.pack(length)) 00376 for val1 in self.model.objects: 00377 _v17 = val1.header 00378 buff.write(_struct_I.pack(_v17.seq)) 00379 _v18 = _v17.stamp 00380 _x = _v18 00381 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00382 _x = _v17.frame_id 00383 length = len(_x) 00384 buff.write(struct.pack('<I%ss'%length, length, _x)) 00385 _v19 = val1.pose 00386 _v20 = _v19.pose 00387 _v21 = _v20.position 00388 _x = _v21 00389 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00390 _v22 = _v20.orientation 00391 _x = _v22 00392 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00393 buff.write(_v19.covariance.tostring()) 00394 _v23 = val1.info 00395 _x = _v23.class_id 00396 length = len(_x) 00397 buff.write(struct.pack('<I%ss'%length, length, _x)) 00398 _x = _v23.object_id 00399 length = len(_x) 00400 buff.write(struct.pack('<I%ss'%length, length, _x)) 00401 _x = _v23.name 00402 length = len(_x) 00403 buff.write(struct.pack('<I%ss'%length, length, _x)) 00404 buff.write(_struct_f.pack(_v23.support)) 00405 _v24 = val1.state 00406 buff.write(_struct_b.pack(_v24.state)) 00407 except struct.error as se: self._check_types(se) 00408 except TypeError as te: self._check_types(te) 00409 00410 def deserialize_numpy(self, str, numpy): 00411 """ 00412 unpack serialized message in str into this message instance using numpy for array types 00413 @param str: byte array of serialized message 00414 @type str: str 00415 @param numpy: numpy python module 00416 @type numpy: module 00417 """ 00418 try: 00419 if self.model is None: 00420 self.model = worldmodel_msgs.msg.ObjectModel() 00421 end = 0 00422 start = end 00423 end += 4 00424 (length,) = _struct_I.unpack(str[start:end]) 00425 self.model.objects = [] 00426 for i in range(0, length): 00427 val1 = worldmodel_msgs.msg.Object() 00428 _v25 = val1.header 00429 start = end 00430 end += 4 00431 (_v25.seq,) = _struct_I.unpack(str[start:end]) 00432 _v26 = _v25.stamp 00433 _x = _v26 00434 start = end 00435 end += 8 00436 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00437 start = end 00438 end += 4 00439 (length,) = _struct_I.unpack(str[start:end]) 00440 start = end 00441 end += length 00442 _v25.frame_id = str[start:end] 00443 _v27 = val1.pose 00444 _v28 = _v27.pose 00445 _v29 = _v28.position 00446 _x = _v29 00447 start = end 00448 end += 24 00449 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00450 _v30 = _v28.orientation 00451 _x = _v30 00452 start = end 00453 end += 32 00454 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00455 start = end 00456 end += 288 00457 _v27.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36) 00458 _v31 = val1.info 00459 start = end 00460 end += 4 00461 (length,) = _struct_I.unpack(str[start:end]) 00462 start = end 00463 end += length 00464 _v31.class_id = str[start:end] 00465 start = end 00466 end += 4 00467 (length,) = _struct_I.unpack(str[start:end]) 00468 start = end 00469 end += length 00470 _v31.object_id = str[start:end] 00471 start = end 00472 end += 4 00473 (length,) = _struct_I.unpack(str[start:end]) 00474 start = end 00475 end += length 00476 _v31.name = str[start:end] 00477 start = end 00478 end += 4 00479 (_v31.support,) = _struct_f.unpack(str[start:end]) 00480 _v32 = val1.state 00481 start = end 00482 end += 1 00483 (_v32.state,) = _struct_b.unpack(str[start:end]) 00484 self.model.objects.append(val1) 00485 return self 00486 except struct.error as e: 00487 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00488 00489 _struct_I = roslib.message.struct_I 00490 _struct_b = struct.Struct("<b") 00491 _struct_f = struct.Struct("<f") 00492 _struct_36d = struct.Struct("<36d") 00493 _struct_4d = struct.Struct("<4d") 00494 _struct_2I = struct.Struct("<2I") 00495 _struct_3d = struct.Struct("<3d") 00496 class GetObjectModel(roslib.message.ServiceDefinition): 00497 _type = 'worldmodel_msgs/GetObjectModel' 00498 _md5sum = '7db65d70fef30d6f864880ed7f1d35c9' 00499 _request_class = GetObjectModelRequest 00500 _response_class = GetObjectModelResponse