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