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