$search
00001 """autogenerated by genmsg_py from GetObjectsOnMapRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetObjectsOnMapRequest(roslib.message.Message): 00007 _md5sum = "a14354db805feb47c061b3cb1b443b04" 00008 _type = "srs_knowledge/GetObjectsOnMapRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 string map 00013 00014 00015 00016 bool ifGeometryInfo 00017 00018 00019 """ 00020 __slots__ = ['map','ifGeometryInfo'] 00021 _slot_types = ['string','bool'] 00022 00023 def __init__(self, *args, **kwds): 00024 """ 00025 Constructor. Any message fields that are implicitly/explicitly 00026 set to None will be assigned a default value. The recommend 00027 use is keyword arguments as this is more robust to future message 00028 changes. You cannot mix in-order arguments and keyword arguments. 00029 00030 The available fields are: 00031 map,ifGeometryInfo 00032 00033 @param args: complete set of field values, in .msg order 00034 @param kwds: use keyword arguments corresponding to message field names 00035 to set specific fields. 00036 """ 00037 if args or kwds: 00038 super(GetObjectsOnMapRequest, self).__init__(*args, **kwds) 00039 #message fields cannot be None, assign default values for those that are 00040 if self.map is None: 00041 self.map = '' 00042 if self.ifGeometryInfo is None: 00043 self.ifGeometryInfo = False 00044 else: 00045 self.map = '' 00046 self.ifGeometryInfo = False 00047 00048 def _get_types(self): 00049 """ 00050 internal API method 00051 """ 00052 return self._slot_types 00053 00054 def serialize(self, buff): 00055 """ 00056 serialize message into buffer 00057 @param buff: buffer 00058 @type buff: StringIO 00059 """ 00060 try: 00061 _x = self.map 00062 length = len(_x) 00063 buff.write(struct.pack('<I%ss'%length, length, _x)) 00064 buff.write(_struct_B.pack(self.ifGeometryInfo)) 00065 except struct.error as se: self._check_types(se) 00066 except TypeError as te: self._check_types(te) 00067 00068 def deserialize(self, str): 00069 """ 00070 unpack serialized message in str into this message instance 00071 @param str: byte array of serialized message 00072 @type str: str 00073 """ 00074 try: 00075 end = 0 00076 start = end 00077 end += 4 00078 (length,) = _struct_I.unpack(str[start:end]) 00079 start = end 00080 end += length 00081 self.map = str[start:end] 00082 start = end 00083 end += 1 00084 (self.ifGeometryInfo,) = _struct_B.unpack(str[start:end]) 00085 self.ifGeometryInfo = bool(self.ifGeometryInfo) 00086 return self 00087 except struct.error as e: 00088 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00089 00090 00091 def serialize_numpy(self, buff, numpy): 00092 """ 00093 serialize message with numpy array types into buffer 00094 @param buff: buffer 00095 @type buff: StringIO 00096 @param numpy: numpy python module 00097 @type numpy module 00098 """ 00099 try: 00100 _x = self.map 00101 length = len(_x) 00102 buff.write(struct.pack('<I%ss'%length, length, _x)) 00103 buff.write(_struct_B.pack(self.ifGeometryInfo)) 00104 except struct.error as se: self._check_types(se) 00105 except TypeError as te: self._check_types(te) 00106 00107 def deserialize_numpy(self, str, numpy): 00108 """ 00109 unpack serialized message in str into this message instance using numpy for array types 00110 @param str: byte array of serialized message 00111 @type str: str 00112 @param numpy: numpy python module 00113 @type numpy: module 00114 """ 00115 try: 00116 end = 0 00117 start = end 00118 end += 4 00119 (length,) = _struct_I.unpack(str[start:end]) 00120 start = end 00121 end += length 00122 self.map = str[start:end] 00123 start = end 00124 end += 1 00125 (self.ifGeometryInfo,) = _struct_B.unpack(str[start:end]) 00126 self.ifGeometryInfo = bool(self.ifGeometryInfo) 00127 return self 00128 except struct.error as e: 00129 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00130 00131 _struct_I = roslib.message.struct_I 00132 _struct_B = struct.Struct("<B") 00133 """autogenerated by genmsg_py from GetObjectsOnMapResponse.msg. Do not edit.""" 00134 import roslib.message 00135 import struct 00136 00137 import geometry_msgs.msg 00138 import srs_msgs.msg 00139 00140 class GetObjectsOnMapResponse(roslib.message.Message): 00141 _md5sum = "78feebc164a70a60a9550ad0470017c1" 00142 _type = "srs_knowledge/GetObjectsOnMapResponse" 00143 _has_header = False #flag to mark the presence of a Header object 00144 _full_text = """ 00145 string[] objects 00146 string[] classesOfObjects 00147 string[] spatialRelation 00148 string[] spatialRelatedObject 00149 string[] houseHoldId 00150 srs_msgs/SRSSpatialInfo[] objectsInfo 00151 string[] readableNames 00152 00153 00154 ================================================================================ 00155 MSG: srs_msgs/SRSSpatialInfo 00156 # Point point 00157 # Orientation angles 00158 float32 l 00159 float32 w 00160 float32 h 00161 00162 geometry_msgs/Pose pose 00163 00164 ================================================================================ 00165 MSG: geometry_msgs/Pose 00166 # A representation of pose in free space, composed of postion and orientation. 00167 Point position 00168 Quaternion orientation 00169 00170 ================================================================================ 00171 MSG: geometry_msgs/Point 00172 # This contains the position of a point in free space 00173 float64 x 00174 float64 y 00175 float64 z 00176 00177 ================================================================================ 00178 MSG: geometry_msgs/Quaternion 00179 # This represents an orientation in free space in quaternion form. 00180 00181 float64 x 00182 float64 y 00183 float64 z 00184 float64 w 00185 00186 """ 00187 __slots__ = ['objects','classesOfObjects','spatialRelation','spatialRelatedObject','houseHoldId','objectsInfo','readableNames'] 00188 _slot_types = ['string[]','string[]','string[]','string[]','string[]','srs_msgs/SRSSpatialInfo[]','string[]'] 00189 00190 def __init__(self, *args, **kwds): 00191 """ 00192 Constructor. Any message fields that are implicitly/explicitly 00193 set to None will be assigned a default value. The recommend 00194 use is keyword arguments as this is more robust to future message 00195 changes. You cannot mix in-order arguments and keyword arguments. 00196 00197 The available fields are: 00198 objects,classesOfObjects,spatialRelation,spatialRelatedObject,houseHoldId,objectsInfo,readableNames 00199 00200 @param args: complete set of field values, in .msg order 00201 @param kwds: use keyword arguments corresponding to message field names 00202 to set specific fields. 00203 """ 00204 if args or kwds: 00205 super(GetObjectsOnMapResponse, self).__init__(*args, **kwds) 00206 #message fields cannot be None, assign default values for those that are 00207 if self.objects is None: 00208 self.objects = [] 00209 if self.classesOfObjects is None: 00210 self.classesOfObjects = [] 00211 if self.spatialRelation is None: 00212 self.spatialRelation = [] 00213 if self.spatialRelatedObject is None: 00214 self.spatialRelatedObject = [] 00215 if self.houseHoldId is None: 00216 self.houseHoldId = [] 00217 if self.objectsInfo is None: 00218 self.objectsInfo = [] 00219 if self.readableNames is None: 00220 self.readableNames = [] 00221 else: 00222 self.objects = [] 00223 self.classesOfObjects = [] 00224 self.spatialRelation = [] 00225 self.spatialRelatedObject = [] 00226 self.houseHoldId = [] 00227 self.objectsInfo = [] 00228 self.readableNames = [] 00229 00230 def _get_types(self): 00231 """ 00232 internal API method 00233 """ 00234 return self._slot_types 00235 00236 def serialize(self, buff): 00237 """ 00238 serialize message into buffer 00239 @param buff: buffer 00240 @type buff: StringIO 00241 """ 00242 try: 00243 length = len(self.objects) 00244 buff.write(_struct_I.pack(length)) 00245 for val1 in self.objects: 00246 length = len(val1) 00247 buff.write(struct.pack('<I%ss'%length, length, val1)) 00248 length = len(self.classesOfObjects) 00249 buff.write(_struct_I.pack(length)) 00250 for val1 in self.classesOfObjects: 00251 length = len(val1) 00252 buff.write(struct.pack('<I%ss'%length, length, val1)) 00253 length = len(self.spatialRelation) 00254 buff.write(_struct_I.pack(length)) 00255 for val1 in self.spatialRelation: 00256 length = len(val1) 00257 buff.write(struct.pack('<I%ss'%length, length, val1)) 00258 length = len(self.spatialRelatedObject) 00259 buff.write(_struct_I.pack(length)) 00260 for val1 in self.spatialRelatedObject: 00261 length = len(val1) 00262 buff.write(struct.pack('<I%ss'%length, length, val1)) 00263 length = len(self.houseHoldId) 00264 buff.write(_struct_I.pack(length)) 00265 for val1 in self.houseHoldId: 00266 length = len(val1) 00267 buff.write(struct.pack('<I%ss'%length, length, val1)) 00268 length = len(self.objectsInfo) 00269 buff.write(_struct_I.pack(length)) 00270 for val1 in self.objectsInfo: 00271 _x = val1 00272 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h)) 00273 _v1 = val1.pose 00274 _v2 = _v1.position 00275 _x = _v2 00276 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00277 _v3 = _v1.orientation 00278 _x = _v3 00279 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00280 length = len(self.readableNames) 00281 buff.write(_struct_I.pack(length)) 00282 for val1 in self.readableNames: 00283 length = len(val1) 00284 buff.write(struct.pack('<I%ss'%length, length, val1)) 00285 except struct.error as se: self._check_types(se) 00286 except TypeError as te: self._check_types(te) 00287 00288 def deserialize(self, str): 00289 """ 00290 unpack serialized message in str into this message instance 00291 @param str: byte array of serialized message 00292 @type str: str 00293 """ 00294 try: 00295 end = 0 00296 start = end 00297 end += 4 00298 (length,) = _struct_I.unpack(str[start:end]) 00299 self.objects = [] 00300 for i in range(0, length): 00301 start = end 00302 end += 4 00303 (length,) = _struct_I.unpack(str[start:end]) 00304 start = end 00305 end += length 00306 val1 = str[start:end] 00307 self.objects.append(val1) 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 self.classesOfObjects = [] 00312 for i in range(0, length): 00313 start = end 00314 end += 4 00315 (length,) = _struct_I.unpack(str[start:end]) 00316 start = end 00317 end += length 00318 val1 = str[start:end] 00319 self.classesOfObjects.append(val1) 00320 start = end 00321 end += 4 00322 (length,) = _struct_I.unpack(str[start:end]) 00323 self.spatialRelation = [] 00324 for i in range(0, length): 00325 start = end 00326 end += 4 00327 (length,) = _struct_I.unpack(str[start:end]) 00328 start = end 00329 end += length 00330 val1 = str[start:end] 00331 self.spatialRelation.append(val1) 00332 start = end 00333 end += 4 00334 (length,) = _struct_I.unpack(str[start:end]) 00335 self.spatialRelatedObject = [] 00336 for i in range(0, length): 00337 start = end 00338 end += 4 00339 (length,) = _struct_I.unpack(str[start:end]) 00340 start = end 00341 end += length 00342 val1 = str[start:end] 00343 self.spatialRelatedObject.append(val1) 00344 start = end 00345 end += 4 00346 (length,) = _struct_I.unpack(str[start:end]) 00347 self.houseHoldId = [] 00348 for i in range(0, length): 00349 start = end 00350 end += 4 00351 (length,) = _struct_I.unpack(str[start:end]) 00352 start = end 00353 end += length 00354 val1 = str[start:end] 00355 self.houseHoldId.append(val1) 00356 start = end 00357 end += 4 00358 (length,) = _struct_I.unpack(str[start:end]) 00359 self.objectsInfo = [] 00360 for i in range(0, length): 00361 val1 = srs_msgs.msg.SRSSpatialInfo() 00362 _x = val1 00363 start = end 00364 end += 12 00365 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end]) 00366 _v4 = val1.pose 00367 _v5 = _v4.position 00368 _x = _v5 00369 start = end 00370 end += 24 00371 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00372 _v6 = _v4.orientation 00373 _x = _v6 00374 start = end 00375 end += 32 00376 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00377 self.objectsInfo.append(val1) 00378 start = end 00379 end += 4 00380 (length,) = _struct_I.unpack(str[start:end]) 00381 self.readableNames = [] 00382 for i in range(0, length): 00383 start = end 00384 end += 4 00385 (length,) = _struct_I.unpack(str[start:end]) 00386 start = end 00387 end += length 00388 val1 = str[start:end] 00389 self.readableNames.append(val1) 00390 return self 00391 except struct.error as e: 00392 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00393 00394 00395 def serialize_numpy(self, buff, numpy): 00396 """ 00397 serialize message with numpy array types into buffer 00398 @param buff: buffer 00399 @type buff: StringIO 00400 @param numpy: numpy python module 00401 @type numpy module 00402 """ 00403 try: 00404 length = len(self.objects) 00405 buff.write(_struct_I.pack(length)) 00406 for val1 in self.objects: 00407 length = len(val1) 00408 buff.write(struct.pack('<I%ss'%length, length, val1)) 00409 length = len(self.classesOfObjects) 00410 buff.write(_struct_I.pack(length)) 00411 for val1 in self.classesOfObjects: 00412 length = len(val1) 00413 buff.write(struct.pack('<I%ss'%length, length, val1)) 00414 length = len(self.spatialRelation) 00415 buff.write(_struct_I.pack(length)) 00416 for val1 in self.spatialRelation: 00417 length = len(val1) 00418 buff.write(struct.pack('<I%ss'%length, length, val1)) 00419 length = len(self.spatialRelatedObject) 00420 buff.write(_struct_I.pack(length)) 00421 for val1 in self.spatialRelatedObject: 00422 length = len(val1) 00423 buff.write(struct.pack('<I%ss'%length, length, val1)) 00424 length = len(self.houseHoldId) 00425 buff.write(_struct_I.pack(length)) 00426 for val1 in self.houseHoldId: 00427 length = len(val1) 00428 buff.write(struct.pack('<I%ss'%length, length, val1)) 00429 length = len(self.objectsInfo) 00430 buff.write(_struct_I.pack(length)) 00431 for val1 in self.objectsInfo: 00432 _x = val1 00433 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h)) 00434 _v7 = val1.pose 00435 _v8 = _v7.position 00436 _x = _v8 00437 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00438 _v9 = _v7.orientation 00439 _x = _v9 00440 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00441 length = len(self.readableNames) 00442 buff.write(_struct_I.pack(length)) 00443 for val1 in self.readableNames: 00444 length = len(val1) 00445 buff.write(struct.pack('<I%ss'%length, length, val1)) 00446 except struct.error as se: self._check_types(se) 00447 except TypeError as te: self._check_types(te) 00448 00449 def deserialize_numpy(self, str, numpy): 00450 """ 00451 unpack serialized message in str into this message instance using numpy for array types 00452 @param str: byte array of serialized message 00453 @type str: str 00454 @param numpy: numpy python module 00455 @type numpy: module 00456 """ 00457 try: 00458 end = 0 00459 start = end 00460 end += 4 00461 (length,) = _struct_I.unpack(str[start:end]) 00462 self.objects = [] 00463 for i in range(0, length): 00464 start = end 00465 end += 4 00466 (length,) = _struct_I.unpack(str[start:end]) 00467 start = end 00468 end += length 00469 val1 = str[start:end] 00470 self.objects.append(val1) 00471 start = end 00472 end += 4 00473 (length,) = _struct_I.unpack(str[start:end]) 00474 self.classesOfObjects = [] 00475 for i in range(0, length): 00476 start = end 00477 end += 4 00478 (length,) = _struct_I.unpack(str[start:end]) 00479 start = end 00480 end += length 00481 val1 = str[start:end] 00482 self.classesOfObjects.append(val1) 00483 start = end 00484 end += 4 00485 (length,) = _struct_I.unpack(str[start:end]) 00486 self.spatialRelation = [] 00487 for i in range(0, length): 00488 start = end 00489 end += 4 00490 (length,) = _struct_I.unpack(str[start:end]) 00491 start = end 00492 end += length 00493 val1 = str[start:end] 00494 self.spatialRelation.append(val1) 00495 start = end 00496 end += 4 00497 (length,) = _struct_I.unpack(str[start:end]) 00498 self.spatialRelatedObject = [] 00499 for i in range(0, length): 00500 start = end 00501 end += 4 00502 (length,) = _struct_I.unpack(str[start:end]) 00503 start = end 00504 end += length 00505 val1 = str[start:end] 00506 self.spatialRelatedObject.append(val1) 00507 start = end 00508 end += 4 00509 (length,) = _struct_I.unpack(str[start:end]) 00510 self.houseHoldId = [] 00511 for i in range(0, length): 00512 start = end 00513 end += 4 00514 (length,) = _struct_I.unpack(str[start:end]) 00515 start = end 00516 end += length 00517 val1 = str[start:end] 00518 self.houseHoldId.append(val1) 00519 start = end 00520 end += 4 00521 (length,) = _struct_I.unpack(str[start:end]) 00522 self.objectsInfo = [] 00523 for i in range(0, length): 00524 val1 = srs_msgs.msg.SRSSpatialInfo() 00525 _x = val1 00526 start = end 00527 end += 12 00528 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end]) 00529 _v10 = val1.pose 00530 _v11 = _v10.position 00531 _x = _v11 00532 start = end 00533 end += 24 00534 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00535 _v12 = _v10.orientation 00536 _x = _v12 00537 start = end 00538 end += 32 00539 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00540 self.objectsInfo.append(val1) 00541 start = end 00542 end += 4 00543 (length,) = _struct_I.unpack(str[start:end]) 00544 self.readableNames = [] 00545 for i in range(0, length): 00546 start = end 00547 end += 4 00548 (length,) = _struct_I.unpack(str[start:end]) 00549 start = end 00550 end += length 00551 val1 = str[start:end] 00552 self.readableNames.append(val1) 00553 return self 00554 except struct.error as e: 00555 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00556 00557 _struct_I = roslib.message.struct_I 00558 _struct_4d = struct.Struct("<4d") 00559 _struct_3f = struct.Struct("<3f") 00560 _struct_3d = struct.Struct("<3d") 00561 class GetObjectsOnMap(roslib.message.ServiceDefinition): 00562 _type = 'srs_knowledge/GetObjectsOnMap' 00563 _md5sum = 'a442266aca457b72a33213aeb1dde87d' 00564 _request_class = GetObjectsOnMapRequest 00565 _response_class = GetObjectsOnMapResponse