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


srs_knowledge
Author(s): Ze Ji
autogenerated on Sun Jan 5 2014 12:03:26