_CartImpTrajectory.py
Go to the documentation of this file.
00001 """autogenerated by genpy from lwr_impedance_controller/CartImpTrajectory.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 lwr_impedance_controller.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import std_msgs.msg
00011 
00012 class CartImpTrajectory(genpy.Message):
00013   _md5sum = "d16d5667e567d51697c8ecf375bc347b"
00014   _type = "lwr_impedance_controller/CartImpTrajectory"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """Header header
00017 geometry_msgs/Pose force_tool
00018 lwr_impedance_controller/CartImpTrajectoryPoint[] trajectory
00019 
00020 ================================================================================
00021 MSG: std_msgs/Header
00022 # Standard metadata for higher-level stamped data types.
00023 # This is generally used to communicate timestamped data 
00024 # in a particular coordinate frame.
00025 # 
00026 # sequence ID: consecutively increasing ID 
00027 uint32 seq
00028 #Two-integer timestamp that is expressed as:
00029 # * stamp.secs: seconds (stamp_secs) since epoch
00030 # * stamp.nsecs: nanoseconds since stamp_secs
00031 # time-handling sugar is provided by the client library
00032 time stamp
00033 #Frame this data is associated with
00034 # 0: no frame
00035 # 1: global frame
00036 string frame_id
00037 
00038 ================================================================================
00039 MSG: geometry_msgs/Pose
00040 # A representation of pose in free space, composed of postion and orientation. 
00041 Point position
00042 Quaternion orientation
00043 
00044 ================================================================================
00045 MSG: geometry_msgs/Point
00046 # This contains the position of a point in free space
00047 float64 x
00048 float64 y
00049 float64 z
00050 
00051 ================================================================================
00052 MSG: geometry_msgs/Quaternion
00053 # This represents an orientation in free space in quaternion form.
00054 
00055 float64 x
00056 float64 y
00057 float64 z
00058 float64 w
00059 
00060 ================================================================================
00061 MSG: lwr_impedance_controller/CartImpTrajectoryPoint
00062 geometry_msgs/Pose pose
00063 lwr_impedance_controller/CartesianImpedance impedance
00064 geometry_msgs/Wrench wrench
00065 geometry_msgs/Twist velocity
00066 duration time_from_start
00067 
00068 ================================================================================
00069 MSG: lwr_impedance_controller/CartesianImpedance
00070 geometry_msgs/Wrench stiffness
00071 geometry_msgs/Wrench damping
00072 
00073 ================================================================================
00074 MSG: geometry_msgs/Wrench
00075 # This represents force in free space, seperated into 
00076 # it's linear and angular parts.  
00077 Vector3  force
00078 Vector3  torque
00079 
00080 ================================================================================
00081 MSG: geometry_msgs/Vector3
00082 # This represents a vector in free space. 
00083 
00084 float64 x
00085 float64 y
00086 float64 z
00087 ================================================================================
00088 MSG: geometry_msgs/Twist
00089 # This expresses velocity in free space broken into it's linear and angular parts. 
00090 Vector3  linear
00091 Vector3  angular
00092 
00093 """
00094   __slots__ = ['header','force_tool','trajectory']
00095   _slot_types = ['std_msgs/Header','geometry_msgs/Pose','lwr_impedance_controller/CartImpTrajectoryPoint[]']
00096 
00097   def __init__(self, *args, **kwds):
00098     """
00099     Constructor. Any message fields that are implicitly/explicitly
00100     set to None will be assigned a default value. The recommend
00101     use is keyword arguments as this is more robust to future message
00102     changes.  You cannot mix in-order arguments and keyword arguments.
00103 
00104     The available fields are:
00105        header,force_tool,trajectory
00106 
00107     :param args: complete set of field values, in .msg order
00108     :param kwds: use keyword arguments corresponding to message field names
00109     to set specific fields.
00110     """
00111     if args or kwds:
00112       super(CartImpTrajectory, self).__init__(*args, **kwds)
00113       #message fields cannot be None, assign default values for those that are
00114       if self.header is None:
00115         self.header = std_msgs.msg.Header()
00116       if self.force_tool is None:
00117         self.force_tool = geometry_msgs.msg.Pose()
00118       if self.trajectory is None:
00119         self.trajectory = []
00120     else:
00121       self.header = std_msgs.msg.Header()
00122       self.force_tool = geometry_msgs.msg.Pose()
00123       self.trajectory = []
00124 
00125   def _get_types(self):
00126     """
00127     internal API method
00128     """
00129     return self._slot_types
00130 
00131   def serialize(self, buff):
00132     """
00133     serialize message into buffer
00134     :param buff: buffer, ``StringIO``
00135     """
00136     try:
00137       _x = self
00138       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00139       _x = self.header.frame_id
00140       length = len(_x)
00141       if python3 or type(_x) == unicode:
00142         _x = _x.encode('utf-8')
00143         length = len(_x)
00144       buff.write(struct.pack('<I%ss'%length, length, _x))
00145       _x = self
00146       buff.write(_struct_7d.pack(_x.force_tool.position.x, _x.force_tool.position.y, _x.force_tool.position.z, _x.force_tool.orientation.x, _x.force_tool.orientation.y, _x.force_tool.orientation.z, _x.force_tool.orientation.w))
00147       length = len(self.trajectory)
00148       buff.write(_struct_I.pack(length))
00149       for val1 in self.trajectory:
00150         _v1 = val1.pose
00151         _v2 = _v1.position
00152         _x = _v2
00153         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00154         _v3 = _v1.orientation
00155         _x = _v3
00156         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00157         _v4 = val1.impedance
00158         _v5 = _v4.stiffness
00159         _v6 = _v5.force
00160         _x = _v6
00161         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00162         _v7 = _v5.torque
00163         _x = _v7
00164         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00165         _v8 = _v4.damping
00166         _v9 = _v8.force
00167         _x = _v9
00168         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00169         _v10 = _v8.torque
00170         _x = _v10
00171         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00172         _v11 = val1.wrench
00173         _v12 = _v11.force
00174         _x = _v12
00175         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00176         _v13 = _v11.torque
00177         _x = _v13
00178         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00179         _v14 = val1.velocity
00180         _v15 = _v14.linear
00181         _x = _v15
00182         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00183         _v16 = _v14.angular
00184         _x = _v16
00185         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00186         _v17 = val1.time_from_start
00187         _x = _v17
00188         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00189     except struct.error as se: self._check_types(se)
00190     except TypeError as te: self._check_types(te)
00191 
00192   def deserialize(self, str):
00193     """
00194     unpack serialized message in str into this message instance
00195     :param str: byte array of serialized message, ``str``
00196     """
00197     try:
00198       if self.header is None:
00199         self.header = std_msgs.msg.Header()
00200       if self.force_tool is None:
00201         self.force_tool = geometry_msgs.msg.Pose()
00202       if self.trajectory is None:
00203         self.trajectory = None
00204       end = 0
00205       _x = self
00206       start = end
00207       end += 12
00208       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00209       start = end
00210       end += 4
00211       (length,) = _struct_I.unpack(str[start:end])
00212       start = end
00213       end += length
00214       if python3:
00215         self.header.frame_id = str[start:end].decode('utf-8')
00216       else:
00217         self.header.frame_id = str[start:end]
00218       _x = self
00219       start = end
00220       end += 56
00221       (_x.force_tool.position.x, _x.force_tool.position.y, _x.force_tool.position.z, _x.force_tool.orientation.x, _x.force_tool.orientation.y, _x.force_tool.orientation.z, _x.force_tool.orientation.w,) = _struct_7d.unpack(str[start:end])
00222       start = end
00223       end += 4
00224       (length,) = _struct_I.unpack(str[start:end])
00225       self.trajectory = []
00226       for i in range(0, length):
00227         val1 = lwr_impedance_controller.msg.CartImpTrajectoryPoint()
00228         _v18 = val1.pose
00229         _v19 = _v18.position
00230         _x = _v19
00231         start = end
00232         end += 24
00233         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00234         _v20 = _v18.orientation
00235         _x = _v20
00236         start = end
00237         end += 32
00238         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00239         _v21 = val1.impedance
00240         _v22 = _v21.stiffness
00241         _v23 = _v22.force
00242         _x = _v23
00243         start = end
00244         end += 24
00245         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00246         _v24 = _v22.torque
00247         _x = _v24
00248         start = end
00249         end += 24
00250         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00251         _v25 = _v21.damping
00252         _v26 = _v25.force
00253         _x = _v26
00254         start = end
00255         end += 24
00256         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00257         _v27 = _v25.torque
00258         _x = _v27
00259         start = end
00260         end += 24
00261         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00262         _v28 = val1.wrench
00263         _v29 = _v28.force
00264         _x = _v29
00265         start = end
00266         end += 24
00267         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00268         _v30 = _v28.torque
00269         _x = _v30
00270         start = end
00271         end += 24
00272         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00273         _v31 = val1.velocity
00274         _v32 = _v31.linear
00275         _x = _v32
00276         start = end
00277         end += 24
00278         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00279         _v33 = _v31.angular
00280         _x = _v33
00281         start = end
00282         end += 24
00283         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00284         _v34 = val1.time_from_start
00285         _x = _v34
00286         start = end
00287         end += 8
00288         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00289         self.trajectory.append(val1)
00290       return self
00291     except struct.error as e:
00292       raise genpy.DeserializationError(e) #most likely buffer underfill
00293 
00294 
00295   def serialize_numpy(self, buff, numpy):
00296     """
00297     serialize message with numpy array types into buffer
00298     :param buff: buffer, ``StringIO``
00299     :param numpy: numpy python module
00300     """
00301     try:
00302       _x = self
00303       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00304       _x = self.header.frame_id
00305       length = len(_x)
00306       if python3 or type(_x) == unicode:
00307         _x = _x.encode('utf-8')
00308         length = len(_x)
00309       buff.write(struct.pack('<I%ss'%length, length, _x))
00310       _x = self
00311       buff.write(_struct_7d.pack(_x.force_tool.position.x, _x.force_tool.position.y, _x.force_tool.position.z, _x.force_tool.orientation.x, _x.force_tool.orientation.y, _x.force_tool.orientation.z, _x.force_tool.orientation.w))
00312       length = len(self.trajectory)
00313       buff.write(_struct_I.pack(length))
00314       for val1 in self.trajectory:
00315         _v35 = val1.pose
00316         _v36 = _v35.position
00317         _x = _v36
00318         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00319         _v37 = _v35.orientation
00320         _x = _v37
00321         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00322         _v38 = val1.impedance
00323         _v39 = _v38.stiffness
00324         _v40 = _v39.force
00325         _x = _v40
00326         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00327         _v41 = _v39.torque
00328         _x = _v41
00329         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00330         _v42 = _v38.damping
00331         _v43 = _v42.force
00332         _x = _v43
00333         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00334         _v44 = _v42.torque
00335         _x = _v44
00336         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00337         _v45 = val1.wrench
00338         _v46 = _v45.force
00339         _x = _v46
00340         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00341         _v47 = _v45.torque
00342         _x = _v47
00343         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00344         _v48 = val1.velocity
00345         _v49 = _v48.linear
00346         _x = _v49
00347         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00348         _v50 = _v48.angular
00349         _x = _v50
00350         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00351         _v51 = val1.time_from_start
00352         _x = _v51
00353         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00354     except struct.error as se: self._check_types(se)
00355     except TypeError as te: self._check_types(te)
00356 
00357   def deserialize_numpy(self, str, numpy):
00358     """
00359     unpack serialized message in str into this message instance using numpy for array types
00360     :param str: byte array of serialized message, ``str``
00361     :param numpy: numpy python module
00362     """
00363     try:
00364       if self.header is None:
00365         self.header = std_msgs.msg.Header()
00366       if self.force_tool is None:
00367         self.force_tool = geometry_msgs.msg.Pose()
00368       if self.trajectory is None:
00369         self.trajectory = None
00370       end = 0
00371       _x = self
00372       start = end
00373       end += 12
00374       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00375       start = end
00376       end += 4
00377       (length,) = _struct_I.unpack(str[start:end])
00378       start = end
00379       end += length
00380       if python3:
00381         self.header.frame_id = str[start:end].decode('utf-8')
00382       else:
00383         self.header.frame_id = str[start:end]
00384       _x = self
00385       start = end
00386       end += 56
00387       (_x.force_tool.position.x, _x.force_tool.position.y, _x.force_tool.position.z, _x.force_tool.orientation.x, _x.force_tool.orientation.y, _x.force_tool.orientation.z, _x.force_tool.orientation.w,) = _struct_7d.unpack(str[start:end])
00388       start = end
00389       end += 4
00390       (length,) = _struct_I.unpack(str[start:end])
00391       self.trajectory = []
00392       for i in range(0, length):
00393         val1 = lwr_impedance_controller.msg.CartImpTrajectoryPoint()
00394         _v52 = val1.pose
00395         _v53 = _v52.position
00396         _x = _v53
00397         start = end
00398         end += 24
00399         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00400         _v54 = _v52.orientation
00401         _x = _v54
00402         start = end
00403         end += 32
00404         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00405         _v55 = val1.impedance
00406         _v56 = _v55.stiffness
00407         _v57 = _v56.force
00408         _x = _v57
00409         start = end
00410         end += 24
00411         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00412         _v58 = _v56.torque
00413         _x = _v58
00414         start = end
00415         end += 24
00416         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00417         _v59 = _v55.damping
00418         _v60 = _v59.force
00419         _x = _v60
00420         start = end
00421         end += 24
00422         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00423         _v61 = _v59.torque
00424         _x = _v61
00425         start = end
00426         end += 24
00427         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00428         _v62 = val1.wrench
00429         _v63 = _v62.force
00430         _x = _v63
00431         start = end
00432         end += 24
00433         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00434         _v64 = _v62.torque
00435         _x = _v64
00436         start = end
00437         end += 24
00438         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00439         _v65 = val1.velocity
00440         _v66 = _v65.linear
00441         _x = _v66
00442         start = end
00443         end += 24
00444         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00445         _v67 = _v65.angular
00446         _x = _v67
00447         start = end
00448         end += 24
00449         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00450         _v68 = val1.time_from_start
00451         _x = _v68
00452         start = end
00453         end += 8
00454         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00455         self.trajectory.append(val1)
00456       return self
00457     except struct.error as e:
00458       raise genpy.DeserializationError(e) #most likely buffer underfill
00459 
00460 _struct_I = genpy.struct_I
00461 _struct_2i = struct.Struct("<2i")
00462 _struct_3I = struct.Struct("<3I")
00463 _struct_7d = struct.Struct("<7d")
00464 _struct_4d = struct.Struct("<4d")
00465 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


lwr_impedance_controller
Author(s): Konrad Banachowicz
autogenerated on Thu Nov 14 2013 11:56:13