_planner_plan.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/planner_planRequest.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 planner_planRequest(genpy.Message):
00009   _md5sum = "d0279c5c4bd73513d942852023693170"
00010   _type = "openraveros/planner_planRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 uint32 plannerid
00015 
00016 """
00017   __slots__ = ['plannerid']
00018   _slot_types = ['uint32']
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        plannerid
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(planner_planRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.plannerid is None:
00038         self.plannerid = 0
00039     else:
00040       self.plannerid = 0
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       buff.write(_struct_I.pack(self.plannerid))
00055     except struct.error as se: self._check_types(se)
00056     except TypeError as te: self._check_types(te)
00057 
00058   def deserialize(self, str):
00059     """
00060     unpack serialized message in str into this message instance
00061     :param str: byte array of serialized message, ``str``
00062     """
00063     try:
00064       end = 0
00065       start = end
00066       end += 4
00067       (self.plannerid,) = _struct_I.unpack(str[start:end])
00068       return self
00069     except struct.error as e:
00070       raise genpy.DeserializationError(e) #most likely buffer underfill
00071 
00072 
00073   def serialize_numpy(self, buff, numpy):
00074     """
00075     serialize message with numpy array types into buffer
00076     :param buff: buffer, ``StringIO``
00077     :param numpy: numpy python module
00078     """
00079     try:
00080       buff.write(_struct_I.pack(self.plannerid))
00081     except struct.error as se: self._check_types(se)
00082     except TypeError as te: self._check_types(te)
00083 
00084   def deserialize_numpy(self, str, numpy):
00085     """
00086     unpack serialized message in str into this message instance using numpy for array types
00087     :param str: byte array of serialized message, ``str``
00088     :param numpy: numpy python module
00089     """
00090     try:
00091       end = 0
00092       start = end
00093       end += 4
00094       (self.plannerid,) = _struct_I.unpack(str[start:end])
00095       return self
00096     except struct.error as e:
00097       raise genpy.DeserializationError(e) #most likely buffer underfill
00098 
00099 _struct_I = genpy.struct_I
00100 """autogenerated by genpy from openraveros/planner_planResponse.msg. Do not edit."""
00101 import sys
00102 python3 = True if sys.hexversion > 0x03000000 else False
00103 import genpy
00104 import struct
00105 
00106 import openraveros.msg
00107 
00108 class planner_planResponse(genpy.Message):
00109   _md5sum = "1ef5f24e2b6810cbabae36db36fbf59b"
00110   _type = "openraveros/planner_planResponse"
00111   _has_header = False #flag to mark the presence of a Header object
00112   _full_text = """Trajectory trajectory
00113 
00114 
00115 ================================================================================
00116 MSG: openraveros/Trajectory
00117 ConfigurationSpecification spec
00118 float64[] points
00119 string xmlid
00120 
00121 ================================================================================
00122 MSG: openraveros/ConfigurationSpecification
00123 ConfigurationSpecificationGroup[] groups
00124 
00125 ================================================================================
00126 MSG: openraveros/ConfigurationSpecificationGroup
00127 int32 offset
00128 int32 dof
00129 string name
00130 string interpolation
00131 
00132 """
00133   __slots__ = ['trajectory']
00134   _slot_types = ['openraveros/Trajectory']
00135 
00136   def __init__(self, *args, **kwds):
00137     """
00138     Constructor. Any message fields that are implicitly/explicitly
00139     set to None will be assigned a default value. The recommend
00140     use is keyword arguments as this is more robust to future message
00141     changes.  You cannot mix in-order arguments and keyword arguments.
00142 
00143     The available fields are:
00144        trajectory
00145 
00146     :param args: complete set of field values, in .msg order
00147     :param kwds: use keyword arguments corresponding to message field names
00148     to set specific fields.
00149     """
00150     if args or kwds:
00151       super(planner_planResponse, self).__init__(*args, **kwds)
00152       #message fields cannot be None, assign default values for those that are
00153       if self.trajectory is None:
00154         self.trajectory = openraveros.msg.Trajectory()
00155     else:
00156       self.trajectory = openraveros.msg.Trajectory()
00157 
00158   def _get_types(self):
00159     """
00160     internal API method
00161     """
00162     return self._slot_types
00163 
00164   def serialize(self, buff):
00165     """
00166     serialize message into buffer
00167     :param buff: buffer, ``StringIO``
00168     """
00169     try:
00170       length = len(self.trajectory.spec.groups)
00171       buff.write(_struct_I.pack(length))
00172       for val1 in self.trajectory.spec.groups:
00173         _x = val1
00174         buff.write(_struct_2i.pack(_x.offset, _x.dof))
00175         _x = val1.name
00176         length = len(_x)
00177         if python3 or type(_x) == unicode:
00178           _x = _x.encode('utf-8')
00179           length = len(_x)
00180         buff.write(struct.pack('<I%ss'%length, length, _x))
00181         _x = val1.interpolation
00182         length = len(_x)
00183         if python3 or type(_x) == unicode:
00184           _x = _x.encode('utf-8')
00185           length = len(_x)
00186         buff.write(struct.pack('<I%ss'%length, length, _x))
00187       length = len(self.trajectory.points)
00188       buff.write(_struct_I.pack(length))
00189       pattern = '<%sd'%length
00190       buff.write(struct.pack(pattern, *self.trajectory.points))
00191       _x = self.trajectory.xmlid
00192       length = len(_x)
00193       if python3 or type(_x) == unicode:
00194         _x = _x.encode('utf-8')
00195         length = len(_x)
00196       buff.write(struct.pack('<I%ss'%length, length, _x))
00197     except struct.error as se: self._check_types(se)
00198     except TypeError as te: self._check_types(te)
00199 
00200   def deserialize(self, str):
00201     """
00202     unpack serialized message in str into this message instance
00203     :param str: byte array of serialized message, ``str``
00204     """
00205     try:
00206       if self.trajectory is None:
00207         self.trajectory = openraveros.msg.Trajectory()
00208       end = 0
00209       start = end
00210       end += 4
00211       (length,) = _struct_I.unpack(str[start:end])
00212       self.trajectory.spec.groups = []
00213       for i in range(0, length):
00214         val1 = openraveros.msg.ConfigurationSpecificationGroup()
00215         _x = val1
00216         start = end
00217         end += 8
00218         (_x.offset, _x.dof,) = _struct_2i.unpack(str[start:end])
00219         start = end
00220         end += 4
00221         (length,) = _struct_I.unpack(str[start:end])
00222         start = end
00223         end += length
00224         if python3:
00225           val1.name = str[start:end].decode('utf-8')
00226         else:
00227           val1.name = str[start:end]
00228         start = end
00229         end += 4
00230         (length,) = _struct_I.unpack(str[start:end])
00231         start = end
00232         end += length
00233         if python3:
00234           val1.interpolation = str[start:end].decode('utf-8')
00235         else:
00236           val1.interpolation = str[start:end]
00237         self.trajectory.spec.groups.append(val1)
00238       start = end
00239       end += 4
00240       (length,) = _struct_I.unpack(str[start:end])
00241       pattern = '<%sd'%length
00242       start = end
00243       end += struct.calcsize(pattern)
00244       self.trajectory.points = struct.unpack(pattern, str[start:end])
00245       start = end
00246       end += 4
00247       (length,) = _struct_I.unpack(str[start:end])
00248       start = end
00249       end += length
00250       if python3:
00251         self.trajectory.xmlid = str[start:end].decode('utf-8')
00252       else:
00253         self.trajectory.xmlid = str[start:end]
00254       return self
00255     except struct.error as e:
00256       raise genpy.DeserializationError(e) #most likely buffer underfill
00257 
00258 
00259   def serialize_numpy(self, buff, numpy):
00260     """
00261     serialize message with numpy array types into buffer
00262     :param buff: buffer, ``StringIO``
00263     :param numpy: numpy python module
00264     """
00265     try:
00266       length = len(self.trajectory.spec.groups)
00267       buff.write(_struct_I.pack(length))
00268       for val1 in self.trajectory.spec.groups:
00269         _x = val1
00270         buff.write(_struct_2i.pack(_x.offset, _x.dof))
00271         _x = val1.name
00272         length = len(_x)
00273         if python3 or type(_x) == unicode:
00274           _x = _x.encode('utf-8')
00275           length = len(_x)
00276         buff.write(struct.pack('<I%ss'%length, length, _x))
00277         _x = val1.interpolation
00278         length = len(_x)
00279         if python3 or type(_x) == unicode:
00280           _x = _x.encode('utf-8')
00281           length = len(_x)
00282         buff.write(struct.pack('<I%ss'%length, length, _x))
00283       length = len(self.trajectory.points)
00284       buff.write(_struct_I.pack(length))
00285       pattern = '<%sd'%length
00286       buff.write(self.trajectory.points.tostring())
00287       _x = self.trajectory.xmlid
00288       length = len(_x)
00289       if python3 or type(_x) == unicode:
00290         _x = _x.encode('utf-8')
00291         length = len(_x)
00292       buff.write(struct.pack('<I%ss'%length, length, _x))
00293     except struct.error as se: self._check_types(se)
00294     except TypeError as te: self._check_types(te)
00295 
00296   def deserialize_numpy(self, str, numpy):
00297     """
00298     unpack serialized message in str into this message instance using numpy for array types
00299     :param str: byte array of serialized message, ``str``
00300     :param numpy: numpy python module
00301     """
00302     try:
00303       if self.trajectory is None:
00304         self.trajectory = openraveros.msg.Trajectory()
00305       end = 0
00306       start = end
00307       end += 4
00308       (length,) = _struct_I.unpack(str[start:end])
00309       self.trajectory.spec.groups = []
00310       for i in range(0, length):
00311         val1 = openraveros.msg.ConfigurationSpecificationGroup()
00312         _x = val1
00313         start = end
00314         end += 8
00315         (_x.offset, _x.dof,) = _struct_2i.unpack(str[start:end])
00316         start = end
00317         end += 4
00318         (length,) = _struct_I.unpack(str[start:end])
00319         start = end
00320         end += length
00321         if python3:
00322           val1.name = str[start:end].decode('utf-8')
00323         else:
00324           val1.name = str[start:end]
00325         start = end
00326         end += 4
00327         (length,) = _struct_I.unpack(str[start:end])
00328         start = end
00329         end += length
00330         if python3:
00331           val1.interpolation = str[start:end].decode('utf-8')
00332         else:
00333           val1.interpolation = str[start:end]
00334         self.trajectory.spec.groups.append(val1)
00335       start = end
00336       end += 4
00337       (length,) = _struct_I.unpack(str[start:end])
00338       pattern = '<%sd'%length
00339       start = end
00340       end += struct.calcsize(pattern)
00341       self.trajectory.points = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00342       start = end
00343       end += 4
00344       (length,) = _struct_I.unpack(str[start:end])
00345       start = end
00346       end += length
00347       if python3:
00348         self.trajectory.xmlid = str[start:end].decode('utf-8')
00349       else:
00350         self.trajectory.xmlid = str[start:end]
00351       return self
00352     except struct.error as e:
00353       raise genpy.DeserializationError(e) #most likely buffer underfill
00354 
00355 _struct_I = genpy.struct_I
00356 _struct_2i = struct.Struct("<2i")
00357 class planner_plan(object):
00358   _type          = 'openraveros/planner_plan'
00359   _md5sum = 'bf3b7a9df944a87827286957c98c429f'
00360   _request_class  = planner_planRequest
00361   _response_class = planner_planResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


openraveros
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 22:15:39