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