_JTCartesianControllerState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from robot_mechanism_controllers/JTCartesianControllerState.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 JTCartesianControllerState(genpy.Message):
00011   _md5sum = "6ecdaa599ea0d27643819ae4cd4c43d0"
00012   _type = "robot_mechanism_controllers/JTCartesianControllerState"
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[] tau_pose
00023 float64[] tau_posture
00024 float64[] tau
00025 std_msgs/Float64MultiArray J
00026 std_msgs/Float64MultiArray N
00027 
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data 
00032 # in a particular coordinate frame.
00033 # 
00034 # sequence ID: consecutively increasing ID 
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045 
00046 ================================================================================
00047 MSG: geometry_msgs/PoseStamped
00048 # A Pose with reference coordinate frame and timestamp
00049 Header header
00050 Pose pose
00051 
00052 ================================================================================
00053 MSG: geometry_msgs/Pose
00054 # A representation of pose in free space, composed of postion and orientation. 
00055 Point position
00056 Quaternion orientation
00057 
00058 ================================================================================
00059 MSG: geometry_msgs/Point
00060 # This contains the position of a point in free space
00061 float64 x
00062 float64 y
00063 float64 z
00064 
00065 ================================================================================
00066 MSG: geometry_msgs/Quaternion
00067 # This represents an orientation in free space in quaternion form.
00068 
00069 float64 x
00070 float64 y
00071 float64 z
00072 float64 w
00073 
00074 ================================================================================
00075 MSG: geometry_msgs/Twist
00076 # This expresses velocity in free space broken into its linear and angular parts.
00077 Vector3  linear
00078 Vector3  angular
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/Wrench
00089 # This represents force in free space, separated into
00090 # its linear and angular parts.
00091 Vector3  force
00092 Vector3  torque
00093 
00094 ================================================================================
00095 MSG: std_msgs/Float64MultiArray
00096 # Please look at the MultiArrayLayout message definition for
00097 # documentation on all multiarrays.
00098 
00099 MultiArrayLayout  layout        # specification of data layout
00100 float64[]         data          # array of data
00101 
00102 
00103 ================================================================================
00104 MSG: std_msgs/MultiArrayLayout
00105 # The multiarray declares a generic multi-dimensional array of a
00106 # particular data type.  Dimensions are ordered from outer most
00107 # to inner most.
00108 
00109 MultiArrayDimension[] dim # Array of dimension properties
00110 uint32 data_offset        # padding bytes at front of data
00111 
00112 # Accessors should ALWAYS be written in terms of dimension stride
00113 # and specified outer-most dimension first.
00114 # 
00115 # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
00116 #
00117 # A standard, 3-channel 640x480 image with interleaved color channels
00118 # would be specified as:
00119 #
00120 # dim[0].label  = "height"
00121 # dim[0].size   = 480
00122 # dim[0].stride = 3*640*480 = 921600  (note dim[0] stride is just size of image)
00123 # dim[1].label  = "width"
00124 # dim[1].size   = 640
00125 # dim[1].stride = 3*640 = 1920
00126 # dim[2].label  = "channel"
00127 # dim[2].size   = 3
00128 # dim[2].stride = 3
00129 #
00130 # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
00131 ================================================================================
00132 MSG: std_msgs/MultiArrayDimension
00133 string label   # label of given dimension
00134 uint32 size    # size of given dimension (in type units)
00135 uint32 stride  # stride of given dimension
00136 """
00137   __slots__ = ['header','x','x_desi','x_desi_filtered','x_err','xd','xd_desi','F','tau_pose','tau_posture','tau','J','N']
00138   _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[]','std_msgs/Float64MultiArray','std_msgs/Float64MultiArray']
00139 
00140   def __init__(self, *args, **kwds):
00141     """
00142     Constructor. Any message fields that are implicitly/explicitly
00143     set to None will be assigned a default value. The recommend
00144     use is keyword arguments as this is more robust to future message
00145     changes.  You cannot mix in-order arguments and keyword arguments.
00146 
00147     The available fields are:
00148        header,x,x_desi,x_desi_filtered,x_err,xd,xd_desi,F,tau_pose,tau_posture,tau,J,N
00149 
00150     :param args: complete set of field values, in .msg order
00151     :param kwds: use keyword arguments corresponding to message field names
00152     to set specific fields.
00153     """
00154     if args or kwds:
00155       super(JTCartesianControllerState, self).__init__(*args, **kwds)
00156       #message fields cannot be None, assign default values for those that are
00157       if self.header is None:
00158         self.header = std_msgs.msg.Header()
00159       if self.x is None:
00160         self.x = geometry_msgs.msg.PoseStamped()
00161       if self.x_desi is None:
00162         self.x_desi = geometry_msgs.msg.PoseStamped()
00163       if self.x_desi_filtered is None:
00164         self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00165       if self.x_err is None:
00166         self.x_err = geometry_msgs.msg.Twist()
00167       if self.xd is None:
00168         self.xd = geometry_msgs.msg.Twist()
00169       if self.xd_desi is None:
00170         self.xd_desi = geometry_msgs.msg.Twist()
00171       if self.F is None:
00172         self.F = geometry_msgs.msg.Wrench()
00173       if self.tau_pose is None:
00174         self.tau_pose = []
00175       if self.tau_posture is None:
00176         self.tau_posture = []
00177       if self.tau is None:
00178         self.tau = []
00179       if self.J is None:
00180         self.J = std_msgs.msg.Float64MultiArray()
00181       if self.N is None:
00182         self.N = std_msgs.msg.Float64MultiArray()
00183     else:
00184       self.header = std_msgs.msg.Header()
00185       self.x = geometry_msgs.msg.PoseStamped()
00186       self.x_desi = geometry_msgs.msg.PoseStamped()
00187       self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00188       self.x_err = geometry_msgs.msg.Twist()
00189       self.xd = geometry_msgs.msg.Twist()
00190       self.xd_desi = geometry_msgs.msg.Twist()
00191       self.F = geometry_msgs.msg.Wrench()
00192       self.tau_pose = []
00193       self.tau_posture = []
00194       self.tau = []
00195       self.J = std_msgs.msg.Float64MultiArray()
00196       self.N = std_msgs.msg.Float64MultiArray()
00197 
00198   def _get_types(self):
00199     """
00200     internal API method
00201     """
00202     return self._slot_types
00203 
00204   def serialize(self, buff):
00205     """
00206     serialize message into buffer
00207     :param buff: buffer, ``StringIO``
00208     """
00209     try:
00210       _x = self
00211       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00212       _x = self.header.frame_id
00213       length = len(_x)
00214       if python3 or type(_x) == unicode:
00215         _x = _x.encode('utf-8')
00216         length = len(_x)
00217       buff.write(struct.pack('<I%ss'%length, length, _x))
00218       _x = self
00219       buff.write(_struct_3I.pack(_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs))
00220       _x = self.x.header.frame_id
00221       length = len(_x)
00222       if python3 or type(_x) == unicode:
00223         _x = _x.encode('utf-8')
00224         length = len(_x)
00225       buff.write(struct.pack('<I%ss'%length, length, _x))
00226       _x = self
00227       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))
00228       _x = self.x_desi.header.frame_id
00229       length = len(_x)
00230       if python3 or type(_x) == unicode:
00231         _x = _x.encode('utf-8')
00232         length = len(_x)
00233       buff.write(struct.pack('<I%ss'%length, length, _x))
00234       _x = self
00235       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))
00236       _x = self.x_desi_filtered.header.frame_id
00237       length = len(_x)
00238       if python3 or type(_x) == unicode:
00239         _x = _x.encode('utf-8')
00240         length = len(_x)
00241       buff.write(struct.pack('<I%ss'%length, length, _x))
00242       _x = self
00243       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))
00244       length = len(self.tau_pose)
00245       buff.write(_struct_I.pack(length))
00246       pattern = '<%sd'%length
00247       buff.write(struct.pack(pattern, *self.tau_pose))
00248       length = len(self.tau_posture)
00249       buff.write(_struct_I.pack(length))
00250       pattern = '<%sd'%length
00251       buff.write(struct.pack(pattern, *self.tau_posture))
00252       length = len(self.tau)
00253       buff.write(_struct_I.pack(length))
00254       pattern = '<%sd'%length
00255       buff.write(struct.pack(pattern, *self.tau))
00256       length = len(self.J.layout.dim)
00257       buff.write(_struct_I.pack(length))
00258       for val1 in self.J.layout.dim:
00259         _x = val1.label
00260         length = len(_x)
00261         if python3 or type(_x) == unicode:
00262           _x = _x.encode('utf-8')
00263           length = len(_x)
00264         buff.write(struct.pack('<I%ss'%length, length, _x))
00265         _x = val1
00266         buff.write(_struct_2I.pack(_x.size, _x.stride))
00267       buff.write(_struct_I.pack(self.J.layout.data_offset))
00268       length = len(self.J.data)
00269       buff.write(_struct_I.pack(length))
00270       pattern = '<%sd'%length
00271       buff.write(struct.pack(pattern, *self.J.data))
00272       length = len(self.N.layout.dim)
00273       buff.write(_struct_I.pack(length))
00274       for val1 in self.N.layout.dim:
00275         _x = val1.label
00276         length = len(_x)
00277         if python3 or type(_x) == unicode:
00278           _x = _x.encode('utf-8')
00279           length = len(_x)
00280         buff.write(struct.pack('<I%ss'%length, length, _x))
00281         _x = val1
00282         buff.write(_struct_2I.pack(_x.size, _x.stride))
00283       buff.write(_struct_I.pack(self.N.layout.data_offset))
00284       length = len(self.N.data)
00285       buff.write(_struct_I.pack(length))
00286       pattern = '<%sd'%length
00287       buff.write(struct.pack(pattern, *self.N.data))
00288     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00289     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00290 
00291   def deserialize(self, str):
00292     """
00293     unpack serialized message in str into this message instance
00294     :param str: byte array of serialized message, ``str``
00295     """
00296     try:
00297       if self.header is None:
00298         self.header = std_msgs.msg.Header()
00299       if self.x is None:
00300         self.x = geometry_msgs.msg.PoseStamped()
00301       if self.x_desi is None:
00302         self.x_desi = geometry_msgs.msg.PoseStamped()
00303       if self.x_desi_filtered is None:
00304         self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00305       if self.x_err is None:
00306         self.x_err = geometry_msgs.msg.Twist()
00307       if self.xd is None:
00308         self.xd = geometry_msgs.msg.Twist()
00309       if self.xd_desi is None:
00310         self.xd_desi = geometry_msgs.msg.Twist()
00311       if self.F is None:
00312         self.F = geometry_msgs.msg.Wrench()
00313       if self.J is None:
00314         self.J = std_msgs.msg.Float64MultiArray()
00315       if self.N is None:
00316         self.N = std_msgs.msg.Float64MultiArray()
00317       end = 0
00318       _x = self
00319       start = end
00320       end += 12
00321       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00322       start = end
00323       end += 4
00324       (length,) = _struct_I.unpack(str[start:end])
00325       start = end
00326       end += length
00327       if python3:
00328         self.header.frame_id = str[start:end].decode('utf-8')
00329       else:
00330         self.header.frame_id = str[start:end]
00331       _x = self
00332       start = end
00333       end += 12
00334       (_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00335       start = end
00336       end += 4
00337       (length,) = _struct_I.unpack(str[start:end])
00338       start = end
00339       end += length
00340       if python3:
00341         self.x.header.frame_id = str[start:end].decode('utf-8')
00342       else:
00343         self.x.header.frame_id = str[start:end]
00344       _x = self
00345       start = end
00346       end += 68
00347       (_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])
00348       start = end
00349       end += 4
00350       (length,) = _struct_I.unpack(str[start:end])
00351       start = end
00352       end += length
00353       if python3:
00354         self.x_desi.header.frame_id = str[start:end].decode('utf-8')
00355       else:
00356         self.x_desi.header.frame_id = str[start:end]
00357       _x = self
00358       start = end
00359       end += 68
00360       (_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])
00361       start = end
00362       end += 4
00363       (length,) = _struct_I.unpack(str[start:end])
00364       start = end
00365       end += length
00366       if python3:
00367         self.x_desi_filtered.header.frame_id = str[start:end].decode('utf-8')
00368       else:
00369         self.x_desi_filtered.header.frame_id = str[start:end]
00370       _x = self
00371       start = end
00372       end += 248
00373       (_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])
00374       start = end
00375       end += 4
00376       (length,) = _struct_I.unpack(str[start:end])
00377       pattern = '<%sd'%length
00378       start = end
00379       end += struct.calcsize(pattern)
00380       self.tau_pose = struct.unpack(pattern, str[start:end])
00381       start = end
00382       end += 4
00383       (length,) = _struct_I.unpack(str[start:end])
00384       pattern = '<%sd'%length
00385       start = end
00386       end += struct.calcsize(pattern)
00387       self.tau_posture = struct.unpack(pattern, str[start:end])
00388       start = end
00389       end += 4
00390       (length,) = _struct_I.unpack(str[start:end])
00391       pattern = '<%sd'%length
00392       start = end
00393       end += struct.calcsize(pattern)
00394       self.tau = struct.unpack(pattern, str[start:end])
00395       start = end
00396       end += 4
00397       (length,) = _struct_I.unpack(str[start:end])
00398       self.J.layout.dim = []
00399       for i in range(0, length):
00400         val1 = std_msgs.msg.MultiArrayDimension()
00401         start = end
00402         end += 4
00403         (length,) = _struct_I.unpack(str[start:end])
00404         start = end
00405         end += length
00406         if python3:
00407           val1.label = str[start:end].decode('utf-8')
00408         else:
00409           val1.label = str[start:end]
00410         _x = val1
00411         start = end
00412         end += 8
00413         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00414         self.J.layout.dim.append(val1)
00415       start = end
00416       end += 4
00417       (self.J.layout.data_offset,) = _struct_I.unpack(str[start:end])
00418       start = end
00419       end += 4
00420       (length,) = _struct_I.unpack(str[start:end])
00421       pattern = '<%sd'%length
00422       start = end
00423       end += struct.calcsize(pattern)
00424       self.J.data = struct.unpack(pattern, str[start:end])
00425       start = end
00426       end += 4
00427       (length,) = _struct_I.unpack(str[start:end])
00428       self.N.layout.dim = []
00429       for i in range(0, length):
00430         val1 = std_msgs.msg.MultiArrayDimension()
00431         start = end
00432         end += 4
00433         (length,) = _struct_I.unpack(str[start:end])
00434         start = end
00435         end += length
00436         if python3:
00437           val1.label = str[start:end].decode('utf-8')
00438         else:
00439           val1.label = str[start:end]
00440         _x = val1
00441         start = end
00442         end += 8
00443         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00444         self.N.layout.dim.append(val1)
00445       start = end
00446       end += 4
00447       (self.N.layout.data_offset,) = _struct_I.unpack(str[start:end])
00448       start = end
00449       end += 4
00450       (length,) = _struct_I.unpack(str[start:end])
00451       pattern = '<%sd'%length
00452       start = end
00453       end += struct.calcsize(pattern)
00454       self.N.data = struct.unpack(pattern, str[start:end])
00455       return self
00456     except struct.error as e:
00457       raise genpy.DeserializationError(e) #most likely buffer underfill
00458 
00459 
00460   def serialize_numpy(self, buff, numpy):
00461     """
00462     serialize message with numpy array types into buffer
00463     :param buff: buffer, ``StringIO``
00464     :param numpy: numpy python module
00465     """
00466     try:
00467       _x = self
00468       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00469       _x = self.header.frame_id
00470       length = len(_x)
00471       if python3 or type(_x) == unicode:
00472         _x = _x.encode('utf-8')
00473         length = len(_x)
00474       buff.write(struct.pack('<I%ss'%length, length, _x))
00475       _x = self
00476       buff.write(_struct_3I.pack(_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs))
00477       _x = self.x.header.frame_id
00478       length = len(_x)
00479       if python3 or type(_x) == unicode:
00480         _x = _x.encode('utf-8')
00481         length = len(_x)
00482       buff.write(struct.pack('<I%ss'%length, length, _x))
00483       _x = self
00484       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))
00485       _x = self.x_desi.header.frame_id
00486       length = len(_x)
00487       if python3 or type(_x) == unicode:
00488         _x = _x.encode('utf-8')
00489         length = len(_x)
00490       buff.write(struct.pack('<I%ss'%length, length, _x))
00491       _x = self
00492       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))
00493       _x = self.x_desi_filtered.header.frame_id
00494       length = len(_x)
00495       if python3 or type(_x) == unicode:
00496         _x = _x.encode('utf-8')
00497         length = len(_x)
00498       buff.write(struct.pack('<I%ss'%length, length, _x))
00499       _x = self
00500       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))
00501       length = len(self.tau_pose)
00502       buff.write(_struct_I.pack(length))
00503       pattern = '<%sd'%length
00504       buff.write(self.tau_pose.tostring())
00505       length = len(self.tau_posture)
00506       buff.write(_struct_I.pack(length))
00507       pattern = '<%sd'%length
00508       buff.write(self.tau_posture.tostring())
00509       length = len(self.tau)
00510       buff.write(_struct_I.pack(length))
00511       pattern = '<%sd'%length
00512       buff.write(self.tau.tostring())
00513       length = len(self.J.layout.dim)
00514       buff.write(_struct_I.pack(length))
00515       for val1 in self.J.layout.dim:
00516         _x = val1.label
00517         length = len(_x)
00518         if python3 or type(_x) == unicode:
00519           _x = _x.encode('utf-8')
00520           length = len(_x)
00521         buff.write(struct.pack('<I%ss'%length, length, _x))
00522         _x = val1
00523         buff.write(_struct_2I.pack(_x.size, _x.stride))
00524       buff.write(_struct_I.pack(self.J.layout.data_offset))
00525       length = len(self.J.data)
00526       buff.write(_struct_I.pack(length))
00527       pattern = '<%sd'%length
00528       buff.write(self.J.data.tostring())
00529       length = len(self.N.layout.dim)
00530       buff.write(_struct_I.pack(length))
00531       for val1 in self.N.layout.dim:
00532         _x = val1.label
00533         length = len(_x)
00534         if python3 or type(_x) == unicode:
00535           _x = _x.encode('utf-8')
00536           length = len(_x)
00537         buff.write(struct.pack('<I%ss'%length, length, _x))
00538         _x = val1
00539         buff.write(_struct_2I.pack(_x.size, _x.stride))
00540       buff.write(_struct_I.pack(self.N.layout.data_offset))
00541       length = len(self.N.data)
00542       buff.write(_struct_I.pack(length))
00543       pattern = '<%sd'%length
00544       buff.write(self.N.data.tostring())
00545     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00546     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00547 
00548   def deserialize_numpy(self, str, numpy):
00549     """
00550     unpack serialized message in str into this message instance using numpy for array types
00551     :param str: byte array of serialized message, ``str``
00552     :param numpy: numpy python module
00553     """
00554     try:
00555       if self.header is None:
00556         self.header = std_msgs.msg.Header()
00557       if self.x is None:
00558         self.x = geometry_msgs.msg.PoseStamped()
00559       if self.x_desi is None:
00560         self.x_desi = geometry_msgs.msg.PoseStamped()
00561       if self.x_desi_filtered is None:
00562         self.x_desi_filtered = geometry_msgs.msg.PoseStamped()
00563       if self.x_err is None:
00564         self.x_err = geometry_msgs.msg.Twist()
00565       if self.xd is None:
00566         self.xd = geometry_msgs.msg.Twist()
00567       if self.xd_desi is None:
00568         self.xd_desi = geometry_msgs.msg.Twist()
00569       if self.F is None:
00570         self.F = geometry_msgs.msg.Wrench()
00571       if self.J is None:
00572         self.J = std_msgs.msg.Float64MultiArray()
00573       if self.N is None:
00574         self.N = std_msgs.msg.Float64MultiArray()
00575       end = 0
00576       _x = self
00577       start = end
00578       end += 12
00579       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00580       start = end
00581       end += 4
00582       (length,) = _struct_I.unpack(str[start:end])
00583       start = end
00584       end += length
00585       if python3:
00586         self.header.frame_id = str[start:end].decode('utf-8')
00587       else:
00588         self.header.frame_id = str[start:end]
00589       _x = self
00590       start = end
00591       end += 12
00592       (_x.x.header.seq, _x.x.header.stamp.secs, _x.x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00593       start = end
00594       end += 4
00595       (length,) = _struct_I.unpack(str[start:end])
00596       start = end
00597       end += length
00598       if python3:
00599         self.x.header.frame_id = str[start:end].decode('utf-8')
00600       else:
00601         self.x.header.frame_id = str[start:end]
00602       _x = self
00603       start = end
00604       end += 68
00605       (_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])
00606       start = end
00607       end += 4
00608       (length,) = _struct_I.unpack(str[start:end])
00609       start = end
00610       end += length
00611       if python3:
00612         self.x_desi.header.frame_id = str[start:end].decode('utf-8')
00613       else:
00614         self.x_desi.header.frame_id = str[start:end]
00615       _x = self
00616       start = end
00617       end += 68
00618       (_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])
00619       start = end
00620       end += 4
00621       (length,) = _struct_I.unpack(str[start:end])
00622       start = end
00623       end += length
00624       if python3:
00625         self.x_desi_filtered.header.frame_id = str[start:end].decode('utf-8')
00626       else:
00627         self.x_desi_filtered.header.frame_id = str[start:end]
00628       _x = self
00629       start = end
00630       end += 248
00631       (_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])
00632       start = end
00633       end += 4
00634       (length,) = _struct_I.unpack(str[start:end])
00635       pattern = '<%sd'%length
00636       start = end
00637       end += struct.calcsize(pattern)
00638       self.tau_pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00639       start = end
00640       end += 4
00641       (length,) = _struct_I.unpack(str[start:end])
00642       pattern = '<%sd'%length
00643       start = end
00644       end += struct.calcsize(pattern)
00645       self.tau_posture = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00646       start = end
00647       end += 4
00648       (length,) = _struct_I.unpack(str[start:end])
00649       pattern = '<%sd'%length
00650       start = end
00651       end += struct.calcsize(pattern)
00652       self.tau = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00653       start = end
00654       end += 4
00655       (length,) = _struct_I.unpack(str[start:end])
00656       self.J.layout.dim = []
00657       for i in range(0, length):
00658         val1 = std_msgs.msg.MultiArrayDimension()
00659         start = end
00660         end += 4
00661         (length,) = _struct_I.unpack(str[start:end])
00662         start = end
00663         end += length
00664         if python3:
00665           val1.label = str[start:end].decode('utf-8')
00666         else:
00667           val1.label = str[start:end]
00668         _x = val1
00669         start = end
00670         end += 8
00671         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00672         self.J.layout.dim.append(val1)
00673       start = end
00674       end += 4
00675       (self.J.layout.data_offset,) = _struct_I.unpack(str[start:end])
00676       start = end
00677       end += 4
00678       (length,) = _struct_I.unpack(str[start:end])
00679       pattern = '<%sd'%length
00680       start = end
00681       end += struct.calcsize(pattern)
00682       self.J.data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00683       start = end
00684       end += 4
00685       (length,) = _struct_I.unpack(str[start:end])
00686       self.N.layout.dim = []
00687       for i in range(0, length):
00688         val1 = std_msgs.msg.MultiArrayDimension()
00689         start = end
00690         end += 4
00691         (length,) = _struct_I.unpack(str[start:end])
00692         start = end
00693         end += length
00694         if python3:
00695           val1.label = str[start:end].decode('utf-8')
00696         else:
00697           val1.label = str[start:end]
00698         _x = val1
00699         start = end
00700         end += 8
00701         (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00702         self.N.layout.dim.append(val1)
00703       start = end
00704       end += 4
00705       (self.N.layout.data_offset,) = _struct_I.unpack(str[start:end])
00706       start = end
00707       end += 4
00708       (length,) = _struct_I.unpack(str[start:end])
00709       pattern = '<%sd'%length
00710       start = end
00711       end += struct.calcsize(pattern)
00712       self.N.data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00713       return self
00714     except struct.error as e:
00715       raise genpy.DeserializationError(e) #most likely buffer underfill
00716 
00717 _struct_I = genpy.struct_I
00718 _struct_3I = struct.Struct("<3I")
00719 _struct_7d3I = struct.Struct("<7d3I")
00720 _struct_2I = struct.Struct("<2I")
00721 _struct_31d = struct.Struct("<31d")


robot_mechanism_controllers
Author(s): John Hsu, Melonee Wise, Stuart Glaser
autogenerated on Thu Apr 24 2014 15:44:43