_EECartImpedFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ee_cart_imped_msgs/EECartImpedFeedback.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 genpy
00009 import ee_cart_imped_msgs.msg
00010 import std_msgs.msg
00011 
00012 class EECartImpedFeedback(genpy.Message):
00013   _md5sum = "4106b02683301dac2003809bdf610591"
00014   _type = "ee_cart_imped_msgs/EECartImpedFeedback"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 #feedback
00018 #current pose and squared error in force 
00019 #and the running time of this goal so far
00020 Header header
00021 ee_cart_imped_msgs/StiffPoint[] goal
00022 ee_cart_imped_msgs/StiffPoint initial_point
00023 ee_cart_imped_msgs/StiffPoint desired
00024 ee_cart_imped_msgs/StiffPoint actual_pose
00025 float64 effort_sq_error
00026 float64[] requested_joint_efforts
00027 float64[] actual_joint_efforts
00028 duration running_time
00029 
00030 
00031 
00032 ================================================================================
00033 MSG: std_msgs/Header
00034 # Standard metadata for higher-level stamped data types.
00035 # This is generally used to communicate timestamped data 
00036 # in a particular coordinate frame.
00037 # 
00038 # sequence ID: consecutively increasing ID 
00039 uint32 seq
00040 #Two-integer timestamp that is expressed as:
00041 # * stamp.secs: seconds (stamp_secs) since epoch
00042 # * stamp.nsecs: nanoseconds since stamp_secs
00043 # time-handling sugar is provided by the client library
00044 time stamp
00045 #Frame this data is associated with
00046 # 0: no frame
00047 # 1: global frame
00048 string frame_id
00049 
00050 ================================================================================
00051 MSG: ee_cart_imped_msgs/StiffPoint
00052 Header header
00053 #The pose to achieve in the stiffness directions
00054 geometry_msgs/Pose pose
00055 #Wrench or stiffness for each dimension
00056 geometry_msgs/Wrench wrench_or_stiffness
00057 #The following are True if a force/torque should
00058 #be exerted and False if a stiffness should be used.
00059 bool isForceX
00060 bool isForceY
00061 bool isForceZ
00062 bool isTorqueX
00063 bool isTorqueY
00064 bool isTorqueZ
00065 #The time from the start of the trajectory that this
00066 #point should be achieved.
00067 duration time_from_start
00068 ================================================================================
00069 MSG: geometry_msgs/Pose
00070 # A representation of pose in free space, composed of postion and orientation. 
00071 Point position
00072 Quaternion orientation
00073 
00074 ================================================================================
00075 MSG: geometry_msgs/Point
00076 # This contains the position of a point in free space
00077 float64 x
00078 float64 y
00079 float64 z
00080 
00081 ================================================================================
00082 MSG: geometry_msgs/Quaternion
00083 # This represents an orientation in free space in quaternion form.
00084 
00085 float64 x
00086 float64 y
00087 float64 z
00088 float64 w
00089 
00090 ================================================================================
00091 MSG: geometry_msgs/Wrench
00092 # This represents force in free space, seperated into 
00093 # it's linear and angular parts.  
00094 Vector3  force
00095 Vector3  torque
00096 
00097 ================================================================================
00098 MSG: geometry_msgs/Vector3
00099 # This represents a vector in free space. 
00100 
00101 float64 x
00102 float64 y
00103 float64 z
00104 """
00105   __slots__ = ['header','goal','initial_point','desired','actual_pose','effort_sq_error','requested_joint_efforts','actual_joint_efforts','running_time']
00106   _slot_types = ['std_msgs/Header','ee_cart_imped_msgs/StiffPoint[]','ee_cart_imped_msgs/StiffPoint','ee_cart_imped_msgs/StiffPoint','ee_cart_imped_msgs/StiffPoint','float64','float64[]','float64[]','duration']
00107 
00108   def __init__(self, *args, **kwds):
00109     """
00110     Constructor. Any message fields that are implicitly/explicitly
00111     set to None will be assigned a default value. The recommend
00112     use is keyword arguments as this is more robust to future message
00113     changes.  You cannot mix in-order arguments and keyword arguments.
00114 
00115     The available fields are:
00116        header,goal,initial_point,desired,actual_pose,effort_sq_error,requested_joint_efforts,actual_joint_efforts,running_time
00117 
00118     :param args: complete set of field values, in .msg order
00119     :param kwds: use keyword arguments corresponding to message field names
00120     to set specific fields.
00121     """
00122     if args or kwds:
00123       super(EECartImpedFeedback, self).__init__(*args, **kwds)
00124       #message fields cannot be None, assign default values for those that are
00125       if self.header is None:
00126         self.header = std_msgs.msg.Header()
00127       if self.goal is None:
00128         self.goal = []
00129       if self.initial_point is None:
00130         self.initial_point = ee_cart_imped_msgs.msg.StiffPoint()
00131       if self.desired is None:
00132         self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00133       if self.actual_pose is None:
00134         self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint()
00135       if self.effort_sq_error is None:
00136         self.effort_sq_error = 0.
00137       if self.requested_joint_efforts is None:
00138         self.requested_joint_efforts = []
00139       if self.actual_joint_efforts is None:
00140         self.actual_joint_efforts = []
00141       if self.running_time is None:
00142         self.running_time = genpy.Duration()
00143     else:
00144       self.header = std_msgs.msg.Header()
00145       self.goal = []
00146       self.initial_point = ee_cart_imped_msgs.msg.StiffPoint()
00147       self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00148       self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint()
00149       self.effort_sq_error = 0.
00150       self.requested_joint_efforts = []
00151       self.actual_joint_efforts = []
00152       self.running_time = genpy.Duration()
00153 
00154   def _get_types(self):
00155     """
00156     internal API method
00157     """
00158     return self._slot_types
00159 
00160   def serialize(self, buff):
00161     """
00162     serialize message into buffer
00163     :param buff: buffer, ``StringIO``
00164     """
00165     try:
00166       _x = self
00167       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00168       _x = self.header.frame_id
00169       length = len(_x)
00170       if python3 or type(_x) == unicode:
00171         _x = _x.encode('utf-8')
00172         length = len(_x)
00173       buff.write(struct.pack('<I%ss'%length, length, _x))
00174       length = len(self.goal)
00175       buff.write(_struct_I.pack(length))
00176       for val1 in self.goal:
00177         _v1 = val1.header
00178         buff.write(_struct_I.pack(_v1.seq))
00179         _v2 = _v1.stamp
00180         _x = _v2
00181         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00182         _x = _v1.frame_id
00183         length = len(_x)
00184         if python3 or type(_x) == unicode:
00185           _x = _x.encode('utf-8')
00186           length = len(_x)
00187         buff.write(struct.pack('<I%ss'%length, length, _x))
00188         _v3 = val1.pose
00189         _v4 = _v3.position
00190         _x = _v4
00191         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00192         _v5 = _v3.orientation
00193         _x = _v5
00194         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00195         _v6 = val1.wrench_or_stiffness
00196         _v7 = _v6.force
00197         _x = _v7
00198         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00199         _v8 = _v6.torque
00200         _x = _v8
00201         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00202         _x = val1
00203         buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ))
00204         _v9 = val1.time_from_start
00205         _x = _v9
00206         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00207       _x = self
00208       buff.write(_struct_3I.pack(_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs))
00209       _x = self.initial_point.header.frame_id
00210       length = len(_x)
00211       if python3 or type(_x) == unicode:
00212         _x = _x.encode('utf-8')
00213         length = len(_x)
00214       buff.write(struct.pack('<I%ss'%length, length, _x))
00215       _x = self
00216       buff.write(_struct_13d6B2i3I.pack(_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs))
00217       _x = self.desired.header.frame_id
00218       length = len(_x)
00219       if python3 or type(_x) == unicode:
00220         _x = _x.encode('utf-8')
00221         length = len(_x)
00222       buff.write(struct.pack('<I%ss'%length, length, _x))
00223       _x = self
00224       buff.write(_struct_13d6B2i3I.pack(_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs))
00225       _x = self.actual_pose.header.frame_id
00226       length = len(_x)
00227       if python3 or type(_x) == unicode:
00228         _x = _x.encode('utf-8')
00229         length = len(_x)
00230       buff.write(struct.pack('<I%ss'%length, length, _x))
00231       _x = self
00232       buff.write(_struct_13d6B2id.pack(_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error))
00233       length = len(self.requested_joint_efforts)
00234       buff.write(_struct_I.pack(length))
00235       pattern = '<%sd'%length
00236       buff.write(struct.pack(pattern, *self.requested_joint_efforts))
00237       length = len(self.actual_joint_efforts)
00238       buff.write(_struct_I.pack(length))
00239       pattern = '<%sd'%length
00240       buff.write(struct.pack(pattern, *self.actual_joint_efforts))
00241       _x = self
00242       buff.write(_struct_2i.pack(_x.running_time.secs, _x.running_time.nsecs))
00243     except struct.error as se: self._check_types(se)
00244     except TypeError as te: self._check_types(te)
00245 
00246   def deserialize(self, str):
00247     """
00248     unpack serialized message in str into this message instance
00249     :param str: byte array of serialized message, ``str``
00250     """
00251     try:
00252       if self.header is None:
00253         self.header = std_msgs.msg.Header()
00254       if self.goal is None:
00255         self.goal = None
00256       if self.initial_point is None:
00257         self.initial_point = ee_cart_imped_msgs.msg.StiffPoint()
00258       if self.desired is None:
00259         self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00260       if self.actual_pose is None:
00261         self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint()
00262       if self.running_time is None:
00263         self.running_time = genpy.Duration()
00264       end = 0
00265       _x = self
00266       start = end
00267       end += 12
00268       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00269       start = end
00270       end += 4
00271       (length,) = _struct_I.unpack(str[start:end])
00272       start = end
00273       end += length
00274       if python3:
00275         self.header.frame_id = str[start:end].decode('utf-8')
00276       else:
00277         self.header.frame_id = str[start:end]
00278       start = end
00279       end += 4
00280       (length,) = _struct_I.unpack(str[start:end])
00281       self.goal = []
00282       for i in range(0, length):
00283         val1 = ee_cart_imped_msgs.msg.StiffPoint()
00284         _v10 = val1.header
00285         start = end
00286         end += 4
00287         (_v10.seq,) = _struct_I.unpack(str[start:end])
00288         _v11 = _v10.stamp
00289         _x = _v11
00290         start = end
00291         end += 8
00292         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00293         start = end
00294         end += 4
00295         (length,) = _struct_I.unpack(str[start:end])
00296         start = end
00297         end += length
00298         if python3:
00299           _v10.frame_id = str[start:end].decode('utf-8')
00300         else:
00301           _v10.frame_id = str[start:end]
00302         _v12 = val1.pose
00303         _v13 = _v12.position
00304         _x = _v13
00305         start = end
00306         end += 24
00307         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00308         _v14 = _v12.orientation
00309         _x = _v14
00310         start = end
00311         end += 32
00312         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00313         _v15 = val1.wrench_or_stiffness
00314         _v16 = _v15.force
00315         _x = _v16
00316         start = end
00317         end += 24
00318         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00319         _v17 = _v15.torque
00320         _x = _v17
00321         start = end
00322         end += 24
00323         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00324         _x = val1
00325         start = end
00326         end += 6
00327         (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end])
00328         val1.isForceX = bool(val1.isForceX)
00329         val1.isForceY = bool(val1.isForceY)
00330         val1.isForceZ = bool(val1.isForceZ)
00331         val1.isTorqueX = bool(val1.isTorqueX)
00332         val1.isTorqueY = bool(val1.isTorqueY)
00333         val1.isTorqueZ = bool(val1.isTorqueZ)
00334         _v18 = val1.time_from_start
00335         _x = _v18
00336         start = end
00337         end += 8
00338         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00339         self.goal.append(val1)
00340       _x = self
00341       start = end
00342       end += 12
00343       (_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00344       start = end
00345       end += 4
00346       (length,) = _struct_I.unpack(str[start:end])
00347       start = end
00348       end += length
00349       if python3:
00350         self.initial_point.header.frame_id = str[start:end].decode('utf-8')
00351       else:
00352         self.initial_point.header.frame_id = str[start:end]
00353       _x = self
00354       start = end
00355       end += 130
00356       (_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end])
00357       self.initial_point.isForceX = bool(self.initial_point.isForceX)
00358       self.initial_point.isForceY = bool(self.initial_point.isForceY)
00359       self.initial_point.isForceZ = bool(self.initial_point.isForceZ)
00360       self.initial_point.isTorqueX = bool(self.initial_point.isTorqueX)
00361       self.initial_point.isTorqueY = bool(self.initial_point.isTorqueY)
00362       self.initial_point.isTorqueZ = bool(self.initial_point.isTorqueZ)
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       start = end
00367       end += length
00368       if python3:
00369         self.desired.header.frame_id = str[start:end].decode('utf-8')
00370       else:
00371         self.desired.header.frame_id = str[start:end]
00372       _x = self
00373       start = end
00374       end += 130
00375       (_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end])
00376       self.desired.isForceX = bool(self.desired.isForceX)
00377       self.desired.isForceY = bool(self.desired.isForceY)
00378       self.desired.isForceZ = bool(self.desired.isForceZ)
00379       self.desired.isTorqueX = bool(self.desired.isTorqueX)
00380       self.desired.isTorqueY = bool(self.desired.isTorqueY)
00381       self.desired.isTorqueZ = bool(self.desired.isTorqueZ)
00382       start = end
00383       end += 4
00384       (length,) = _struct_I.unpack(str[start:end])
00385       start = end
00386       end += length
00387       if python3:
00388         self.actual_pose.header.frame_id = str[start:end].decode('utf-8')
00389       else:
00390         self.actual_pose.header.frame_id = str[start:end]
00391       _x = self
00392       start = end
00393       end += 126
00394       (_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error,) = _struct_13d6B2id.unpack(str[start:end])
00395       self.actual_pose.isForceX = bool(self.actual_pose.isForceX)
00396       self.actual_pose.isForceY = bool(self.actual_pose.isForceY)
00397       self.actual_pose.isForceZ = bool(self.actual_pose.isForceZ)
00398       self.actual_pose.isTorqueX = bool(self.actual_pose.isTorqueX)
00399       self.actual_pose.isTorqueY = bool(self.actual_pose.isTorqueY)
00400       self.actual_pose.isTorqueZ = bool(self.actual_pose.isTorqueZ)
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.requested_joint_efforts = 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.actual_joint_efforts = struct.unpack(pattern, str[start:end])
00415       _x = self
00416       start = end
00417       end += 8
00418       (_x.running_time.secs, _x.running_time.nsecs,) = _struct_2i.unpack(str[start:end])
00419       self.running_time.canon()
00420       return self
00421     except struct.error as e:
00422       raise genpy.DeserializationError(e) #most likely buffer underfill
00423 
00424 
00425   def serialize_numpy(self, buff, numpy):
00426     """
00427     serialize message with numpy array types into buffer
00428     :param buff: buffer, ``StringIO``
00429     :param numpy: numpy python module
00430     """
00431     try:
00432       _x = self
00433       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00434       _x = self.header.frame_id
00435       length = len(_x)
00436       if python3 or type(_x) == unicode:
00437         _x = _x.encode('utf-8')
00438         length = len(_x)
00439       buff.write(struct.pack('<I%ss'%length, length, _x))
00440       length = len(self.goal)
00441       buff.write(_struct_I.pack(length))
00442       for val1 in self.goal:
00443         _v19 = val1.header
00444         buff.write(_struct_I.pack(_v19.seq))
00445         _v20 = _v19.stamp
00446         _x = _v20
00447         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00448         _x = _v19.frame_id
00449         length = len(_x)
00450         if python3 or type(_x) == unicode:
00451           _x = _x.encode('utf-8')
00452           length = len(_x)
00453         buff.write(struct.pack('<I%ss'%length, length, _x))
00454         _v21 = val1.pose
00455         _v22 = _v21.position
00456         _x = _v22
00457         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00458         _v23 = _v21.orientation
00459         _x = _v23
00460         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00461         _v24 = val1.wrench_or_stiffness
00462         _v25 = _v24.force
00463         _x = _v25
00464         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00465         _v26 = _v24.torque
00466         _x = _v26
00467         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00468         _x = val1
00469         buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ))
00470         _v27 = val1.time_from_start
00471         _x = _v27
00472         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00473       _x = self
00474       buff.write(_struct_3I.pack(_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs))
00475       _x = self.initial_point.header.frame_id
00476       length = len(_x)
00477       if python3 or type(_x) == unicode:
00478         _x = _x.encode('utf-8')
00479         length = len(_x)
00480       buff.write(struct.pack('<I%ss'%length, length, _x))
00481       _x = self
00482       buff.write(_struct_13d6B2i3I.pack(_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs))
00483       _x = self.desired.header.frame_id
00484       length = len(_x)
00485       if python3 or type(_x) == unicode:
00486         _x = _x.encode('utf-8')
00487         length = len(_x)
00488       buff.write(struct.pack('<I%ss'%length, length, _x))
00489       _x = self
00490       buff.write(_struct_13d6B2i3I.pack(_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs))
00491       _x = self.actual_pose.header.frame_id
00492       length = len(_x)
00493       if python3 or type(_x) == unicode:
00494         _x = _x.encode('utf-8')
00495         length = len(_x)
00496       buff.write(struct.pack('<I%ss'%length, length, _x))
00497       _x = self
00498       buff.write(_struct_13d6B2id.pack(_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error))
00499       length = len(self.requested_joint_efforts)
00500       buff.write(_struct_I.pack(length))
00501       pattern = '<%sd'%length
00502       buff.write(self.requested_joint_efforts.tostring())
00503       length = len(self.actual_joint_efforts)
00504       buff.write(_struct_I.pack(length))
00505       pattern = '<%sd'%length
00506       buff.write(self.actual_joint_efforts.tostring())
00507       _x = self
00508       buff.write(_struct_2i.pack(_x.running_time.secs, _x.running_time.nsecs))
00509     except struct.error as se: self._check_types(se)
00510     except TypeError as te: self._check_types(te)
00511 
00512   def deserialize_numpy(self, str, numpy):
00513     """
00514     unpack serialized message in str into this message instance using numpy for array types
00515     :param str: byte array of serialized message, ``str``
00516     :param numpy: numpy python module
00517     """
00518     try:
00519       if self.header is None:
00520         self.header = std_msgs.msg.Header()
00521       if self.goal is None:
00522         self.goal = None
00523       if self.initial_point is None:
00524         self.initial_point = ee_cart_imped_msgs.msg.StiffPoint()
00525       if self.desired is None:
00526         self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00527       if self.actual_pose is None:
00528         self.actual_pose = ee_cart_imped_msgs.msg.StiffPoint()
00529       if self.running_time is None:
00530         self.running_time = genpy.Duration()
00531       end = 0
00532       _x = self
00533       start = end
00534       end += 12
00535       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00536       start = end
00537       end += 4
00538       (length,) = _struct_I.unpack(str[start:end])
00539       start = end
00540       end += length
00541       if python3:
00542         self.header.frame_id = str[start:end].decode('utf-8')
00543       else:
00544         self.header.frame_id = str[start:end]
00545       start = end
00546       end += 4
00547       (length,) = _struct_I.unpack(str[start:end])
00548       self.goal = []
00549       for i in range(0, length):
00550         val1 = ee_cart_imped_msgs.msg.StiffPoint()
00551         _v28 = val1.header
00552         start = end
00553         end += 4
00554         (_v28.seq,) = _struct_I.unpack(str[start:end])
00555         _v29 = _v28.stamp
00556         _x = _v29
00557         start = end
00558         end += 8
00559         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00560         start = end
00561         end += 4
00562         (length,) = _struct_I.unpack(str[start:end])
00563         start = end
00564         end += length
00565         if python3:
00566           _v28.frame_id = str[start:end].decode('utf-8')
00567         else:
00568           _v28.frame_id = str[start:end]
00569         _v30 = val1.pose
00570         _v31 = _v30.position
00571         _x = _v31
00572         start = end
00573         end += 24
00574         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00575         _v32 = _v30.orientation
00576         _x = _v32
00577         start = end
00578         end += 32
00579         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00580         _v33 = val1.wrench_or_stiffness
00581         _v34 = _v33.force
00582         _x = _v34
00583         start = end
00584         end += 24
00585         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00586         _v35 = _v33.torque
00587         _x = _v35
00588         start = end
00589         end += 24
00590         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00591         _x = val1
00592         start = end
00593         end += 6
00594         (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end])
00595         val1.isForceX = bool(val1.isForceX)
00596         val1.isForceY = bool(val1.isForceY)
00597         val1.isForceZ = bool(val1.isForceZ)
00598         val1.isTorqueX = bool(val1.isTorqueX)
00599         val1.isTorqueY = bool(val1.isTorqueY)
00600         val1.isTorqueZ = bool(val1.isTorqueZ)
00601         _v36 = val1.time_from_start
00602         _x = _v36
00603         start = end
00604         end += 8
00605         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00606         self.goal.append(val1)
00607       _x = self
00608       start = end
00609       end += 12
00610       (_x.initial_point.header.seq, _x.initial_point.header.stamp.secs, _x.initial_point.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00611       start = end
00612       end += 4
00613       (length,) = _struct_I.unpack(str[start:end])
00614       start = end
00615       end += length
00616       if python3:
00617         self.initial_point.header.frame_id = str[start:end].decode('utf-8')
00618       else:
00619         self.initial_point.header.frame_id = str[start:end]
00620       _x = self
00621       start = end
00622       end += 130
00623       (_x.initial_point.pose.position.x, _x.initial_point.pose.position.y, _x.initial_point.pose.position.z, _x.initial_point.pose.orientation.x, _x.initial_point.pose.orientation.y, _x.initial_point.pose.orientation.z, _x.initial_point.pose.orientation.w, _x.initial_point.wrench_or_stiffness.force.x, _x.initial_point.wrench_or_stiffness.force.y, _x.initial_point.wrench_or_stiffness.force.z, _x.initial_point.wrench_or_stiffness.torque.x, _x.initial_point.wrench_or_stiffness.torque.y, _x.initial_point.wrench_or_stiffness.torque.z, _x.initial_point.isForceX, _x.initial_point.isForceY, _x.initial_point.isForceZ, _x.initial_point.isTorqueX, _x.initial_point.isTorqueY, _x.initial_point.isTorqueZ, _x.initial_point.time_from_start.secs, _x.initial_point.time_from_start.nsecs, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end])
00624       self.initial_point.isForceX = bool(self.initial_point.isForceX)
00625       self.initial_point.isForceY = bool(self.initial_point.isForceY)
00626       self.initial_point.isForceZ = bool(self.initial_point.isForceZ)
00627       self.initial_point.isTorqueX = bool(self.initial_point.isTorqueX)
00628       self.initial_point.isTorqueY = bool(self.initial_point.isTorqueY)
00629       self.initial_point.isTorqueZ = bool(self.initial_point.isTorqueZ)
00630       start = end
00631       end += 4
00632       (length,) = _struct_I.unpack(str[start:end])
00633       start = end
00634       end += length
00635       if python3:
00636         self.desired.header.frame_id = str[start:end].decode('utf-8')
00637       else:
00638         self.desired.header.frame_id = str[start:end]
00639       _x = self
00640       start = end
00641       end += 130
00642       (_x.desired.pose.position.x, _x.desired.pose.position.y, _x.desired.pose.position.z, _x.desired.pose.orientation.x, _x.desired.pose.orientation.y, _x.desired.pose.orientation.z, _x.desired.pose.orientation.w, _x.desired.wrench_or_stiffness.force.x, _x.desired.wrench_or_stiffness.force.y, _x.desired.wrench_or_stiffness.force.z, _x.desired.wrench_or_stiffness.torque.x, _x.desired.wrench_or_stiffness.torque.y, _x.desired.wrench_or_stiffness.torque.z, _x.desired.isForceX, _x.desired.isForceY, _x.desired.isForceZ, _x.desired.isTorqueX, _x.desired.isTorqueY, _x.desired.isTorqueZ, _x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs, _x.actual_pose.header.seq, _x.actual_pose.header.stamp.secs, _x.actual_pose.header.stamp.nsecs,) = _struct_13d6B2i3I.unpack(str[start:end])
00643       self.desired.isForceX = bool(self.desired.isForceX)
00644       self.desired.isForceY = bool(self.desired.isForceY)
00645       self.desired.isForceZ = bool(self.desired.isForceZ)
00646       self.desired.isTorqueX = bool(self.desired.isTorqueX)
00647       self.desired.isTorqueY = bool(self.desired.isTorqueY)
00648       self.desired.isTorqueZ = bool(self.desired.isTorqueZ)
00649       start = end
00650       end += 4
00651       (length,) = _struct_I.unpack(str[start:end])
00652       start = end
00653       end += length
00654       if python3:
00655         self.actual_pose.header.frame_id = str[start:end].decode('utf-8')
00656       else:
00657         self.actual_pose.header.frame_id = str[start:end]
00658       _x = self
00659       start = end
00660       end += 126
00661       (_x.actual_pose.pose.position.x, _x.actual_pose.pose.position.y, _x.actual_pose.pose.position.z, _x.actual_pose.pose.orientation.x, _x.actual_pose.pose.orientation.y, _x.actual_pose.pose.orientation.z, _x.actual_pose.pose.orientation.w, _x.actual_pose.wrench_or_stiffness.force.x, _x.actual_pose.wrench_or_stiffness.force.y, _x.actual_pose.wrench_or_stiffness.force.z, _x.actual_pose.wrench_or_stiffness.torque.x, _x.actual_pose.wrench_or_stiffness.torque.y, _x.actual_pose.wrench_or_stiffness.torque.z, _x.actual_pose.isForceX, _x.actual_pose.isForceY, _x.actual_pose.isForceZ, _x.actual_pose.isTorqueX, _x.actual_pose.isTorqueY, _x.actual_pose.isTorqueZ, _x.actual_pose.time_from_start.secs, _x.actual_pose.time_from_start.nsecs, _x.effort_sq_error,) = _struct_13d6B2id.unpack(str[start:end])
00662       self.actual_pose.isForceX = bool(self.actual_pose.isForceX)
00663       self.actual_pose.isForceY = bool(self.actual_pose.isForceY)
00664       self.actual_pose.isForceZ = bool(self.actual_pose.isForceZ)
00665       self.actual_pose.isTorqueX = bool(self.actual_pose.isTorqueX)
00666       self.actual_pose.isTorqueY = bool(self.actual_pose.isTorqueY)
00667       self.actual_pose.isTorqueZ = bool(self.actual_pose.isTorqueZ)
00668       start = end
00669       end += 4
00670       (length,) = _struct_I.unpack(str[start:end])
00671       pattern = '<%sd'%length
00672       start = end
00673       end += struct.calcsize(pattern)
00674       self.requested_joint_efforts = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00675       start = end
00676       end += 4
00677       (length,) = _struct_I.unpack(str[start:end])
00678       pattern = '<%sd'%length
00679       start = end
00680       end += struct.calcsize(pattern)
00681       self.actual_joint_efforts = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00682       _x = self
00683       start = end
00684       end += 8
00685       (_x.running_time.secs, _x.running_time.nsecs,) = _struct_2i.unpack(str[start:end])
00686       self.running_time.canon()
00687       return self
00688     except struct.error as e:
00689       raise genpy.DeserializationError(e) #most likely buffer underfill
00690 
00691 _struct_I = genpy.struct_I
00692 _struct_6B = struct.Struct("<6B")
00693 _struct_13d6B2id = struct.Struct("<13d6B2id")
00694 _struct_2i = struct.Struct("<2i")
00695 _struct_3I = struct.Struct("<3I")
00696 _struct_13d6B2i3I = struct.Struct("<13d6B2i3I")
00697 _struct_4d = struct.Struct("<4d")
00698 _struct_2I = struct.Struct("<2I")
00699 _struct_3d = struct.Struct("<3d")


ee_cart_imped_msgs
Author(s): Jenny Barry, Mario Bollini, and Huan Liu
autogenerated on Sun Jan 5 2014 11:14:34