$search
00001 """autogenerated by genmsg_py from GetRoomsOnMapRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetRoomsOnMapRequest(roslib.message.Message): 00007 _md5sum = "a14354db805feb47c061b3cb1b443b04" 00008 _type = "srs_knowledge/GetRoomsOnMapRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 00013 string map 00014 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(GetRoomsOnMapRequest, self).__init__(*args, **kwds) 00041 #message fields cannot be None, assign default values for those that are 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 00060 @type buff: StringIO 00061 """ 00062 try: 00063 _x = self.map 00064 length = len(_x) 00065 buff.write(struct.pack('<I%ss'%length, length, _x)) 00066 buff.write(_struct_B.pack(self.ifGeometryInfo)) 00067 except struct.error as se: self._check_types(se) 00068 except TypeError as te: self._check_types(te) 00069 00070 def deserialize(self, str): 00071 """ 00072 unpack serialized message in str into this message instance 00073 @param str: byte array of serialized message 00074 @type str: str 00075 """ 00076 try: 00077 end = 0 00078 start = end 00079 end += 4 00080 (length,) = _struct_I.unpack(str[start:end]) 00081 start = end 00082 end += length 00083 self.map = str[start:end] 00084 start = end 00085 end += 1 00086 (self.ifGeometryInfo,) = _struct_B.unpack(str[start:end]) 00087 self.ifGeometryInfo = bool(self.ifGeometryInfo) 00088 return self 00089 except struct.error as e: 00090 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00091 00092 00093 def serialize_numpy(self, buff, numpy): 00094 """ 00095 serialize message with numpy array types into buffer 00096 @param buff: buffer 00097 @type buff: StringIO 00098 @param numpy: numpy python module 00099 @type numpy module 00100 """ 00101 try: 00102 _x = self.map 00103 length = len(_x) 00104 buff.write(struct.pack('<I%ss'%length, length, _x)) 00105 buff.write(_struct_B.pack(self.ifGeometryInfo)) 00106 except struct.error as se: self._check_types(se) 00107 except TypeError as te: self._check_types(te) 00108 00109 def deserialize_numpy(self, str, numpy): 00110 """ 00111 unpack serialized message in str into this message instance using numpy for array types 00112 @param str: byte array of serialized message 00113 @type str: str 00114 @param numpy: numpy python module 00115 @type numpy: module 00116 """ 00117 try: 00118 end = 0 00119 start = end 00120 end += 4 00121 (length,) = _struct_I.unpack(str[start:end]) 00122 start = end 00123 end += length 00124 self.map = str[start:end] 00125 start = end 00126 end += 1 00127 (self.ifGeometryInfo,) = _struct_B.unpack(str[start:end]) 00128 self.ifGeometryInfo = bool(self.ifGeometryInfo) 00129 return self 00130 except struct.error as e: 00131 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00132 00133 _struct_I = roslib.message.struct_I 00134 _struct_B = struct.Struct("<B") 00135 """autogenerated by genmsg_py from GetRoomsOnMapResponse.msg. Do not edit.""" 00136 import roslib.message 00137 import struct 00138 00139 import geometry_msgs.msg 00140 import srs_msgs.msg 00141 00142 class GetRoomsOnMapResponse(roslib.message.Message): 00143 _md5sum = "45c770a53af63ba1069ed7c531fceb81" 00144 _type = "srs_knowledge/GetRoomsOnMapResponse" 00145 _has_header = False #flag to mark the presence of a Header object 00146 _full_text = """ 00147 00148 string[] rooms 00149 srs_msgs/SRSSpatialInfo[] roomsInfo 00150 string[] readableNames 00151 00152 string[] json_properties 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__ = ['rooms','roomsInfo','readableNames','json_properties'] 00188 _slot_types = ['string[]','srs_msgs/SRSSpatialInfo[]','string[]','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 rooms,roomsInfo,readableNames,json_properties 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(GetRoomsOnMapResponse, self).__init__(*args, **kwds) 00206 #message fields cannot be None, assign default values for those that are 00207 if self.rooms is None: 00208 self.rooms = [] 00209 if self.roomsInfo is None: 00210 self.roomsInfo = [] 00211 if self.readableNames is None: 00212 self.readableNames = [] 00213 if self.json_properties is None: 00214 self.json_properties = [] 00215 else: 00216 self.rooms = [] 00217 self.roomsInfo = [] 00218 self.readableNames = [] 00219 self.json_properties = [] 00220 00221 def _get_types(self): 00222 """ 00223 internal API method 00224 """ 00225 return self._slot_types 00226 00227 def serialize(self, buff): 00228 """ 00229 serialize message into buffer 00230 @param buff: buffer 00231 @type buff: StringIO 00232 """ 00233 try: 00234 length = len(self.rooms) 00235 buff.write(_struct_I.pack(length)) 00236 for val1 in self.rooms: 00237 length = len(val1) 00238 buff.write(struct.pack('<I%ss'%length, length, val1)) 00239 length = len(self.roomsInfo) 00240 buff.write(_struct_I.pack(length)) 00241 for val1 in self.roomsInfo: 00242 _x = val1 00243 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h)) 00244 _v1 = val1.pose 00245 _v2 = _v1.position 00246 _x = _v2 00247 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00248 _v3 = _v1.orientation 00249 _x = _v3 00250 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00251 length = len(self.readableNames) 00252 buff.write(_struct_I.pack(length)) 00253 for val1 in self.readableNames: 00254 length = len(val1) 00255 buff.write(struct.pack('<I%ss'%length, length, val1)) 00256 length = len(self.json_properties) 00257 buff.write(_struct_I.pack(length)) 00258 for val1 in self.json_properties: 00259 length = len(val1) 00260 buff.write(struct.pack('<I%ss'%length, length, val1)) 00261 except struct.error as se: self._check_types(se) 00262 except TypeError as te: self._check_types(te) 00263 00264 def deserialize(self, str): 00265 """ 00266 unpack serialized message in str into this message instance 00267 @param str: byte array of serialized message 00268 @type str: str 00269 """ 00270 try: 00271 end = 0 00272 start = end 00273 end += 4 00274 (length,) = _struct_I.unpack(str[start:end]) 00275 self.rooms = [] 00276 for i in range(0, length): 00277 start = end 00278 end += 4 00279 (length,) = _struct_I.unpack(str[start:end]) 00280 start = end 00281 end += length 00282 val1 = str[start:end] 00283 self.rooms.append(val1) 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 self.roomsInfo = [] 00288 for i in range(0, length): 00289 val1 = srs_msgs.msg.SRSSpatialInfo() 00290 _x = val1 00291 start = end 00292 end += 12 00293 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end]) 00294 _v4 = val1.pose 00295 _v5 = _v4.position 00296 _x = _v5 00297 start = end 00298 end += 24 00299 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00300 _v6 = _v4.orientation 00301 _x = _v6 00302 start = end 00303 end += 32 00304 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00305 self.roomsInfo.append(val1) 00306 start = end 00307 end += 4 00308 (length,) = _struct_I.unpack(str[start:end]) 00309 self.readableNames = [] 00310 for i in range(0, length): 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 start = end 00315 end += length 00316 val1 = str[start:end] 00317 self.readableNames.append(val1) 00318 start = end 00319 end += 4 00320 (length,) = _struct_I.unpack(str[start:end]) 00321 self.json_properties = [] 00322 for i in range(0, length): 00323 start = end 00324 end += 4 00325 (length,) = _struct_I.unpack(str[start:end]) 00326 start = end 00327 end += length 00328 val1 = str[start:end] 00329 self.json_properties.append(val1) 00330 return self 00331 except struct.error as e: 00332 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00333 00334 00335 def serialize_numpy(self, buff, numpy): 00336 """ 00337 serialize message with numpy array types into buffer 00338 @param buff: buffer 00339 @type buff: StringIO 00340 @param numpy: numpy python module 00341 @type numpy module 00342 """ 00343 try: 00344 length = len(self.rooms) 00345 buff.write(_struct_I.pack(length)) 00346 for val1 in self.rooms: 00347 length = len(val1) 00348 buff.write(struct.pack('<I%ss'%length, length, val1)) 00349 length = len(self.roomsInfo) 00350 buff.write(_struct_I.pack(length)) 00351 for val1 in self.roomsInfo: 00352 _x = val1 00353 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h)) 00354 _v7 = val1.pose 00355 _v8 = _v7.position 00356 _x = _v8 00357 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00358 _v9 = _v7.orientation 00359 _x = _v9 00360 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00361 length = len(self.readableNames) 00362 buff.write(_struct_I.pack(length)) 00363 for val1 in self.readableNames: 00364 length = len(val1) 00365 buff.write(struct.pack('<I%ss'%length, length, val1)) 00366 length = len(self.json_properties) 00367 buff.write(_struct_I.pack(length)) 00368 for val1 in self.json_properties: 00369 length = len(val1) 00370 buff.write(struct.pack('<I%ss'%length, length, val1)) 00371 except struct.error as se: self._check_types(se) 00372 except TypeError as te: self._check_types(te) 00373 00374 def deserialize_numpy(self, str, numpy): 00375 """ 00376 unpack serialized message in str into this message instance using numpy for array types 00377 @param str: byte array of serialized message 00378 @type str: str 00379 @param numpy: numpy python module 00380 @type numpy: module 00381 """ 00382 try: 00383 end = 0 00384 start = end 00385 end += 4 00386 (length,) = _struct_I.unpack(str[start:end]) 00387 self.rooms = [] 00388 for i in range(0, length): 00389 start = end 00390 end += 4 00391 (length,) = _struct_I.unpack(str[start:end]) 00392 start = end 00393 end += length 00394 val1 = str[start:end] 00395 self.rooms.append(val1) 00396 start = end 00397 end += 4 00398 (length,) = _struct_I.unpack(str[start:end]) 00399 self.roomsInfo = [] 00400 for i in range(0, length): 00401 val1 = srs_msgs.msg.SRSSpatialInfo() 00402 _x = val1 00403 start = end 00404 end += 12 00405 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end]) 00406 _v10 = val1.pose 00407 _v11 = _v10.position 00408 _x = _v11 00409 start = end 00410 end += 24 00411 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00412 _v12 = _v10.orientation 00413 _x = _v12 00414 start = end 00415 end += 32 00416 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00417 self.roomsInfo.append(val1) 00418 start = end 00419 end += 4 00420 (length,) = _struct_I.unpack(str[start:end]) 00421 self.readableNames = [] 00422 for i in range(0, length): 00423 start = end 00424 end += 4 00425 (length,) = _struct_I.unpack(str[start:end]) 00426 start = end 00427 end += length 00428 val1 = str[start:end] 00429 self.readableNames.append(val1) 00430 start = end 00431 end += 4 00432 (length,) = _struct_I.unpack(str[start:end]) 00433 self.json_properties = [] 00434 for i in range(0, length): 00435 start = end 00436 end += 4 00437 (length,) = _struct_I.unpack(str[start:end]) 00438 start = end 00439 end += length 00440 val1 = str[start:end] 00441 self.json_properties.append(val1) 00442 return self 00443 except struct.error as e: 00444 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00445 00446 _struct_I = roslib.message.struct_I 00447 _struct_4d = struct.Struct("<4d") 00448 _struct_3f = struct.Struct("<3f") 00449 _struct_3d = struct.Struct("<3d") 00450 class GetRoomsOnMap(roslib.message.ServiceDefinition): 00451 _type = 'srs_knowledge/GetRoomsOnMap' 00452 _md5sum = '45b586c6f430ebabc7c413ffcc25c785' 00453 _request_class = GetRoomsOnMapRequest 00454 _response_class = GetRoomsOnMapResponse