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