_JinvExperimentalControllerState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_manipulation_controllers/JinvExperimentalControllerState.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 
00010 class JinvExperimentalControllerState(genpy.Message):
00011   _md5sum = "c2742b55214fde97464aa5cf7938daf0"
00012   _type = "pr2_manipulation_controllers/JinvExperimentalControllerState"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 geometry_msgs/PoseStamped x
00016 geometry_msgs/PoseStamped x_desi
00017 geometry_msgs/PoseStamped x_desi_filtered
00018 geometry_msgs/Twist x_err
00019 geometry_msgs/Twist xd
00020 geometry_msgs/Twist xd_desi
00021 geometry_msgs/Wrench F
00022 float64[] q_proxy
00023 float64[] qd_pose
00024 float64[] qd_posture
00025 float64[] qd_posture_raw
00026 float64[] qd_desi
00027 float64[] tau
00028 std_msgs/Float64MultiArray J
00029 std_msgs/Float64MultiArray N
00030 
00031 float64[] J_singular_values
00032 
00033 # Environmental stiffness
00034 float64 df
00035 float64 dx
00036 float64 Df
00037 float64 Dx
00038 float64 stiffness
00039 float64 compliance
00040 
00041 ================================================================================
00042 MSG: std_msgs/Header
00043 # Standard metadata for higher-level stamped data types.
00044 # This is generally used to communicate timestamped data 
00045 # in a particular coordinate frame.
00046 # 
00047 # sequence ID: consecutively increasing ID 
00048 uint32 seq
00049 #Two-integer timestamp that is expressed as:
00050 # * stamp.secs: seconds (stamp_secs) since epoch
00051 # * stamp.nsecs: nanoseconds since stamp_secs
00052 # time-handling sugar is provided by the client library
00053 time stamp
00054 #Frame this data is associated with
00055 # 0: no frame
00056 # 1: global frame
00057 string frame_id
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/PoseStamped
00061 # A Pose with reference coordinate frame and timestamp
00062 Header header
00063 Pose pose
00064 
00065 ================================================================================
00066 MSG: geometry_msgs/Pose
00067 # A representation of pose in free space, composed of postion and orientation. 
00068 Point position
00069 Quaternion orientation
00070 
00071 ================================================================================
00072 MSG: geometry_msgs/Point
00073 # This contains the position of a point in free space
00074 float64 x
00075 float64 y
00076 float64 z
00077 
00078 ================================================================================
00079 MSG: geometry_msgs/Quaternion
00080 # This represents an orientation in free space in quaternion form.
00081 
00082 float64 x
00083 float64 y
00084 float64 z
00085 float64 w
00086 
00087 ================================================================================
00088 MSG: geometry_msgs/Twist
00089 # This expresses velocity in free space broken into its linear and angular parts.
00090 Vector3  linear
00091 Vector3  angular
00092 
00093 ================================================================================
00094 MSG: geometry_msgs/Vector3
00095 # This represents a vector in free space. 
00096 
00097 float64 x
00098 float64 y
00099 float64 z
00100 ================================================================================
00101 MSG: geometry_msgs/Wrench
00102 # This represents force in free space, separated into
00103 # its linear and angular parts.
00104 Vector3  force
00105 Vector3  torque
00106 
00107 ================================================================================
00108 MSG: std_msgs/Float64MultiArray
00109 # Please look at the MultiArrayLayout message definition for
00110 # documentation on all multiarrays.
00111 
00112 MultiArrayLayout  layout        # specification of data layout
00113 float64[]         data          # array of data
00114 
00115 
00116 ================================================================================
00117 MSG: std_msgs/MultiArrayLayout
00118 # The multiarray declares a generic multi-dimensional array of a
00119 # particular data type.  Dimensions are ordered from outer most
00120 # to inner most.
00121 
00122 MultiArrayDimension[] dim # Array of dimension properties
00123 uint32 data_offset        # padding bytes at front of data
00124 
00125 # Accessors should ALWAYS be written in terms of dimension stride
00126 # and specified outer-most dimension first.
00127 # 
00128 # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
00129 #
00130 # A standard, 3-channel 640x480 image with interleaved color channels
00131 # would be specified as:
00132 #
00133 # dim[0].label  = "height"
00134 # dim[0].size   = 480
00135 # dim[0].stride = 3*640*480 = 921600  (note dim[0] stride is just size of image)
00136 # dim[1].label  = "width"
00137 # dim[1].size   = 640
00138 # dim[1].stride = 3*640 = 1920
00139 # dim[2].label  = "channel"
00140 # dim[2].size   = 3
00141 # dim[2].stride = 3
00142 #
00143 # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
00144 ================================================================================
00145 MSG: std_msgs/MultiArrayDimension
00146 string label   # label of given dimension
00147 uint32 size    # size of given dimension (in type units)
00148 uint32 stride  # stride of given dimension
00149 """
00150   __slots__ = ['header','x','x_desi','x_desi_filtered','x_err','xd','xd_desi','F','q_proxy','qd_pose','qd_posture','qd_posture_raw','qd_desi','tau','J','N','J_singular_values','df','dx','Df','Dx','stiffness','compliance']
00151   _slot_types = ['std_msgs/Header','geometry_msgs/PoseStamped','geometry_msgs/PoseStamped','geometry_msgs/PoseStamped','geometry_msgs/Twist','geometry_msgs/Twist','geometry_msgs/Twist','geometry_msgs/Wrench','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','std_msgs/Float64MultiArray','std_msgs/Float64MultiArray','float64[]','float64','float64','float64','float64','float64','float64']
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        header,x,x_desi,x_desi_filtered,x_err,xd,xd_desi,F,q_proxy,qd_pose,qd_posture,qd_posture_raw,qd_desi,tau,J,N,J_singular_values,df,dx,Df,Dx,stiffness,compliance
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(JinvExperimentalControllerState, self).__init__(*args, **kwds)
00169       #message fields cannot be None, assign default values for those that are
00170       if self.header is None:
00171         self.header = std_msgs.msg.Header()
00172       if self.x is None:
00173         self.x = geometry_msgs.msg.PoseStamped()
00174       if self.x_desi is None:
00175         self.x_desi = geometry_msgs.msg.PoseStamped()
00176       if self.x_desi_filtered is None:
00177         self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00178       if self.x_err is None:
00179         self.x_err = geometry_msgs.msg.Twist()
00180       if self.xd is None:
00181         self.xd = geometry_msgs.msg.Twist()
00182       if self.xd_desi is None:
00183         self.xd_desi = geometry_msgs.msg.Twist()
00184       if self.F is None:
00185         self.F = geometry_msgs.msg.Wrench()
00186       if self.q_proxy is None:
00187         self.q_proxy = []
00188       if self.qd_pose is None:
00189         self.qd_pose = []
00190       if self.qd_posture is None:
00191         self.qd_posture = []
00192       if self.qd_posture_raw is None:
00193         self.qd_posture_raw = []
00194       if self.qd_desi is None:
00195         self.qd_desi = []
00196       if self.tau is None:
00197         self.tau = []
00198       if self.J is None:
00199         self.J = std_msgs.msg.Float64MultiArray()
00200       if self.N is None:
00201         self.N = std_msgs.msg.Float64MultiArray()
00202       if self.J_singular_values is None:
00203         self.J_singular_values = []
00204       if self.df is None:
00205         self.df = 0.
00206       if self.dx is None:
00207         self.dx = 0.
00208       if self.Df is None:
00209         self.Df = 0.
00210       if self.Dx is None:
00211         self.Dx = 0.
00212       if self.stiffness is None:
00213         self.stiffness = 0.
00214       if self.compliance is None:
00215         self.compliance = 0.
00216     else:
00217       self.header = std_msgs.msg.Header()
00218       self.x = geometry_msgs.msg.PoseStamped()
00219       self.x_desi = geometry_msgs.msg.PoseStamped()
00220       self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00221       self.x_err = geometry_msgs.msg.Twist()
00222       self.xd = geometry_msgs.msg.Twist()
00223       self.xd_desi = geometry_msgs.msg.Twist()
00224       self.F = geometry_msgs.msg.Wrench()
00225       self.q_proxy = []
00226       self.qd_pose = []
00227       self.qd_posture = []
00228       self.qd_posture_raw = []
00229       self.qd_desi = []
00230       self.tau = []
00231       self.J = std_msgs.msg.Float64MultiArray()
00232       self.N = std_msgs.msg.Float64MultiArray()
00233       self.J_singular_values = []
00234       self.df = 0.
00235       self.dx = 0.
00236       self.Df = 0.
00237       self.Dx = 0.
00238       self.stiffness = 0.
00239       self.compliance = 0.
00240 
00241   def _get_types(self):
00242     """
00243     internal API method
00244     """
00245     return self._slot_types
00246 
00247   def serialize(self, buff):
00248     """
00249     serialize message into buffer
00250     :param buff: buffer, ``StringIO``
00251     """
00252     try:
00253       _x = self
00254       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00255       _x = self.header.frame_id
00256       length = len(_x)
00257       if python3 or type(_x) == unicode:
00258         _x = _x.encode('utf-8')
00259         length = len(_x)
00260       buff.write(struct.pack('<I%ss'%length, length, _x))
00261       _x = self
00262       buff.write(_struct_3I.pack(_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs))
00263       _x = self.x.header.frame_id
00264       length = len(_x)
00265       if python3 or type(_x) == unicode:
00266         _x = _x.encode('utf-8')
00267         length = len(_x)
00268       buff.write(struct.pack('<I%ss'%length, length, _x))
00269       _x = self
00270       buff.write(_struct_7d3I.pack(_x.x.pose.position.x, _x.x.pose.position.y, _x.x.pose.position.z, _x.x.pose.orientation.x, _x.x.pose.orientation.y, _x.x.pose.orientation.z, _x.x.pose.orientation.w, _x.x_desi.header.seq, _x.x_desi.header.stamp.secs, _x.x_desi.header.stamp.nsecs))
00271       _x = self.x_desi.header.frame_id
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 = self
00278       buff.write(_struct_7d3I.pack(_x.x_desi.pose.position.x, _x.x_desi.pose.position.y, _x.x_desi.pose.position.z, _x.x_desi.pose.orientation.x, _x.x_desi.pose.orientation.y, _x.x_desi.pose.orientation.z, _x.x_desi.pose.orientation.w, _x.x_desi_filtered.header.seq, _x.x_desi_filtered.header.stamp.secs, _x.x_desi_filtered.header.stamp.nsecs))
00279       _x = self.x_desi_filtered.header.frame_id
00280       length = len(_x)
00281       if python3 or type(_x) == unicode:
00282         _x = _x.encode('utf-8')
00283         length = len(_x)
00284       buff.write(struct.pack('<I%ss'%length, length, _x))
00285       _x = self
00286       buff.write(_struct_31d.pack(_x.x_desi_filtered.pose.position.x, _x.x_desi_filtered.pose.position.y, _x.x_desi_filtered.pose.position.z, _x.x_desi_filtered.pose.orientation.x, _x.x_desi_filtered.pose.orientation.y, _x.x_desi_filtered.pose.orientation.z, _x.x_desi_filtered.pose.orientation.w, _x.x_err.linear.x, _x.x_err.linear.y, _x.x_err.linear.z, _x.x_err.angular.x, _x.x_err.angular.y, _x.x_err.angular.z, _x.xd.linear.x, _x.xd.linear.y, _x.xd.linear.z, _x.xd.angular.x, _x.xd.angular.y, _x.xd.angular.z, _x.xd_desi.linear.x, _x.xd_desi.linear.y, _x.xd_desi.linear.z, _x.xd_desi.angular.x, _x.xd_desi.angular.y, _x.xd_desi.angular.z, _x.F.force.x, _x.F.force.y, _x.F.force.z, _x.F.torque.x, _x.F.torque.y, _x.F.torque.z))
00287       length = len(self.q_proxy)
00288       buff.write(_struct_I.pack(length))
00289       pattern = '<%sd'%length
00290       buff.write(struct.pack(pattern, *self.q_proxy))
00291       length = len(self.qd_pose)
00292       buff.write(_struct_I.pack(length))
00293       pattern = '<%sd'%length
00294       buff.write(struct.pack(pattern, *self.qd_pose))
00295       length = len(self.qd_posture)
00296       buff.write(_struct_I.pack(length))
00297       pattern = '<%sd'%length
00298       buff.write(struct.pack(pattern, *self.qd_posture))
00299       length = len(self.qd_posture_raw)
00300       buff.write(_struct_I.pack(length))
00301       pattern = '<%sd'%length
00302       buff.write(struct.pack(pattern, *self.qd_posture_raw))
00303       length = len(self.qd_desi)
00304       buff.write(_struct_I.pack(length))
00305       pattern = '<%sd'%length
00306       buff.write(struct.pack(pattern, *self.qd_desi))
00307       length = len(self.tau)
00308       buff.write(_struct_I.pack(length))
00309       pattern = '<%sd'%length
00310       buff.write(struct.pack(pattern, *self.tau))
00311       length = len(self.J.layout.dim)
00312       buff.write(_struct_I.pack(length))
00313       for val1 in self.J.layout.dim:
00314         _x = val1.label
00315         length = len(_x)
00316         if python3 or type(_x) == unicode:
00317           _x = _x.encode('utf-8')
00318           length = len(_x)
00319         buff.write(struct.pack('<I%ss'%length, length, _x))
00320         _x = val1
00321         buff.write(_struct_2I.pack(_x.size, _x.stride))
00322       buff.write(_struct_I.pack(self.J.layout.data_offset))
00323       length = len(self.J.data)
00324       buff.write(_struct_I.pack(length))
00325       pattern = '<%sd'%length
00326       buff.write(struct.pack(pattern, *self.J.data))
00327       length = len(self.N.layout.dim)
00328       buff.write(_struct_I.pack(length))
00329       for val1 in self.N.layout.dim:
00330         _x = val1.label
00331         length = len(_x)
00332         if python3 or type(_x) == unicode:
00333           _x = _x.encode('utf-8')
00334           length = len(_x)
00335         buff.write(struct.pack('<I%ss'%length, length, _x))
00336         _x = val1
00337         buff.write(_struct_2I.pack(_x.size, _x.stride))
00338       buff.write(_struct_I.pack(self.N.layout.data_offset))
00339       length = len(self.N.data)
00340       buff.write(_struct_I.pack(length))
00341       pattern = '<%sd'%length
00342       buff.write(struct.pack(pattern, *self.N.data))
00343       length = len(self.J_singular_values)
00344       buff.write(_struct_I.pack(length))
00345       pattern = '<%sd'%length
00346       buff.write(struct.pack(pattern, *self.J_singular_values))
00347       _x = self
00348       buff.write(_struct_6d.pack(_x.df, _x.dx, _x.Df, _x.Dx, _x.stiffness, _x.compliance))
00349     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00350     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00351 
00352   def deserialize(self, str):
00353     """
00354     unpack serialized message in str into this message instance
00355     :param str: byte array of serialized message, ``str``
00356     """
00357     try:
00358       if self.header is None:
00359         self.header = std_msgs.msg.Header()
00360       if self.x is None:
00361         self.x = geometry_msgs.msg.PoseStamped()
00362       if self.x_desi is None:
00363         self.x_desi = geometry_msgs.msg.PoseStamped()
00364       if self.x_desi_filtered is None:
00365         self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00366       if self.x_err is None:
00367         self.x_err = geometry_msgs.msg.Twist()
00368       if self.xd is None:
00369         self.xd = geometry_msgs.msg.Twist()
00370       if self.xd_desi is None:
00371         self.xd_desi = geometry_msgs.msg.Twist()
00372       if self.F is None:
00373         self.F = geometry_msgs.msg.Wrench()
00374       if self.J is None:
00375         self.J = std_msgs.msg.Float64MultiArray()
00376       if self.N is None:
00377         self.N = std_msgs.msg.Float64MultiArray()
00378       end = 0
00379       _x = self
00380       start = end
00381       end += 12
00382       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00383       start = end
00384       end += 4
00385       (length,) = _struct_I.unpack(str[start:end])
00386       start = end
00387       end += length
00388       if python3:
00389         self.header.frame_id = str[start:end].decode('utf-8')
00390       else:
00391         self.header.frame_id = str[start:end]
00392       _x = self
00393       start = end
00394       end += 12
00395       (_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00396       start = end
00397       end += 4
00398       (length,) = _struct_I.unpack(str[start:end])
00399       start = end
00400       end += length
00401       if python3:
00402         self.x.header.frame_id = str[start:end].decode('utf-8')
00403       else:
00404         self.x.header.frame_id = str[start:end]
00405       _x = self
00406       start = end
00407       end += 68
00408       (_x.x.pose.position.x, _x.x.pose.position.y, _x.x.pose.position.z, _x.x.pose.orientation.x, _x.x.pose.orientation.y, _x.x.pose.orientation.z, _x.x.pose.orientation.w, _x.x_desi.header.seq, _x.x_desi.header.stamp.secs, _x.x_desi.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00409       start = end
00410       end += 4
00411       (length,) = _struct_I.unpack(str[start:end])
00412       start = end
00413       end += length
00414       if python3:
00415         self.x_desi.header.frame_id = str[start:end].decode('utf-8')
00416       else:
00417         self.x_desi.header.frame_id = str[start:end]
00418       _x = self
00419       start = end
00420       end += 68
00421       (_x.x_desi.pose.position.x, _x.x_desi.pose.position.y, _x.x_desi.pose.position.z, _x.x_desi.pose.orientation.x, _x.x_desi.pose.orientation.y, _x.x_desi.pose.orientation.z, _x.x_desi.pose.orientation.w, _x.x_desi_filtered.header.seq, _x.x_desi_filtered.header.stamp.secs, _x.x_desi_filtered.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00422       start = end
00423       end += 4
00424       (length,) = _struct_I.unpack(str[start:end])
00425       start = end
00426       end += length
00427       if python3:
00428         self.x_desi_filtered.header.frame_id = str[start:end].decode('utf-8')
00429       else:
00430         self.x_desi_filtered.header.frame_id = str[start:end]
00431       _x = self
00432       start = end
00433       end += 248
00434       (_x.x_desi_filtered.pose.position.x, _x.x_desi_filtered.pose.position.y, _x.x_desi_filtered.pose.position.z, _x.x_desi_filtered.pose.orientation.x, _x.x_desi_filtered.pose.orientation.y, _x.x_desi_filtered.pose.orientation.z, _x.x_desi_filtered.pose.orientation.w, _x.x_err.linear.x, _x.x_err.linear.y, _x.x_err.linear.z, _x.x_err.angular.x, _x.x_err.angular.y, _x.x_err.angular.z, _x.xd.linear.x, _x.xd.linear.y, _x.xd.linear.z, _x.xd.angular.x, _x.xd.angular.y, _x.xd.angular.z, _x.xd_desi.linear.x, _x.xd_desi.linear.y, _x.xd_desi.linear.z, _x.xd_desi.angular.x, _x.xd_desi.angular.y, _x.xd_desi.angular.z, _x.F.force.x, _x.F.force.y, _x.F.force.z, _x.F.torque.x, _x.F.torque.y, _x.F.torque.z,) = _struct_31d.unpack(str[start:end])
00435       start = end
00436       end += 4
00437       (length,) = _struct_I.unpack(str[start:end])
00438       pattern = '<%sd'%length
00439       start = end
00440       end += struct.calcsize(pattern)
00441       self.q_proxy = struct.unpack(pattern, str[start:end])
00442       start = end
00443       end += 4
00444       (length,) = _struct_I.unpack(str[start:end])
00445       pattern = '<%sd'%length
00446       start = end
00447       end += struct.calcsize(pattern)
00448       self.qd_pose = struct.unpack(pattern, str[start:end])
00449       start = end
00450       end += 4
00451       (length,) = _struct_I.unpack(str[start:end])
00452       pattern = '<%sd'%length
00453       start = end
00454       end += struct.calcsize(pattern)
00455       self.qd_posture = struct.unpack(pattern, str[start:end])
00456       start = end
00457       end += 4
00458       (length,) = _struct_I.unpack(str[start:end])
00459       pattern = '<%sd'%length
00460       start = end
00461       end += struct.calcsize(pattern)
00462       self.qd_posture_raw = struct.unpack(pattern, str[start:end])
00463       start = end
00464       end += 4
00465       (length,) = _struct_I.unpack(str[start:end])
00466       pattern = '<%sd'%length
00467       start = end
00468       end += struct.calcsize(pattern)
00469       self.qd_desi = struct.unpack(pattern, str[start:end])
00470       start = end
00471       end += 4
00472       (length,) = _struct_I.unpack(str[start:end])
00473       pattern = '<%sd'%length
00474       start = end
00475       end += struct.calcsize(pattern)
00476       self.tau = struct.unpack(pattern, str[start:end])
00477       start = end
00478       end += 4
00479       (length,) = _struct_I.unpack(str[start:end])
00480       self.J.layout.dim = []
00481       for i in range(0, length):
00482         val1 = std_msgs.msg.MultiArrayDimension()
00483         start = end
00484         end += 4
00485         (length,) = _struct_I.unpack(str[start:end])
00486         start = end
00487         end += length
00488         if python3:
00489           val1.label = str[start:end].decode('utf-8')
00490         else:
00491           val1.label = str[start:end]
00492         _x = val1
00493         start = end
00494         end += 8
00495         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00496         self.J.layout.dim.append(val1)
00497       start = end
00498       end += 4
00499       (self.J.layout.data_offset,) = _struct_I.unpack(str[start:end])
00500       start = end
00501       end += 4
00502       (length,) = _struct_I.unpack(str[start:end])
00503       pattern = '<%sd'%length
00504       start = end
00505       end += struct.calcsize(pattern)
00506       self.J.data = struct.unpack(pattern, str[start:end])
00507       start = end
00508       end += 4
00509       (length,) = _struct_I.unpack(str[start:end])
00510       self.N.layout.dim = []
00511       for i in range(0, length):
00512         val1 = std_msgs.msg.MultiArrayDimension()
00513         start = end
00514         end += 4
00515         (length,) = _struct_I.unpack(str[start:end])
00516         start = end
00517         end += length
00518         if python3:
00519           val1.label = str[start:end].decode('utf-8')
00520         else:
00521           val1.label = str[start:end]
00522         _x = val1
00523         start = end
00524         end += 8
00525         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00526         self.N.layout.dim.append(val1)
00527       start = end
00528       end += 4
00529       (self.N.layout.data_offset,) = _struct_I.unpack(str[start:end])
00530       start = end
00531       end += 4
00532       (length,) = _struct_I.unpack(str[start:end])
00533       pattern = '<%sd'%length
00534       start = end
00535       end += struct.calcsize(pattern)
00536       self.N.data = struct.unpack(pattern, str[start:end])
00537       start = end
00538       end += 4
00539       (length,) = _struct_I.unpack(str[start:end])
00540       pattern = '<%sd'%length
00541       start = end
00542       end += struct.calcsize(pattern)
00543       self.J_singular_values = struct.unpack(pattern, str[start:end])
00544       _x = self
00545       start = end
00546       end += 48
00547       (_x.df, _x.dx, _x.Df, _x.Dx, _x.stiffness, _x.compliance,) = _struct_6d.unpack(str[start:end])
00548       return self
00549     except struct.error as e:
00550       raise genpy.DeserializationError(e) #most likely buffer underfill
00551 
00552 
00553   def serialize_numpy(self, buff, numpy):
00554     """
00555     serialize message with numpy array types into buffer
00556     :param buff: buffer, ``StringIO``
00557     :param numpy: numpy python module
00558     """
00559     try:
00560       _x = self
00561       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00562       _x = self.header.frame_id
00563       length = len(_x)
00564       if python3 or type(_x) == unicode:
00565         _x = _x.encode('utf-8')
00566         length = len(_x)
00567       buff.write(struct.pack('<I%ss'%length, length, _x))
00568       _x = self
00569       buff.write(_struct_3I.pack(_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs))
00570       _x = self.x.header.frame_id
00571       length = len(_x)
00572       if python3 or type(_x) == unicode:
00573         _x = _x.encode('utf-8')
00574         length = len(_x)
00575       buff.write(struct.pack('<I%ss'%length, length, _x))
00576       _x = self
00577       buff.write(_struct_7d3I.pack(_x.x.pose.position.x, _x.x.pose.position.y, _x.x.pose.position.z, _x.x.pose.orientation.x, _x.x.pose.orientation.y, _x.x.pose.orientation.z, _x.x.pose.orientation.w, _x.x_desi.header.seq, _x.x_desi.header.stamp.secs, _x.x_desi.header.stamp.nsecs))
00578       _x = self.x_desi.header.frame_id
00579       length = len(_x)
00580       if python3 or type(_x) == unicode:
00581         _x = _x.encode('utf-8')
00582         length = len(_x)
00583       buff.write(struct.pack('<I%ss'%length, length, _x))
00584       _x = self
00585       buff.write(_struct_7d3I.pack(_x.x_desi.pose.position.x, _x.x_desi.pose.position.y, _x.x_desi.pose.position.z, _x.x_desi.pose.orientation.x, _x.x_desi.pose.orientation.y, _x.x_desi.pose.orientation.z, _x.x_desi.pose.orientation.w, _x.x_desi_filtered.header.seq, _x.x_desi_filtered.header.stamp.secs, _x.x_desi_filtered.header.stamp.nsecs))
00586       _x = self.x_desi_filtered.header.frame_id
00587       length = len(_x)
00588       if python3 or type(_x) == unicode:
00589         _x = _x.encode('utf-8')
00590         length = len(_x)
00591       buff.write(struct.pack('<I%ss'%length, length, _x))
00592       _x = self
00593       buff.write(_struct_31d.pack(_x.x_desi_filtered.pose.position.x, _x.x_desi_filtered.pose.position.y, _x.x_desi_filtered.pose.position.z, _x.x_desi_filtered.pose.orientation.x, _x.x_desi_filtered.pose.orientation.y, _x.x_desi_filtered.pose.orientation.z, _x.x_desi_filtered.pose.orientation.w, _x.x_err.linear.x, _x.x_err.linear.y, _x.x_err.linear.z, _x.x_err.angular.x, _x.x_err.angular.y, _x.x_err.angular.z, _x.xd.linear.x, _x.xd.linear.y, _x.xd.linear.z, _x.xd.angular.x, _x.xd.angular.y, _x.xd.angular.z, _x.xd_desi.linear.x, _x.xd_desi.linear.y, _x.xd_desi.linear.z, _x.xd_desi.angular.x, _x.xd_desi.angular.y, _x.xd_desi.angular.z, _x.F.force.x, _x.F.force.y, _x.F.force.z, _x.F.torque.x, _x.F.torque.y, _x.F.torque.z))
00594       length = len(self.q_proxy)
00595       buff.write(_struct_I.pack(length))
00596       pattern = '<%sd'%length
00597       buff.write(self.q_proxy.tostring())
00598       length = len(self.qd_pose)
00599       buff.write(_struct_I.pack(length))
00600       pattern = '<%sd'%length
00601       buff.write(self.qd_pose.tostring())
00602       length = len(self.qd_posture)
00603       buff.write(_struct_I.pack(length))
00604       pattern = '<%sd'%length
00605       buff.write(self.qd_posture.tostring())
00606       length = len(self.qd_posture_raw)
00607       buff.write(_struct_I.pack(length))
00608       pattern = '<%sd'%length
00609       buff.write(self.qd_posture_raw.tostring())
00610       length = len(self.qd_desi)
00611       buff.write(_struct_I.pack(length))
00612       pattern = '<%sd'%length
00613       buff.write(self.qd_desi.tostring())
00614       length = len(self.tau)
00615       buff.write(_struct_I.pack(length))
00616       pattern = '<%sd'%length
00617       buff.write(self.tau.tostring())
00618       length = len(self.J.layout.dim)
00619       buff.write(_struct_I.pack(length))
00620       for val1 in self.J.layout.dim:
00621         _x = val1.label
00622         length = len(_x)
00623         if python3 or type(_x) == unicode:
00624           _x = _x.encode('utf-8')
00625           length = len(_x)
00626         buff.write(struct.pack('<I%ss'%length, length, _x))
00627         _x = val1
00628         buff.write(_struct_2I.pack(_x.size, _x.stride))
00629       buff.write(_struct_I.pack(self.J.layout.data_offset))
00630       length = len(self.J.data)
00631       buff.write(_struct_I.pack(length))
00632       pattern = '<%sd'%length
00633       buff.write(self.J.data.tostring())
00634       length = len(self.N.layout.dim)
00635       buff.write(_struct_I.pack(length))
00636       for val1 in self.N.layout.dim:
00637         _x = val1.label
00638         length = len(_x)
00639         if python3 or type(_x) == unicode:
00640           _x = _x.encode('utf-8')
00641           length = len(_x)
00642         buff.write(struct.pack('<I%ss'%length, length, _x))
00643         _x = val1
00644         buff.write(_struct_2I.pack(_x.size, _x.stride))
00645       buff.write(_struct_I.pack(self.N.layout.data_offset))
00646       length = len(self.N.data)
00647       buff.write(_struct_I.pack(length))
00648       pattern = '<%sd'%length
00649       buff.write(self.N.data.tostring())
00650       length = len(self.J_singular_values)
00651       buff.write(_struct_I.pack(length))
00652       pattern = '<%sd'%length
00653       buff.write(self.J_singular_values.tostring())
00654       _x = self
00655       buff.write(_struct_6d.pack(_x.df, _x.dx, _x.Df, _x.Dx, _x.stiffness, _x.compliance))
00656     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00657     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00658 
00659   def deserialize_numpy(self, str, numpy):
00660     """
00661     unpack serialized message in str into this message instance using numpy for array types
00662     :param str: byte array of serialized message, ``str``
00663     :param numpy: numpy python module
00664     """
00665     try:
00666       if self.header is None:
00667         self.header = std_msgs.msg.Header()
00668       if self.x is None:
00669         self.x = geometry_msgs.msg.PoseStamped()
00670       if self.x_desi is None:
00671         self.x_desi = geometry_msgs.msg.PoseStamped()
00672       if self.x_desi_filtered is None:
00673         self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00674       if self.x_err is None:
00675         self.x_err = geometry_msgs.msg.Twist()
00676       if self.xd is None:
00677         self.xd = geometry_msgs.msg.Twist()
00678       if self.xd_desi is None:
00679         self.xd_desi = geometry_msgs.msg.Twist()
00680       if self.F is None:
00681         self.F = geometry_msgs.msg.Wrench()
00682       if self.J is None:
00683         self.J = std_msgs.msg.Float64MultiArray()
00684       if self.N is None:
00685         self.N = std_msgs.msg.Float64MultiArray()
00686       end = 0
00687       _x = self
00688       start = end
00689       end += 12
00690       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00691       start = end
00692       end += 4
00693       (length,) = _struct_I.unpack(str[start:end])
00694       start = end
00695       end += length
00696       if python3:
00697         self.header.frame_id = str[start:end].decode('utf-8')
00698       else:
00699         self.header.frame_id = str[start:end]
00700       _x = self
00701       start = end
00702       end += 12
00703       (_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00704       start = end
00705       end += 4
00706       (length,) = _struct_I.unpack(str[start:end])
00707       start = end
00708       end += length
00709       if python3:
00710         self.x.header.frame_id = str[start:end].decode('utf-8')
00711       else:
00712         self.x.header.frame_id = str[start:end]
00713       _x = self
00714       start = end
00715       end += 68
00716       (_x.x.pose.position.x, _x.x.pose.position.y, _x.x.pose.position.z, _x.x.pose.orientation.x, _x.x.pose.orientation.y, _x.x.pose.orientation.z, _x.x.pose.orientation.w, _x.x_desi.header.seq, _x.x_desi.header.stamp.secs, _x.x_desi.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00717       start = end
00718       end += 4
00719       (length,) = _struct_I.unpack(str[start:end])
00720       start = end
00721       end += length
00722       if python3:
00723         self.x_desi.header.frame_id = str[start:end].decode('utf-8')
00724       else:
00725         self.x_desi.header.frame_id = str[start:end]
00726       _x = self
00727       start = end
00728       end += 68
00729       (_x.x_desi.pose.position.x, _x.x_desi.pose.position.y, _x.x_desi.pose.position.z, _x.x_desi.pose.orientation.x, _x.x_desi.pose.orientation.y, _x.x_desi.pose.orientation.z, _x.x_desi.pose.orientation.w, _x.x_desi_filtered.header.seq, _x.x_desi_filtered.header.stamp.secs, _x.x_desi_filtered.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00730       start = end
00731       end += 4
00732       (length,) = _struct_I.unpack(str[start:end])
00733       start = end
00734       end += length
00735       if python3:
00736         self.x_desi_filtered.header.frame_id = str[start:end].decode('utf-8')
00737       else:
00738         self.x_desi_filtered.header.frame_id = str[start:end]
00739       _x = self
00740       start = end
00741       end += 248
00742       (_x.x_desi_filtered.pose.position.x, _x.x_desi_filtered.pose.position.y, _x.x_desi_filtered.pose.position.z, _x.x_desi_filtered.pose.orientation.x, _x.x_desi_filtered.pose.orientation.y, _x.x_desi_filtered.pose.orientation.z, _x.x_desi_filtered.pose.orientation.w, _x.x_err.linear.x, _x.x_err.linear.y, _x.x_err.linear.z, _x.x_err.angular.x, _x.x_err.angular.y, _x.x_err.angular.z, _x.xd.linear.x, _x.xd.linear.y, _x.xd.linear.z, _x.xd.angular.x, _x.xd.angular.y, _x.xd.angular.z, _x.xd_desi.linear.x, _x.xd_desi.linear.y, _x.xd_desi.linear.z, _x.xd_desi.angular.x, _x.xd_desi.angular.y, _x.xd_desi.angular.z, _x.F.force.x, _x.F.force.y, _x.F.force.z, _x.F.torque.x, _x.F.torque.y, _x.F.torque.z,) = _struct_31d.unpack(str[start:end])
00743       start = end
00744       end += 4
00745       (length,) = _struct_I.unpack(str[start:end])
00746       pattern = '<%sd'%length
00747       start = end
00748       end += struct.calcsize(pattern)
00749       self.q_proxy = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00750       start = end
00751       end += 4
00752       (length,) = _struct_I.unpack(str[start:end])
00753       pattern = '<%sd'%length
00754       start = end
00755       end += struct.calcsize(pattern)
00756       self.qd_pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00757       start = end
00758       end += 4
00759       (length,) = _struct_I.unpack(str[start:end])
00760       pattern = '<%sd'%length
00761       start = end
00762       end += struct.calcsize(pattern)
00763       self.qd_posture = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00764       start = end
00765       end += 4
00766       (length,) = _struct_I.unpack(str[start:end])
00767       pattern = '<%sd'%length
00768       start = end
00769       end += struct.calcsize(pattern)
00770       self.qd_posture_raw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00771       start = end
00772       end += 4
00773       (length,) = _struct_I.unpack(str[start:end])
00774       pattern = '<%sd'%length
00775       start = end
00776       end += struct.calcsize(pattern)
00777       self.qd_desi = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00778       start = end
00779       end += 4
00780       (length,) = _struct_I.unpack(str[start:end])
00781       pattern = '<%sd'%length
00782       start = end
00783       end += struct.calcsize(pattern)
00784       self.tau = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00785       start = end
00786       end += 4
00787       (length,) = _struct_I.unpack(str[start:end])
00788       self.J.layout.dim = []
00789       for i in range(0, length):
00790         val1 = std_msgs.msg.MultiArrayDimension()
00791         start = end
00792         end += 4
00793         (length,) = _struct_I.unpack(str[start:end])
00794         start = end
00795         end += length
00796         if python3:
00797           val1.label = str[start:end].decode('utf-8')
00798         else:
00799           val1.label = str[start:end]
00800         _x = val1
00801         start = end
00802         end += 8
00803         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00804         self.J.layout.dim.append(val1)
00805       start = end
00806       end += 4
00807       (self.J.layout.data_offset,) = _struct_I.unpack(str[start:end])
00808       start = end
00809       end += 4
00810       (length,) = _struct_I.unpack(str[start:end])
00811       pattern = '<%sd'%length
00812       start = end
00813       end += struct.calcsize(pattern)
00814       self.J.data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00815       start = end
00816       end += 4
00817       (length,) = _struct_I.unpack(str[start:end])
00818       self.N.layout.dim = []
00819       for i in range(0, length):
00820         val1 = std_msgs.msg.MultiArrayDimension()
00821         start = end
00822         end += 4
00823         (length,) = _struct_I.unpack(str[start:end])
00824         start = end
00825         end += length
00826         if python3:
00827           val1.label = str[start:end].decode('utf-8')
00828         else:
00829           val1.label = str[start:end]
00830         _x = val1
00831         start = end
00832         end += 8
00833         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00834         self.N.layout.dim.append(val1)
00835       start = end
00836       end += 4
00837       (self.N.layout.data_offset,) = _struct_I.unpack(str[start:end])
00838       start = end
00839       end += 4
00840       (length,) = _struct_I.unpack(str[start:end])
00841       pattern = '<%sd'%length
00842       start = end
00843       end += struct.calcsize(pattern)
00844       self.N.data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00845       start = end
00846       end += 4
00847       (length,) = _struct_I.unpack(str[start:end])
00848       pattern = '<%sd'%length
00849       start = end
00850       end += struct.calcsize(pattern)
00851       self.J_singular_values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00852       _x = self
00853       start = end
00854       end += 48
00855       (_x.df, _x.dx, _x.Df, _x.Dx, _x.stiffness, _x.compliance,) = _struct_6d.unpack(str[start:end])
00856       return self
00857     except struct.error as e:
00858       raise genpy.DeserializationError(e) #most likely buffer underfill
00859 
00860 _struct_I = genpy.struct_I
00861 _struct_6d = struct.Struct("<6d")
00862 _struct_2I = struct.Struct("<2I")
00863 _struct_3I = struct.Struct("<3I")
00864 _struct_7d3I = struct.Struct("<7d3I")
00865 _struct_31d = struct.Struct("<31d")


pr2_manipulation_controllers
Author(s): Kaijen Hsiao, Stu Glaser, Adam Leeper
autogenerated on Mon Oct 6 2014 12:10:46