_GetPredefinedPoses.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_knowledge/GetPredefinedPosesRequest.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 GetPredefinedPosesRequest(genpy.Message):
00009   _md5sum = "aa8aee7f6c8d5b8306117b46af679744"
00010   _type = "srs_knowledge/GetPredefinedPosesRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string map
00013 
00014 
00015 
00016 """
00017   __slots__ = ['map']
00018   _slot_types = ['string']
00019 
00020   def __init__(self, *args, **kwds):
00021     """
00022     Constructor. Any message fields that are implicitly/explicitly
00023     set to None will be assigned a default value. The recommend
00024     use is keyword arguments as this is more robust to future message
00025     changes.  You cannot mix in-order arguments and keyword arguments.
00026 
00027     The available fields are:
00028        map
00029 
00030     :param args: complete set of field values, in .msg order
00031     :param kwds: use keyword arguments corresponding to message field names
00032     to set specific fields.
00033     """
00034     if args or kwds:
00035       super(GetPredefinedPosesRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.map is None:
00038         self.map = ''
00039     else:
00040       self.map = ''
00041 
00042   def _get_types(self):
00043     """
00044     internal API method
00045     """
00046     return self._slot_types
00047 
00048   def serialize(self, buff):
00049     """
00050     serialize message into buffer
00051     :param buff: buffer, ``StringIO``
00052     """
00053     try:
00054       _x = self.map
00055       length = len(_x)
00056       if python3 or type(_x) == unicode:
00057         _x = _x.encode('utf-8')
00058         length = len(_x)
00059       buff.write(struct.pack('<I%ss'%length, length, _x))
00060     except struct.error as se: self._check_types(se)
00061     except TypeError as te: self._check_types(te)
00062 
00063   def deserialize(self, str):
00064     """
00065     unpack serialized message in str into this message instance
00066     :param str: byte array of serialized message, ``str``
00067     """
00068     try:
00069       end = 0
00070       start = end
00071       end += 4
00072       (length,) = _struct_I.unpack(str[start:end])
00073       start = end
00074       end += length
00075       if python3:
00076         self.map = str[start:end].decode('utf-8')
00077       else:
00078         self.map = str[start:end]
00079       return self
00080     except struct.error as e:
00081       raise genpy.DeserializationError(e) #most likely buffer underfill
00082 
00083 
00084   def serialize_numpy(self, buff, numpy):
00085     """
00086     serialize message with numpy array types into buffer
00087     :param buff: buffer, ``StringIO``
00088     :param numpy: numpy python module
00089     """
00090     try:
00091       _x = self.map
00092       length = len(_x)
00093       if python3 or type(_x) == unicode:
00094         _x = _x.encode('utf-8')
00095         length = len(_x)
00096       buff.write(struct.pack('<I%ss'%length, length, _x))
00097     except struct.error as se: self._check_types(se)
00098     except TypeError as te: self._check_types(te)
00099 
00100   def deserialize_numpy(self, str, numpy):
00101     """
00102     unpack serialized message in str into this message instance using numpy for array types
00103     :param str: byte array of serialized message, ``str``
00104     :param numpy: numpy python module
00105     """
00106     try:
00107       end = 0
00108       start = end
00109       end += 4
00110       (length,) = _struct_I.unpack(str[start:end])
00111       start = end
00112       end += length
00113       if python3:
00114         self.map = str[start:end].decode('utf-8')
00115       else:
00116         self.map = str[start:end]
00117       return self
00118     except struct.error as e:
00119       raise genpy.DeserializationError(e) #most likely buffer underfill
00120 
00121 _struct_I = genpy.struct_I
00122 """autogenerated by genpy from srs_knowledge/GetPredefinedPosesResponse.msg. Do not edit."""
00123 import sys
00124 python3 = True if sys.hexversion > 0x03000000 else False
00125 import genpy
00126 import struct
00127 
00128 import geometry_msgs.msg
00129 
00130 class GetPredefinedPosesResponse(genpy.Message):
00131   _md5sum = "fe5f3887ad646ed4d1ed0e21834b460b"
00132   _type = "srs_knowledge/GetPredefinedPosesResponse"
00133   _has_header = False #flag to mark the presence of a Header object
00134   _full_text = """
00135 
00136 string[] locations
00137 geometry_msgs/Pose2D[] poses
00138 string[] readableNames
00139 
00140 string[] json_properties
00141 
00142 ================================================================================
00143 MSG: geometry_msgs/Pose2D
00144 # This expresses a position and orientation on a 2D manifold.
00145 
00146 float64 x
00147 float64 y
00148 float64 theta
00149 """
00150   __slots__ = ['locations','poses','readableNames','json_properties']
00151   _slot_types = ['string[]','geometry_msgs/Pose2D[]','string[]','string[]']
00152 
00153   def __init__(self, *args, **kwds):
00154     """
00155     Constructor. Any message fields that are implicitly/explicitly
00156     set to None will be assigned a default value. The recommend
00157     use is keyword arguments as this is more robust to future message
00158     changes.  You cannot mix in-order arguments and keyword arguments.
00159 
00160     The available fields are:
00161        locations,poses,readableNames,json_properties
00162 
00163     :param args: complete set of field values, in .msg order
00164     :param kwds: use keyword arguments corresponding to message field names
00165     to set specific fields.
00166     """
00167     if args or kwds:
00168       super(GetPredefinedPosesResponse, self).__init__(*args, **kwds)
00169       #message fields cannot be None, assign default values for those that are
00170       if self.locations is None:
00171         self.locations = []
00172       if self.poses is None:
00173         self.poses = []
00174       if self.readableNames is None:
00175         self.readableNames = []
00176       if self.json_properties is None:
00177         self.json_properties = []
00178     else:
00179       self.locations = []
00180       self.poses = []
00181       self.readableNames = []
00182       self.json_properties = []
00183 
00184   def _get_types(self):
00185     """
00186     internal API method
00187     """
00188     return self._slot_types
00189 
00190   def serialize(self, buff):
00191     """
00192     serialize message into buffer
00193     :param buff: buffer, ``StringIO``
00194     """
00195     try:
00196       length = len(self.locations)
00197       buff.write(_struct_I.pack(length))
00198       for val1 in self.locations:
00199         length = len(val1)
00200         if python3 or type(val1) == unicode:
00201           val1 = val1.encode('utf-8')
00202           length = len(val1)
00203         buff.write(struct.pack('<I%ss'%length, length, val1))
00204       length = len(self.poses)
00205       buff.write(_struct_I.pack(length))
00206       for val1 in self.poses:
00207         _x = val1
00208         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00209       length = len(self.readableNames)
00210       buff.write(_struct_I.pack(length))
00211       for val1 in self.readableNames:
00212         length = len(val1)
00213         if python3 or type(val1) == unicode:
00214           val1 = val1.encode('utf-8')
00215           length = len(val1)
00216         buff.write(struct.pack('<I%ss'%length, length, val1))
00217       length = len(self.json_properties)
00218       buff.write(_struct_I.pack(length))
00219       for val1 in self.json_properties:
00220         length = len(val1)
00221         if python3 or type(val1) == unicode:
00222           val1 = val1.encode('utf-8')
00223           length = len(val1)
00224         buff.write(struct.pack('<I%ss'%length, length, val1))
00225     except struct.error as se: self._check_types(se)
00226     except TypeError as te: self._check_types(te)
00227 
00228   def deserialize(self, str):
00229     """
00230     unpack serialized message in str into this message instance
00231     :param str: byte array of serialized message, ``str``
00232     """
00233     try:
00234       if self.poses is None:
00235         self.poses = None
00236       end = 0
00237       start = end
00238       end += 4
00239       (length,) = _struct_I.unpack(str[start:end])
00240       self.locations = []
00241       for i in range(0, length):
00242         start = end
00243         end += 4
00244         (length,) = _struct_I.unpack(str[start:end])
00245         start = end
00246         end += length
00247         if python3:
00248           val1 = str[start:end].decode('utf-8')
00249         else:
00250           val1 = str[start:end]
00251         self.locations.append(val1)
00252       start = end
00253       end += 4
00254       (length,) = _struct_I.unpack(str[start:end])
00255       self.poses = []
00256       for i in range(0, length):
00257         val1 = geometry_msgs.msg.Pose2D()
00258         _x = val1
00259         start = end
00260         end += 24
00261         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00262         self.poses.append(val1)
00263       start = end
00264       end += 4
00265       (length,) = _struct_I.unpack(str[start:end])
00266       self.readableNames = []
00267       for i in range(0, length):
00268         start = end
00269         end += 4
00270         (length,) = _struct_I.unpack(str[start:end])
00271         start = end
00272         end += length
00273         if python3:
00274           val1 = str[start:end].decode('utf-8')
00275         else:
00276           val1 = str[start:end]
00277         self.readableNames.append(val1)
00278       start = end
00279       end += 4
00280       (length,) = _struct_I.unpack(str[start:end])
00281       self.json_properties = []
00282       for i in range(0, length):
00283         start = end
00284         end += 4
00285         (length,) = _struct_I.unpack(str[start:end])
00286         start = end
00287         end += length
00288         if python3:
00289           val1 = str[start:end].decode('utf-8')
00290         else:
00291           val1 = str[start:end]
00292         self.json_properties.append(val1)
00293       return self
00294     except struct.error as e:
00295       raise genpy.DeserializationError(e) #most likely buffer underfill
00296 
00297 
00298   def serialize_numpy(self, buff, numpy):
00299     """
00300     serialize message with numpy array types into buffer
00301     :param buff: buffer, ``StringIO``
00302     :param numpy: numpy python module
00303     """
00304     try:
00305       length = len(self.locations)
00306       buff.write(_struct_I.pack(length))
00307       for val1 in self.locations:
00308         length = len(val1)
00309         if python3 or type(val1) == unicode:
00310           val1 = val1.encode('utf-8')
00311           length = len(val1)
00312         buff.write(struct.pack('<I%ss'%length, length, val1))
00313       length = len(self.poses)
00314       buff.write(_struct_I.pack(length))
00315       for val1 in self.poses:
00316         _x = val1
00317         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00318       length = len(self.readableNames)
00319       buff.write(_struct_I.pack(length))
00320       for val1 in self.readableNames:
00321         length = len(val1)
00322         if python3 or type(val1) == unicode:
00323           val1 = val1.encode('utf-8')
00324           length = len(val1)
00325         buff.write(struct.pack('<I%ss'%length, length, val1))
00326       length = len(self.json_properties)
00327       buff.write(_struct_I.pack(length))
00328       for val1 in self.json_properties:
00329         length = len(val1)
00330         if python3 or type(val1) == unicode:
00331           val1 = val1.encode('utf-8')
00332           length = len(val1)
00333         buff.write(struct.pack('<I%ss'%length, length, val1))
00334     except struct.error as se: self._check_types(se)
00335     except TypeError as te: self._check_types(te)
00336 
00337   def deserialize_numpy(self, str, numpy):
00338     """
00339     unpack serialized message in str into this message instance using numpy for array types
00340     :param str: byte array of serialized message, ``str``
00341     :param numpy: numpy python module
00342     """
00343     try:
00344       if self.poses is None:
00345         self.poses = None
00346       end = 0
00347       start = end
00348       end += 4
00349       (length,) = _struct_I.unpack(str[start:end])
00350       self.locations = []
00351       for i in range(0, length):
00352         start = end
00353         end += 4
00354         (length,) = _struct_I.unpack(str[start:end])
00355         start = end
00356         end += length
00357         if python3:
00358           val1 = str[start:end].decode('utf-8')
00359         else:
00360           val1 = str[start:end]
00361         self.locations.append(val1)
00362       start = end
00363       end += 4
00364       (length,) = _struct_I.unpack(str[start:end])
00365       self.poses = []
00366       for i in range(0, length):
00367         val1 = geometry_msgs.msg.Pose2D()
00368         _x = val1
00369         start = end
00370         end += 24
00371         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00372         self.poses.append(val1)
00373       start = end
00374       end += 4
00375       (length,) = _struct_I.unpack(str[start:end])
00376       self.readableNames = []
00377       for i in range(0, length):
00378         start = end
00379         end += 4
00380         (length,) = _struct_I.unpack(str[start:end])
00381         start = end
00382         end += length
00383         if python3:
00384           val1 = str[start:end].decode('utf-8')
00385         else:
00386           val1 = str[start:end]
00387         self.readableNames.append(val1)
00388       start = end
00389       end += 4
00390       (length,) = _struct_I.unpack(str[start:end])
00391       self.json_properties = []
00392       for i in range(0, length):
00393         start = end
00394         end += 4
00395         (length,) = _struct_I.unpack(str[start:end])
00396         start = end
00397         end += length
00398         if python3:
00399           val1 = str[start:end].decode('utf-8')
00400         else:
00401           val1 = str[start:end]
00402         self.json_properties.append(val1)
00403       return self
00404     except struct.error as e:
00405       raise genpy.DeserializationError(e) #most likely buffer underfill
00406 
00407 _struct_I = genpy.struct_I
00408 _struct_3d = struct.Struct("<3d")
00409 class GetPredefinedPoses(object):
00410   _type          = 'srs_knowledge/GetPredefinedPoses'
00411   _md5sum = '3191b85c3a25ca96f7c14907417f01f1'
00412   _request_class  = GetPredefinedPosesRequest
00413   _response_class = GetPredefinedPosesResponse


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