00001 """autogenerated by genpy from ee_cart_imped_msgs/EECartImpedResult.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 EECartImpedResult(genpy.Message):
00013 _md5sum = "947387aff8267ef3d7c884c07783eb7d"
00014 _type = "ee_cart_imped_msgs/EECartImpedResult"
00015 _has_header = True
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 #result definition
00018 #whether it was successful
00019 #the pose and force we ended with
00020 Header header
00021 bool success
00022 ee_cart_imped_msgs/StiffPoint desired
00023 geometry_msgs/Pose actual_pose
00024 float64 effort_sq_error
00025
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data
00030 # in a particular coordinate frame.
00031 #
00032 # sequence ID: consecutively increasing ID
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043
00044 ================================================================================
00045 MSG: ee_cart_imped_msgs/StiffPoint
00046 Header header
00047 #The pose to achieve in the stiffness directions
00048 geometry_msgs/Pose pose
00049 #Wrench or stiffness for each dimension
00050 geometry_msgs/Wrench wrench_or_stiffness
00051 #The following are True if a force/torque should
00052 #be exerted and False if a stiffness should be used.
00053 bool isForceX
00054 bool isForceY
00055 bool isForceZ
00056 bool isTorqueX
00057 bool isTorqueY
00058 bool isTorqueZ
00059 #The time from the start of the trajectory that this
00060 #point should be achieved.
00061 duration time_from_start
00062 ================================================================================
00063 MSG: geometry_msgs/Pose
00064 # A representation of pose in free space, composed of postion and orientation.
00065 Point position
00066 Quaternion orientation
00067
00068 ================================================================================
00069 MSG: geometry_msgs/Point
00070 # This contains the position of a point in free space
00071 float64 x
00072 float64 y
00073 float64 z
00074
00075 ================================================================================
00076 MSG: geometry_msgs/Quaternion
00077 # This represents an orientation in free space in quaternion form.
00078
00079 float64 x
00080 float64 y
00081 float64 z
00082 float64 w
00083
00084 ================================================================================
00085 MSG: geometry_msgs/Wrench
00086 # This represents force in free space, seperated into
00087 # it's linear and angular parts.
00088 Vector3 force
00089 Vector3 torque
00090
00091 ================================================================================
00092 MSG: geometry_msgs/Vector3
00093 # This represents a vector in free space.
00094
00095 float64 x
00096 float64 y
00097 float64 z
00098 """
00099 __slots__ = ['header','success','desired','actual_pose','effort_sq_error']
00100 _slot_types = ['std_msgs/Header','bool','ee_cart_imped_msgs/StiffPoint','geometry_msgs/Pose','float64']
00101
00102 def __init__(self, *args, **kwds):
00103 """
00104 Constructor. Any message fields that are implicitly/explicitly
00105 set to None will be assigned a default value. The recommend
00106 use is keyword arguments as this is more robust to future message
00107 changes. You cannot mix in-order arguments and keyword arguments.
00108
00109 The available fields are:
00110 header,success,desired,actual_pose,effort_sq_error
00111
00112 :param args: complete set of field values, in .msg order
00113 :param kwds: use keyword arguments corresponding to message field names
00114 to set specific fields.
00115 """
00116 if args or kwds:
00117 super(EECartImpedResult, self).__init__(*args, **kwds)
00118
00119 if self.header is None:
00120 self.header = std_msgs.msg.Header()
00121 if self.success is None:
00122 self.success = False
00123 if self.desired is None:
00124 self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00125 if self.actual_pose is None:
00126 self.actual_pose = geometry_msgs.msg.Pose()
00127 if self.effort_sq_error is None:
00128 self.effort_sq_error = 0.
00129 else:
00130 self.header = std_msgs.msg.Header()
00131 self.success = False
00132 self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00133 self.actual_pose = geometry_msgs.msg.Pose()
00134 self.effort_sq_error = 0.
00135
00136 def _get_types(self):
00137 """
00138 internal API method
00139 """
00140 return self._slot_types
00141
00142 def serialize(self, buff):
00143 """
00144 serialize message into buffer
00145 :param buff: buffer, ``StringIO``
00146 """
00147 try:
00148 _x = self
00149 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00150 _x = self.header.frame_id
00151 length = len(_x)
00152 if python3 or type(_x) == unicode:
00153 _x = _x.encode('utf-8')
00154 length = len(_x)
00155 buff.write(struct.pack('<I%ss'%length, length, _x))
00156 _x = self
00157 buff.write(_struct_B3I.pack(_x.success, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs))
00158 _x = self.desired.header.frame_id
00159 length = len(_x)
00160 if python3 or type(_x) == unicode:
00161 _x = _x.encode('utf-8')
00162 length = len(_x)
00163 buff.write(struct.pack('<I%ss'%length, length, _x))
00164 _x = self
00165 buff.write(_struct_13d6B2i8d.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.position.x, _x.actual_pose.position.y, _x.actual_pose.position.z, _x.actual_pose.orientation.x, _x.actual_pose.orientation.y, _x.actual_pose.orientation.z, _x.actual_pose.orientation.w, _x.effort_sq_error))
00166 except struct.error as se: self._check_types(se)
00167 except TypeError as te: self._check_types(te)
00168
00169 def deserialize(self, str):
00170 """
00171 unpack serialized message in str into this message instance
00172 :param str: byte array of serialized message, ``str``
00173 """
00174 try:
00175 if self.header is None:
00176 self.header = std_msgs.msg.Header()
00177 if self.desired is None:
00178 self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00179 if self.actual_pose is None:
00180 self.actual_pose = geometry_msgs.msg.Pose()
00181 end = 0
00182 _x = self
00183 start = end
00184 end += 12
00185 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00186 start = end
00187 end += 4
00188 (length,) = _struct_I.unpack(str[start:end])
00189 start = end
00190 end += length
00191 if python3:
00192 self.header.frame_id = str[start:end].decode('utf-8')
00193 else:
00194 self.header.frame_id = str[start:end]
00195 _x = self
00196 start = end
00197 end += 13
00198 (_x.success, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00199 self.success = bool(self.success)
00200 start = end
00201 end += 4
00202 (length,) = _struct_I.unpack(str[start:end])
00203 start = end
00204 end += length
00205 if python3:
00206 self.desired.header.frame_id = str[start:end].decode('utf-8')
00207 else:
00208 self.desired.header.frame_id = str[start:end]
00209 _x = self
00210 start = end
00211 end += 182
00212 (_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.position.x, _x.actual_pose.position.y, _x.actual_pose.position.z, _x.actual_pose.orientation.x, _x.actual_pose.orientation.y, _x.actual_pose.orientation.z, _x.actual_pose.orientation.w, _x.effort_sq_error,) = _struct_13d6B2i8d.unpack(str[start:end])
00213 self.desired.isForceX = bool(self.desired.isForceX)
00214 self.desired.isForceY = bool(self.desired.isForceY)
00215 self.desired.isForceZ = bool(self.desired.isForceZ)
00216 self.desired.isTorqueX = bool(self.desired.isTorqueX)
00217 self.desired.isTorqueY = bool(self.desired.isTorqueY)
00218 self.desired.isTorqueZ = bool(self.desired.isTorqueZ)
00219 return self
00220 except struct.error as e:
00221 raise genpy.DeserializationError(e)
00222
00223
00224 def serialize_numpy(self, buff, numpy):
00225 """
00226 serialize message with numpy array types into buffer
00227 :param buff: buffer, ``StringIO``
00228 :param numpy: numpy python module
00229 """
00230 try:
00231 _x = self
00232 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00233 _x = self.header.frame_id
00234 length = len(_x)
00235 if python3 or type(_x) == unicode:
00236 _x = _x.encode('utf-8')
00237 length = len(_x)
00238 buff.write(struct.pack('<I%ss'%length, length, _x))
00239 _x = self
00240 buff.write(_struct_B3I.pack(_x.success, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs))
00241 _x = self.desired.header.frame_id
00242 length = len(_x)
00243 if python3 or type(_x) == unicode:
00244 _x = _x.encode('utf-8')
00245 length = len(_x)
00246 buff.write(struct.pack('<I%ss'%length, length, _x))
00247 _x = self
00248 buff.write(_struct_13d6B2i8d.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.position.x, _x.actual_pose.position.y, _x.actual_pose.position.z, _x.actual_pose.orientation.x, _x.actual_pose.orientation.y, _x.actual_pose.orientation.z, _x.actual_pose.orientation.w, _x.effort_sq_error))
00249 except struct.error as se: self._check_types(se)
00250 except TypeError as te: self._check_types(te)
00251
00252 def deserialize_numpy(self, str, numpy):
00253 """
00254 unpack serialized message in str into this message instance using numpy for array types
00255 :param str: byte array of serialized message, ``str``
00256 :param numpy: numpy python module
00257 """
00258 try:
00259 if self.header is None:
00260 self.header = std_msgs.msg.Header()
00261 if self.desired is None:
00262 self.desired = ee_cart_imped_msgs.msg.StiffPoint()
00263 if self.actual_pose is None:
00264 self.actual_pose = geometry_msgs.msg.Pose()
00265 end = 0
00266 _x = self
00267 start = end
00268 end += 12
00269 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 start = end
00274 end += length
00275 if python3:
00276 self.header.frame_id = str[start:end].decode('utf-8')
00277 else:
00278 self.header.frame_id = str[start:end]
00279 _x = self
00280 start = end
00281 end += 13
00282 (_x.success, _x.desired.header.seq, _x.desired.header.stamp.secs, _x.desired.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00283 self.success = bool(self.success)
00284 start = end
00285 end += 4
00286 (length,) = _struct_I.unpack(str[start:end])
00287 start = end
00288 end += length
00289 if python3:
00290 self.desired.header.frame_id = str[start:end].decode('utf-8')
00291 else:
00292 self.desired.header.frame_id = str[start:end]
00293 _x = self
00294 start = end
00295 end += 182
00296 (_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.position.x, _x.actual_pose.position.y, _x.actual_pose.position.z, _x.actual_pose.orientation.x, _x.actual_pose.orientation.y, _x.actual_pose.orientation.z, _x.actual_pose.orientation.w, _x.effort_sq_error,) = _struct_13d6B2i8d.unpack(str[start:end])
00297 self.desired.isForceX = bool(self.desired.isForceX)
00298 self.desired.isForceY = bool(self.desired.isForceY)
00299 self.desired.isForceZ = bool(self.desired.isForceZ)
00300 self.desired.isTorqueX = bool(self.desired.isTorqueX)
00301 self.desired.isTorqueY = bool(self.desired.isTorqueY)
00302 self.desired.isTorqueZ = bool(self.desired.isTorqueZ)
00303 return self
00304 except struct.error as e:
00305 raise genpy.DeserializationError(e)
00306
00307 _struct_I = genpy.struct_I
00308 _struct_3I = struct.Struct("<3I")
00309 _struct_B3I = struct.Struct("<B3I")
00310 _struct_13d6B2i8d = struct.Struct("<13d6B2i8d")