_StartTrajectory.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openrave_msgs/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 trajectory_msgs.msg
00008 import openrave_msgs.msg
00009 import genpy
00010 import std_msgs.msg
00011 
00012 class StartTrajectoryRequest(genpy.Message):
00013   _md5sum = "e55409f0cdd0947dbefcb0c7119e035b"
00014   _type = "openrave_msgs/StartTrajectoryRequest"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """
00017 openrave_msgs/JointTrajectory traj
00018 uint8 hastiming
00019 uint8 requestresult
00020 
00021 
00022 ================================================================================
00023 MSG: openrave_msgs/JointTrajectory
00024 trajectory_msgs/JointTrajectory traj
00025 
00026 # retiming method to use for the trajectory points.
00027 string interpolation
00028 
00029 ================================================================================
00030 MSG: trajectory_msgs/JointTrajectory
00031 Header header
00032 string[] joint_names
00033 JointTrajectoryPoint[] points
00034 ================================================================================
00035 MSG: std_msgs/Header
00036 # Standard metadata for higher-level stamped data types.
00037 # This is generally used to communicate timestamped data 
00038 # in a particular coordinate frame.
00039 # 
00040 # sequence ID: consecutively increasing ID 
00041 uint32 seq
00042 #Two-integer timestamp that is expressed as:
00043 # * stamp.secs: seconds (stamp_secs) since epoch
00044 # * stamp.nsecs: nanoseconds since stamp_secs
00045 # time-handling sugar is provided by the client library
00046 time stamp
00047 #Frame this data is associated with
00048 # 0: no frame
00049 # 1: global frame
00050 string frame_id
00051 
00052 ================================================================================
00053 MSG: trajectory_msgs/JointTrajectoryPoint
00054 float64[] positions
00055 float64[] velocities
00056 float64[] accelerations
00057 duration time_from_start
00058 """
00059   __slots__ = ['traj','hastiming','requestresult']
00060   _slot_types = ['openrave_msgs/JointTrajectory','uint8','uint8']
00061 
00062   def __init__(self, *args, **kwds):
00063     """
00064     Constructor. Any message fields that are implicitly/explicitly
00065     set to None will be assigned a default value. The recommend
00066     use is keyword arguments as this is more robust to future message
00067     changes.  You cannot mix in-order arguments and keyword arguments.
00068 
00069     The available fields are:
00070        traj,hastiming,requestresult
00071 
00072     :param args: complete set of field values, in .msg order
00073     :param kwds: use keyword arguments corresponding to message field names
00074     to set specific fields.
00075     """
00076     if args or kwds:
00077       super(StartTrajectoryRequest, self).__init__(*args, **kwds)
00078       #message fields cannot be None, assign default values for those that are
00079       if self.traj is None:
00080         self.traj = openrave_msgs.msg.JointTrajectory()
00081       if self.hastiming is None:
00082         self.hastiming = 0
00083       if self.requestresult is None:
00084         self.requestresult = 0
00085     else:
00086       self.traj = openrave_msgs.msg.JointTrajectory()
00087       self.hastiming = 0
00088       self.requestresult = 0
00089 
00090   def _get_types(self):
00091     """
00092     internal API method
00093     """
00094     return self._slot_types
00095 
00096   def serialize(self, buff):
00097     """
00098     serialize message into buffer
00099     :param buff: buffer, ``StringIO``
00100     """
00101     try:
00102       _x = self
00103       buff.write(_struct_3I.pack(_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs))
00104       _x = self.traj.traj.header.frame_id
00105       length = len(_x)
00106       if python3 or type(_x) == unicode:
00107         _x = _x.encode('utf-8')
00108         length = len(_x)
00109       buff.write(struct.pack('<I%ss'%length, length, _x))
00110       length = len(self.traj.traj.joint_names)
00111       buff.write(_struct_I.pack(length))
00112       for val1 in self.traj.traj.joint_names:
00113         length = len(val1)
00114         if python3 or type(val1) == unicode:
00115           val1 = val1.encode('utf-8')
00116           length = len(val1)
00117         buff.write(struct.pack('<I%ss'%length, length, val1))
00118       length = len(self.traj.traj.points)
00119       buff.write(_struct_I.pack(length))
00120       for val1 in self.traj.traj.points:
00121         length = len(val1.positions)
00122         buff.write(_struct_I.pack(length))
00123         pattern = '<%sd'%length
00124         buff.write(struct.pack(pattern, *val1.positions))
00125         length = len(val1.velocities)
00126         buff.write(_struct_I.pack(length))
00127         pattern = '<%sd'%length
00128         buff.write(struct.pack(pattern, *val1.velocities))
00129         length = len(val1.accelerations)
00130         buff.write(_struct_I.pack(length))
00131         pattern = '<%sd'%length
00132         buff.write(struct.pack(pattern, *val1.accelerations))
00133         _v1 = val1.time_from_start
00134         _x = _v1
00135         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00136       _x = self.traj.interpolation
00137       length = len(_x)
00138       if python3 or type(_x) == unicode:
00139         _x = _x.encode('utf-8')
00140         length = len(_x)
00141       buff.write(struct.pack('<I%ss'%length, length, _x))
00142       _x = self
00143       buff.write(_struct_2B.pack(_x.hastiming, _x.requestresult))
00144     except struct.error as se: self._check_types(se)
00145     except TypeError as te: self._check_types(te)
00146 
00147   def deserialize(self, str):
00148     """
00149     unpack serialized message in str into this message instance
00150     :param str: byte array of serialized message, ``str``
00151     """
00152     try:
00153       if self.traj is None:
00154         self.traj = openrave_msgs.msg.JointTrajectory()
00155       end = 0
00156       _x = self
00157       start = end
00158       end += 12
00159       (_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00160       start = end
00161       end += 4
00162       (length,) = _struct_I.unpack(str[start:end])
00163       start = end
00164       end += length
00165       if python3:
00166         self.traj.traj.header.frame_id = str[start:end].decode('utf-8')
00167       else:
00168         self.traj.traj.header.frame_id = str[start:end]
00169       start = end
00170       end += 4
00171       (length,) = _struct_I.unpack(str[start:end])
00172       self.traj.traj.joint_names = []
00173       for i in range(0, length):
00174         start = end
00175         end += 4
00176         (length,) = _struct_I.unpack(str[start:end])
00177         start = end
00178         end += length
00179         if python3:
00180           val1 = str[start:end].decode('utf-8')
00181         else:
00182           val1 = str[start:end]
00183         self.traj.traj.joint_names.append(val1)
00184       start = end
00185       end += 4
00186       (length,) = _struct_I.unpack(str[start:end])
00187       self.traj.traj.points = []
00188       for i in range(0, length):
00189         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00190         start = end
00191         end += 4
00192         (length,) = _struct_I.unpack(str[start:end])
00193         pattern = '<%sd'%length
00194         start = end
00195         end += struct.calcsize(pattern)
00196         val1.positions = struct.unpack(pattern, str[start:end])
00197         start = end
00198         end += 4
00199         (length,) = _struct_I.unpack(str[start:end])
00200         pattern = '<%sd'%length
00201         start = end
00202         end += struct.calcsize(pattern)
00203         val1.velocities = struct.unpack(pattern, str[start:end])
00204         start = end
00205         end += 4
00206         (length,) = _struct_I.unpack(str[start:end])
00207         pattern = '<%sd'%length
00208         start = end
00209         end += struct.calcsize(pattern)
00210         val1.accelerations = struct.unpack(pattern, str[start:end])
00211         _v2 = val1.time_from_start
00212         _x = _v2
00213         start = end
00214         end += 8
00215         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00216         self.traj.traj.points.append(val1)
00217       start = end
00218       end += 4
00219       (length,) = _struct_I.unpack(str[start:end])
00220       start = end
00221       end += length
00222       if python3:
00223         self.traj.interpolation = str[start:end].decode('utf-8')
00224       else:
00225         self.traj.interpolation = str[start:end]
00226       _x = self
00227       start = end
00228       end += 2
00229       (_x.hastiming, _x.requestresult,) = _struct_2B.unpack(str[start:end])
00230       return self
00231     except struct.error as e:
00232       raise genpy.DeserializationError(e) #most likely buffer underfill
00233 
00234 
00235   def serialize_numpy(self, buff, numpy):
00236     """
00237     serialize message with numpy array types into buffer
00238     :param buff: buffer, ``StringIO``
00239     :param numpy: numpy python module
00240     """
00241     try:
00242       _x = self
00243       buff.write(_struct_3I.pack(_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs))
00244       _x = self.traj.traj.header.frame_id
00245       length = len(_x)
00246       if python3 or type(_x) == unicode:
00247         _x = _x.encode('utf-8')
00248         length = len(_x)
00249       buff.write(struct.pack('<I%ss'%length, length, _x))
00250       length = len(self.traj.traj.joint_names)
00251       buff.write(_struct_I.pack(length))
00252       for val1 in self.traj.traj.joint_names:
00253         length = len(val1)
00254         if python3 or type(val1) == unicode:
00255           val1 = val1.encode('utf-8')
00256           length = len(val1)
00257         buff.write(struct.pack('<I%ss'%length, length, val1))
00258       length = len(self.traj.traj.points)
00259       buff.write(_struct_I.pack(length))
00260       for val1 in self.traj.traj.points:
00261         length = len(val1.positions)
00262         buff.write(_struct_I.pack(length))
00263         pattern = '<%sd'%length
00264         buff.write(val1.positions.tostring())
00265         length = len(val1.velocities)
00266         buff.write(_struct_I.pack(length))
00267         pattern = '<%sd'%length
00268         buff.write(val1.velocities.tostring())
00269         length = len(val1.accelerations)
00270         buff.write(_struct_I.pack(length))
00271         pattern = '<%sd'%length
00272         buff.write(val1.accelerations.tostring())
00273         _v3 = val1.time_from_start
00274         _x = _v3
00275         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00276       _x = self.traj.interpolation
00277       length = len(_x)
00278       if python3 or type(_x) == unicode:
00279         _x = _x.encode('utf-8')
00280         length = len(_x)
00281       buff.write(struct.pack('<I%ss'%length, length, _x))
00282       _x = self
00283       buff.write(_struct_2B.pack(_x.hastiming, _x.requestresult))
00284     except struct.error as se: self._check_types(se)
00285     except TypeError as te: self._check_types(te)
00286 
00287   def deserialize_numpy(self, str, numpy):
00288     """
00289     unpack serialized message in str into this message instance using numpy for array types
00290     :param str: byte array of serialized message, ``str``
00291     :param numpy: numpy python module
00292     """
00293     try:
00294       if self.traj is None:
00295         self.traj = openrave_msgs.msg.JointTrajectory()
00296       end = 0
00297       _x = self
00298       start = end
00299       end += 12
00300       (_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00301       start = end
00302       end += 4
00303       (length,) = _struct_I.unpack(str[start:end])
00304       start = end
00305       end += length
00306       if python3:
00307         self.traj.traj.header.frame_id = str[start:end].decode('utf-8')
00308       else:
00309         self.traj.traj.header.frame_id = str[start:end]
00310       start = end
00311       end += 4
00312       (length,) = _struct_I.unpack(str[start:end])
00313       self.traj.traj.joint_names = []
00314       for i in range(0, length):
00315         start = end
00316         end += 4
00317         (length,) = _struct_I.unpack(str[start:end])
00318         start = end
00319         end += length
00320         if python3:
00321           val1 = str[start:end].decode('utf-8')
00322         else:
00323           val1 = str[start:end]
00324         self.traj.traj.joint_names.append(val1)
00325       start = end
00326       end += 4
00327       (length,) = _struct_I.unpack(str[start:end])
00328       self.traj.traj.points = []
00329       for i in range(0, length):
00330         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00331         start = end
00332         end += 4
00333         (length,) = _struct_I.unpack(str[start:end])
00334         pattern = '<%sd'%length
00335         start = end
00336         end += struct.calcsize(pattern)
00337         val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00338         start = end
00339         end += 4
00340         (length,) = _struct_I.unpack(str[start:end])
00341         pattern = '<%sd'%length
00342         start = end
00343         end += struct.calcsize(pattern)
00344         val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00345         start = end
00346         end += 4
00347         (length,) = _struct_I.unpack(str[start:end])
00348         pattern = '<%sd'%length
00349         start = end
00350         end += struct.calcsize(pattern)
00351         val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00352         _v4 = val1.time_from_start
00353         _x = _v4
00354         start = end
00355         end += 8
00356         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00357         self.traj.traj.points.append(val1)
00358       start = end
00359       end += 4
00360       (length,) = _struct_I.unpack(str[start:end])
00361       start = end
00362       end += length
00363       if python3:
00364         self.traj.interpolation = str[start:end].decode('utf-8')
00365       else:
00366         self.traj.interpolation = str[start:end]
00367       _x = self
00368       start = end
00369       end += 2
00370       (_x.hastiming, _x.requestresult,) = _struct_2B.unpack(str[start:end])
00371       return self
00372     except struct.error as e:
00373       raise genpy.DeserializationError(e) #most likely buffer underfill
00374 
00375 _struct_I = genpy.struct_I
00376 _struct_3I = struct.Struct("<3I")
00377 _struct_2i = struct.Struct("<2i")
00378 _struct_2B = struct.Struct("<2B")
00379 """autogenerated by genpy from openrave_msgs/StartTrajectoryResponse.msg. Do not edit."""
00380 import sys
00381 python3 = True if sys.hexversion > 0x03000000 else False
00382 import genpy
00383 import struct
00384 
00385 import trajectory_msgs.msg
00386 import openrave_msgs.msg
00387 import genpy
00388 import std_msgs.msg
00389 
00390 class StartTrajectoryResponse(genpy.Message):
00391   _md5sum = "bffe134fa190ecc28b9a992aa5186964"
00392   _type = "openrave_msgs/StartTrajectoryResponse"
00393   _has_header = False #flag to mark the presence of a Header object
00394   _full_text = """openrave_msgs/JointTrajectory traj
00395 time stamp
00396 uint32 commandid
00397 
00398 
00399 ================================================================================
00400 MSG: openrave_msgs/JointTrajectory
00401 trajectory_msgs/JointTrajectory traj
00402 
00403 # retiming method to use for the trajectory points.
00404 string interpolation
00405 
00406 ================================================================================
00407 MSG: trajectory_msgs/JointTrajectory
00408 Header header
00409 string[] joint_names
00410 JointTrajectoryPoint[] points
00411 ================================================================================
00412 MSG: std_msgs/Header
00413 # Standard metadata for higher-level stamped data types.
00414 # This is generally used to communicate timestamped data 
00415 # in a particular coordinate frame.
00416 # 
00417 # sequence ID: consecutively increasing ID 
00418 uint32 seq
00419 #Two-integer timestamp that is expressed as:
00420 # * stamp.secs: seconds (stamp_secs) since epoch
00421 # * stamp.nsecs: nanoseconds since stamp_secs
00422 # time-handling sugar is provided by the client library
00423 time stamp
00424 #Frame this data is associated with
00425 # 0: no frame
00426 # 1: global frame
00427 string frame_id
00428 
00429 ================================================================================
00430 MSG: trajectory_msgs/JointTrajectoryPoint
00431 float64[] positions
00432 float64[] velocities
00433 float64[] accelerations
00434 duration time_from_start
00435 """
00436   __slots__ = ['traj','stamp','commandid']
00437   _slot_types = ['openrave_msgs/JointTrajectory','time','uint32']
00438 
00439   def __init__(self, *args, **kwds):
00440     """
00441     Constructor. Any message fields that are implicitly/explicitly
00442     set to None will be assigned a default value. The recommend
00443     use is keyword arguments as this is more robust to future message
00444     changes.  You cannot mix in-order arguments and keyword arguments.
00445 
00446     The available fields are:
00447        traj,stamp,commandid
00448 
00449     :param args: complete set of field values, in .msg order
00450     :param kwds: use keyword arguments corresponding to message field names
00451     to set specific fields.
00452     """
00453     if args or kwds:
00454       super(StartTrajectoryResponse, self).__init__(*args, **kwds)
00455       #message fields cannot be None, assign default values for those that are
00456       if self.traj is None:
00457         self.traj = openrave_msgs.msg.JointTrajectory()
00458       if self.stamp is None:
00459         self.stamp = genpy.Time()
00460       if self.commandid is None:
00461         self.commandid = 0
00462     else:
00463       self.traj = openrave_msgs.msg.JointTrajectory()
00464       self.stamp = genpy.Time()
00465       self.commandid = 0
00466 
00467   def _get_types(self):
00468     """
00469     internal API method
00470     """
00471     return self._slot_types
00472 
00473   def serialize(self, buff):
00474     """
00475     serialize message into buffer
00476     :param buff: buffer, ``StringIO``
00477     """
00478     try:
00479       _x = self
00480       buff.write(_struct_3I.pack(_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs))
00481       _x = self.traj.traj.header.frame_id
00482       length = len(_x)
00483       if python3 or type(_x) == unicode:
00484         _x = _x.encode('utf-8')
00485         length = len(_x)
00486       buff.write(struct.pack('<I%ss'%length, length, _x))
00487       length = len(self.traj.traj.joint_names)
00488       buff.write(_struct_I.pack(length))
00489       for val1 in self.traj.traj.joint_names:
00490         length = len(val1)
00491         if python3 or type(val1) == unicode:
00492           val1 = val1.encode('utf-8')
00493           length = len(val1)
00494         buff.write(struct.pack('<I%ss'%length, length, val1))
00495       length = len(self.traj.traj.points)
00496       buff.write(_struct_I.pack(length))
00497       for val1 in self.traj.traj.points:
00498         length = len(val1.positions)
00499         buff.write(_struct_I.pack(length))
00500         pattern = '<%sd'%length
00501         buff.write(struct.pack(pattern, *val1.positions))
00502         length = len(val1.velocities)
00503         buff.write(_struct_I.pack(length))
00504         pattern = '<%sd'%length
00505         buff.write(struct.pack(pattern, *val1.velocities))
00506         length = len(val1.accelerations)
00507         buff.write(_struct_I.pack(length))
00508         pattern = '<%sd'%length
00509         buff.write(struct.pack(pattern, *val1.accelerations))
00510         _v5 = val1.time_from_start
00511         _x = _v5
00512         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00513       _x = self.traj.interpolation
00514       length = len(_x)
00515       if python3 or type(_x) == unicode:
00516         _x = _x.encode('utf-8')
00517         length = len(_x)
00518       buff.write(struct.pack('<I%ss'%length, length, _x))
00519       _x = self
00520       buff.write(_struct_3I.pack(_x.stamp.secs, _x.stamp.nsecs, _x.commandid))
00521     except struct.error as se: self._check_types(se)
00522     except TypeError as te: self._check_types(te)
00523 
00524   def deserialize(self, str):
00525     """
00526     unpack serialized message in str into this message instance
00527     :param str: byte array of serialized message, ``str``
00528     """
00529     try:
00530       if self.traj is None:
00531         self.traj = openrave_msgs.msg.JointTrajectory()
00532       if self.stamp is None:
00533         self.stamp = genpy.Time()
00534       end = 0
00535       _x = self
00536       start = end
00537       end += 12
00538       (_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00539       start = end
00540       end += 4
00541       (length,) = _struct_I.unpack(str[start:end])
00542       start = end
00543       end += length
00544       if python3:
00545         self.traj.traj.header.frame_id = str[start:end].decode('utf-8')
00546       else:
00547         self.traj.traj.header.frame_id = str[start:end]
00548       start = end
00549       end += 4
00550       (length,) = _struct_I.unpack(str[start:end])
00551       self.traj.traj.joint_names = []
00552       for i in range(0, length):
00553         start = end
00554         end += 4
00555         (length,) = _struct_I.unpack(str[start:end])
00556         start = end
00557         end += length
00558         if python3:
00559           val1 = str[start:end].decode('utf-8')
00560         else:
00561           val1 = str[start:end]
00562         self.traj.traj.joint_names.append(val1)
00563       start = end
00564       end += 4
00565       (length,) = _struct_I.unpack(str[start:end])
00566       self.traj.traj.points = []
00567       for i in range(0, length):
00568         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00569         start = end
00570         end += 4
00571         (length,) = _struct_I.unpack(str[start:end])
00572         pattern = '<%sd'%length
00573         start = end
00574         end += struct.calcsize(pattern)
00575         val1.positions = struct.unpack(pattern, str[start:end])
00576         start = end
00577         end += 4
00578         (length,) = _struct_I.unpack(str[start:end])
00579         pattern = '<%sd'%length
00580         start = end
00581         end += struct.calcsize(pattern)
00582         val1.velocities = struct.unpack(pattern, str[start:end])
00583         start = end
00584         end += 4
00585         (length,) = _struct_I.unpack(str[start:end])
00586         pattern = '<%sd'%length
00587         start = end
00588         end += struct.calcsize(pattern)
00589         val1.accelerations = struct.unpack(pattern, str[start:end])
00590         _v6 = val1.time_from_start
00591         _x = _v6
00592         start = end
00593         end += 8
00594         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00595         self.traj.traj.points.append(val1)
00596       start = end
00597       end += 4
00598       (length,) = _struct_I.unpack(str[start:end])
00599       start = end
00600       end += length
00601       if python3:
00602         self.traj.interpolation = str[start:end].decode('utf-8')
00603       else:
00604         self.traj.interpolation = str[start:end]
00605       _x = self
00606       start = end
00607       end += 12
00608       (_x.stamp.secs, _x.stamp.nsecs, _x.commandid,) = _struct_3I.unpack(str[start:end])
00609       self.stamp.canon()
00610       return self
00611     except struct.error as e:
00612       raise genpy.DeserializationError(e) #most likely buffer underfill
00613 
00614 
00615   def serialize_numpy(self, buff, numpy):
00616     """
00617     serialize message with numpy array types into buffer
00618     :param buff: buffer, ``StringIO``
00619     :param numpy: numpy python module
00620     """
00621     try:
00622       _x = self
00623       buff.write(_struct_3I.pack(_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs))
00624       _x = self.traj.traj.header.frame_id
00625       length = len(_x)
00626       if python3 or type(_x) == unicode:
00627         _x = _x.encode('utf-8')
00628         length = len(_x)
00629       buff.write(struct.pack('<I%ss'%length, length, _x))
00630       length = len(self.traj.traj.joint_names)
00631       buff.write(_struct_I.pack(length))
00632       for val1 in self.traj.traj.joint_names:
00633         length = len(val1)
00634         if python3 or type(val1) == unicode:
00635           val1 = val1.encode('utf-8')
00636           length = len(val1)
00637         buff.write(struct.pack('<I%ss'%length, length, val1))
00638       length = len(self.traj.traj.points)
00639       buff.write(_struct_I.pack(length))
00640       for val1 in self.traj.traj.points:
00641         length = len(val1.positions)
00642         buff.write(_struct_I.pack(length))
00643         pattern = '<%sd'%length
00644         buff.write(val1.positions.tostring())
00645         length = len(val1.velocities)
00646         buff.write(_struct_I.pack(length))
00647         pattern = '<%sd'%length
00648         buff.write(val1.velocities.tostring())
00649         length = len(val1.accelerations)
00650         buff.write(_struct_I.pack(length))
00651         pattern = '<%sd'%length
00652         buff.write(val1.accelerations.tostring())
00653         _v7 = val1.time_from_start
00654         _x = _v7
00655         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00656       _x = self.traj.interpolation
00657       length = len(_x)
00658       if python3 or type(_x) == unicode:
00659         _x = _x.encode('utf-8')
00660         length = len(_x)
00661       buff.write(struct.pack('<I%ss'%length, length, _x))
00662       _x = self
00663       buff.write(_struct_3I.pack(_x.stamp.secs, _x.stamp.nsecs, _x.commandid))
00664     except struct.error as se: self._check_types(se)
00665     except TypeError as te: self._check_types(te)
00666 
00667   def deserialize_numpy(self, str, numpy):
00668     """
00669     unpack serialized message in str into this message instance using numpy for array types
00670     :param str: byte array of serialized message, ``str``
00671     :param numpy: numpy python module
00672     """
00673     try:
00674       if self.traj is None:
00675         self.traj = openrave_msgs.msg.JointTrajectory()
00676       if self.stamp is None:
00677         self.stamp = genpy.Time()
00678       end = 0
00679       _x = self
00680       start = end
00681       end += 12
00682       (_x.traj.traj.header.seq, _x.traj.traj.header.stamp.secs, _x.traj.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00683       start = end
00684       end += 4
00685       (length,) = _struct_I.unpack(str[start:end])
00686       start = end
00687       end += length
00688       if python3:
00689         self.traj.traj.header.frame_id = str[start:end].decode('utf-8')
00690       else:
00691         self.traj.traj.header.frame_id = str[start:end]
00692       start = end
00693       end += 4
00694       (length,) = _struct_I.unpack(str[start:end])
00695       self.traj.traj.joint_names = []
00696       for i in range(0, length):
00697         start = end
00698         end += 4
00699         (length,) = _struct_I.unpack(str[start:end])
00700         start = end
00701         end += length
00702         if python3:
00703           val1 = str[start:end].decode('utf-8')
00704         else:
00705           val1 = str[start:end]
00706         self.traj.traj.joint_names.append(val1)
00707       start = end
00708       end += 4
00709       (length,) = _struct_I.unpack(str[start:end])
00710       self.traj.traj.points = []
00711       for i in range(0, length):
00712         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00713         start = end
00714         end += 4
00715         (length,) = _struct_I.unpack(str[start:end])
00716         pattern = '<%sd'%length
00717         start = end
00718         end += struct.calcsize(pattern)
00719         val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00720         start = end
00721         end += 4
00722         (length,) = _struct_I.unpack(str[start:end])
00723         pattern = '<%sd'%length
00724         start = end
00725         end += struct.calcsize(pattern)
00726         val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00727         start = end
00728         end += 4
00729         (length,) = _struct_I.unpack(str[start:end])
00730         pattern = '<%sd'%length
00731         start = end
00732         end += struct.calcsize(pattern)
00733         val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00734         _v8 = val1.time_from_start
00735         _x = _v8
00736         start = end
00737         end += 8
00738         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00739         self.traj.traj.points.append(val1)
00740       start = end
00741       end += 4
00742       (length,) = _struct_I.unpack(str[start:end])
00743       start = end
00744       end += length
00745       if python3:
00746         self.traj.interpolation = str[start:end].decode('utf-8')
00747       else:
00748         self.traj.interpolation = str[start:end]
00749       _x = self
00750       start = end
00751       end += 12
00752       (_x.stamp.secs, _x.stamp.nsecs, _x.commandid,) = _struct_3I.unpack(str[start:end])
00753       self.stamp.canon()
00754       return self
00755     except struct.error as e:
00756       raise genpy.DeserializationError(e) #most likely buffer underfill
00757 
00758 _struct_I = genpy.struct_I
00759 _struct_3I = struct.Struct("<3I")
00760 _struct_2i = struct.Struct("<2i")
00761 class StartTrajectory(object):
00762   _type          = 'openrave_msgs/StartTrajectory'
00763   _md5sum = '38ac612d3335ec30ad6d4d954b6b63a0'
00764   _request_class  = StartTrajectoryRequest
00765   _response_class = StartTrajectoryResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


openrave_msgs
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 14:07:55