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