00001 """autogenerated by genpy from ee_cart_imped_msgs/EECartImpedActionResult.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 ee_cart_imped_msgs.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012
00013 class EECartImpedActionResult(genpy.Message):
00014 _md5sum = "084904f177cd8988e0a7f8680e1e8a21"
00015 _type = "ee_cart_imped_msgs/EECartImpedActionResult"
00016 _has_header = True
00017 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018
00019 Header header
00020 actionlib_msgs/GoalStatus status
00021 EECartImpedResult result
00022
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data
00027 # in a particular coordinate frame.
00028 #
00029 # sequence ID: consecutively increasing ID
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalStatus
00043 GoalID goal_id
00044 uint8 status
00045 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00046 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00047 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00048 # and has since completed its execution (Terminal State)
00049 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00050 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00051 # to some failure (Terminal State)
00052 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00053 # because the goal was unattainable or invalid (Terminal State)
00054 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00055 # and has not yet completed execution
00056 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00057 # but the action server has not yet confirmed that the goal is canceled
00058 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00059 # and was successfully cancelled (Terminal State)
00060 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00061 # sent over the wire by an action server
00062
00063 #Allow for the user to associate a string with GoalStatus for debugging
00064 string text
00065
00066
00067 ================================================================================
00068 MSG: actionlib_msgs/GoalID
00069 # The stamp should store the time at which this goal was requested.
00070 # It is used by an action server when it tries to preempt all
00071 # goals that were requested before a certain time
00072 time stamp
00073
00074 # The id provides a way to associate feedback and
00075 # result message with specific goal requests. The id
00076 # specified must be unique.
00077 string id
00078
00079
00080 ================================================================================
00081 MSG: ee_cart_imped_msgs/EECartImpedResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 #result definition
00084 #whether it was successful
00085 #the pose and force we ended with
00086 Header header
00087 bool success
00088 ee_cart_imped_msgs/StiffPoint desired
00089 geometry_msgs/Pose actual_pose
00090 float64 effort_sq_error
00091
00092 ================================================================================
00093 MSG: ee_cart_imped_msgs/StiffPoint
00094 Header header
00095 #The pose to achieve in the stiffness directions
00096 geometry_msgs/Pose pose
00097 #Wrench or stiffness for each dimension
00098 geometry_msgs/Wrench wrench_or_stiffness
00099 #The following are True if a force/torque should
00100 #be exerted and False if a stiffness should be used.
00101 bool isForceX
00102 bool isForceY
00103 bool isForceZ
00104 bool isTorqueX
00105 bool isTorqueY
00106 bool isTorqueZ
00107 #The time from the start of the trajectory that this
00108 #point should be achieved.
00109 duration time_from_start
00110 ================================================================================
00111 MSG: geometry_msgs/Pose
00112 # A representation of pose in free space, composed of postion and orientation.
00113 Point position
00114 Quaternion orientation
00115
00116 ================================================================================
00117 MSG: geometry_msgs/Point
00118 # This contains the position of a point in free space
00119 float64 x
00120 float64 y
00121 float64 z
00122
00123 ================================================================================
00124 MSG: geometry_msgs/Quaternion
00125 # This represents an orientation in free space in quaternion form.
00126
00127 float64 x
00128 float64 y
00129 float64 z
00130 float64 w
00131
00132 ================================================================================
00133 MSG: geometry_msgs/Wrench
00134 # This represents force in free space, seperated into
00135 # it's linear and angular parts.
00136 Vector3 force
00137 Vector3 torque
00138
00139 ================================================================================
00140 MSG: geometry_msgs/Vector3
00141 # This represents a vector in free space.
00142
00143 float64 x
00144 float64 y
00145 float64 z
00146 """
00147 __slots__ = ['header','status','result']
00148 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','ee_cart_imped_msgs/EECartImpedResult']
00149
00150 def __init__(self, *args, **kwds):
00151 """
00152 Constructor. Any message fields that are implicitly/explicitly
00153 set to None will be assigned a default value. The recommend
00154 use is keyword arguments as this is more robust to future message
00155 changes. You cannot mix in-order arguments and keyword arguments.
00156
00157 The available fields are:
00158 header,status,result
00159
00160 :param args: complete set of field values, in .msg order
00161 :param kwds: use keyword arguments corresponding to message field names
00162 to set specific fields.
00163 """
00164 if args or kwds:
00165 super(EECartImpedActionResult, self).__init__(*args, **kwds)
00166
00167 if self.header is None:
00168 self.header = std_msgs.msg.Header()
00169 if self.status is None:
00170 self.status = actionlib_msgs.msg.GoalStatus()
00171 if self.result is None:
00172 self.result = ee_cart_imped_msgs.msg.EECartImpedResult()
00173 else:
00174 self.header = std_msgs.msg.Header()
00175 self.status = actionlib_msgs.msg.GoalStatus()
00176 self.result = ee_cart_imped_msgs.msg.EECartImpedResult()
00177
00178 def _get_types(self):
00179 """
00180 internal API method
00181 """
00182 return self._slot_types
00183
00184 def serialize(self, buff):
00185 """
00186 serialize message into buffer
00187 :param buff: buffer, ``StringIO``
00188 """
00189 try:
00190 _x = self
00191 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00192 _x = self.header.frame_id
00193 length = len(_x)
00194 if python3 or type(_x) == unicode:
00195 _x = _x.encode('utf-8')
00196 length = len(_x)
00197 buff.write(struct.pack('<I%ss'%length, length, _x))
00198 _x = self
00199 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00200 _x = self.status.goal_id.id
00201 length = len(_x)
00202 if python3 or type(_x) == unicode:
00203 _x = _x.encode('utf-8')
00204 length = len(_x)
00205 buff.write(struct.pack('<I%ss'%length, length, _x))
00206 buff.write(_struct_B.pack(self.status.status))
00207 _x = self.status.text
00208 length = len(_x)
00209 if python3 or type(_x) == unicode:
00210 _x = _x.encode('utf-8')
00211 length = len(_x)
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 _x = self
00214 buff.write(_struct_3I.pack(_x.result.header.seq, _x.result.header.stamp.secs, _x.result.header.stamp.nsecs))
00215 _x = self.result.header.frame_id
00216 length = len(_x)
00217 if python3 or type(_x) == unicode:
00218 _x = _x.encode('utf-8')
00219 length = len(_x)
00220 buff.write(struct.pack('<I%ss'%length, length, _x))
00221 _x = self
00222 buff.write(_struct_B3I.pack(_x.result.success, _x.result.desired.header.seq, _x.result.desired.header.stamp.secs, _x.result.desired.header.stamp.nsecs))
00223 _x = self.result.desired.header.frame_id
00224 length = len(_x)
00225 if python3 or type(_x) == unicode:
00226 _x = _x.encode('utf-8')
00227 length = len(_x)
00228 buff.write(struct.pack('<I%ss'%length, length, _x))
00229 _x = self
00230 buff.write(_struct_13d6B2i8d.pack(_x.result.desired.pose.position.x, _x.result.desired.pose.position.y, _x.result.desired.pose.position.z, _x.result.desired.pose.orientation.x, _x.result.desired.pose.orientation.y, _x.result.desired.pose.orientation.z, _x.result.desired.pose.orientation.w, _x.result.desired.wrench_or_stiffness.force.x, _x.result.desired.wrench_or_stiffness.force.y, _x.result.desired.wrench_or_stiffness.force.z, _x.result.desired.wrench_or_stiffness.torque.x, _x.result.desired.wrench_or_stiffness.torque.y, _x.result.desired.wrench_or_stiffness.torque.z, _x.result.desired.isForceX, _x.result.desired.isForceY, _x.result.desired.isForceZ, _x.result.desired.isTorqueX, _x.result.desired.isTorqueY, _x.result.desired.isTorqueZ, _x.result.desired.time_from_start.secs, _x.result.desired.time_from_start.nsecs, _x.result.actual_pose.position.x, _x.result.actual_pose.position.y, _x.result.actual_pose.position.z, _x.result.actual_pose.orientation.x, _x.result.actual_pose.orientation.y, _x.result.actual_pose.orientation.z, _x.result.actual_pose.orientation.w, _x.result.effort_sq_error))
00231 except struct.error as se: self._check_types(se)
00232 except TypeError as te: self._check_types(te)
00233
00234 def deserialize(self, str):
00235 """
00236 unpack serialized message in str into this message instance
00237 :param str: byte array of serialized message, ``str``
00238 """
00239 try:
00240 if self.header is None:
00241 self.header = std_msgs.msg.Header()
00242 if self.status is None:
00243 self.status = actionlib_msgs.msg.GoalStatus()
00244 if self.result is None:
00245 self.result = ee_cart_imped_msgs.msg.EECartImpedResult()
00246 end = 0
00247 _x = self
00248 start = end
00249 end += 12
00250 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00251 start = end
00252 end += 4
00253 (length,) = _struct_I.unpack(str[start:end])
00254 start = end
00255 end += length
00256 if python3:
00257 self.header.frame_id = str[start:end].decode('utf-8')
00258 else:
00259 self.header.frame_id = str[start:end]
00260 _x = self
00261 start = end
00262 end += 8
00263 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00264 start = end
00265 end += 4
00266 (length,) = _struct_I.unpack(str[start:end])
00267 start = end
00268 end += length
00269 if python3:
00270 self.status.goal_id.id = str[start:end].decode('utf-8')
00271 else:
00272 self.status.goal_id.id = str[start:end]
00273 start = end
00274 end += 1
00275 (self.status.status,) = _struct_B.unpack(str[start:end])
00276 start = end
00277 end += 4
00278 (length,) = _struct_I.unpack(str[start:end])
00279 start = end
00280 end += length
00281 if python3:
00282 self.status.text = str[start:end].decode('utf-8')
00283 else:
00284 self.status.text = str[start:end]
00285 _x = self
00286 start = end
00287 end += 12
00288 (_x.result.header.seq, _x.result.header.stamp.secs, _x.result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00289 start = end
00290 end += 4
00291 (length,) = _struct_I.unpack(str[start:end])
00292 start = end
00293 end += length
00294 if python3:
00295 self.result.header.frame_id = str[start:end].decode('utf-8')
00296 else:
00297 self.result.header.frame_id = str[start:end]
00298 _x = self
00299 start = end
00300 end += 13
00301 (_x.result.success, _x.result.desired.header.seq, _x.result.desired.header.stamp.secs, _x.result.desired.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00302 self.result.success = bool(self.result.success)
00303 start = end
00304 end += 4
00305 (length,) = _struct_I.unpack(str[start:end])
00306 start = end
00307 end += length
00308 if python3:
00309 self.result.desired.header.frame_id = str[start:end].decode('utf-8')
00310 else:
00311 self.result.desired.header.frame_id = str[start:end]
00312 _x = self
00313 start = end
00314 end += 182
00315 (_x.result.desired.pose.position.x, _x.result.desired.pose.position.y, _x.result.desired.pose.position.z, _x.result.desired.pose.orientation.x, _x.result.desired.pose.orientation.y, _x.result.desired.pose.orientation.z, _x.result.desired.pose.orientation.w, _x.result.desired.wrench_or_stiffness.force.x, _x.result.desired.wrench_or_stiffness.force.y, _x.result.desired.wrench_or_stiffness.force.z, _x.result.desired.wrench_or_stiffness.torque.x, _x.result.desired.wrench_or_stiffness.torque.y, _x.result.desired.wrench_or_stiffness.torque.z, _x.result.desired.isForceX, _x.result.desired.isForceY, _x.result.desired.isForceZ, _x.result.desired.isTorqueX, _x.result.desired.isTorqueY, _x.result.desired.isTorqueZ, _x.result.desired.time_from_start.secs, _x.result.desired.time_from_start.nsecs, _x.result.actual_pose.position.x, _x.result.actual_pose.position.y, _x.result.actual_pose.position.z, _x.result.actual_pose.orientation.x, _x.result.actual_pose.orientation.y, _x.result.actual_pose.orientation.z, _x.result.actual_pose.orientation.w, _x.result.effort_sq_error,) = _struct_13d6B2i8d.unpack(str[start:end])
00316 self.result.desired.isForceX = bool(self.result.desired.isForceX)
00317 self.result.desired.isForceY = bool(self.result.desired.isForceY)
00318 self.result.desired.isForceZ = bool(self.result.desired.isForceZ)
00319 self.result.desired.isTorqueX = bool(self.result.desired.isTorqueX)
00320 self.result.desired.isTorqueY = bool(self.result.desired.isTorqueY)
00321 self.result.desired.isTorqueZ = bool(self.result.desired.isTorqueZ)
00322 return self
00323 except struct.error as e:
00324 raise genpy.DeserializationError(e)
00325
00326
00327 def serialize_numpy(self, buff, numpy):
00328 """
00329 serialize message with numpy array types into buffer
00330 :param buff: buffer, ``StringIO``
00331 :param numpy: numpy python module
00332 """
00333 try:
00334 _x = self
00335 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00336 _x = self.header.frame_id
00337 length = len(_x)
00338 if python3 or type(_x) == unicode:
00339 _x = _x.encode('utf-8')
00340 length = len(_x)
00341 buff.write(struct.pack('<I%ss'%length, length, _x))
00342 _x = self
00343 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00344 _x = self.status.goal_id.id
00345 length = len(_x)
00346 if python3 or type(_x) == unicode:
00347 _x = _x.encode('utf-8')
00348 length = len(_x)
00349 buff.write(struct.pack('<I%ss'%length, length, _x))
00350 buff.write(_struct_B.pack(self.status.status))
00351 _x = self.status.text
00352 length = len(_x)
00353 if python3 or type(_x) == unicode:
00354 _x = _x.encode('utf-8')
00355 length = len(_x)
00356 buff.write(struct.pack('<I%ss'%length, length, _x))
00357 _x = self
00358 buff.write(_struct_3I.pack(_x.result.header.seq, _x.result.header.stamp.secs, _x.result.header.stamp.nsecs))
00359 _x = self.result.header.frame_id
00360 length = len(_x)
00361 if python3 or type(_x) == unicode:
00362 _x = _x.encode('utf-8')
00363 length = len(_x)
00364 buff.write(struct.pack('<I%ss'%length, length, _x))
00365 _x = self
00366 buff.write(_struct_B3I.pack(_x.result.success, _x.result.desired.header.seq, _x.result.desired.header.stamp.secs, _x.result.desired.header.stamp.nsecs))
00367 _x = self.result.desired.header.frame_id
00368 length = len(_x)
00369 if python3 or type(_x) == unicode:
00370 _x = _x.encode('utf-8')
00371 length = len(_x)
00372 buff.write(struct.pack('<I%ss'%length, length, _x))
00373 _x = self
00374 buff.write(_struct_13d6B2i8d.pack(_x.result.desired.pose.position.x, _x.result.desired.pose.position.y, _x.result.desired.pose.position.z, _x.result.desired.pose.orientation.x, _x.result.desired.pose.orientation.y, _x.result.desired.pose.orientation.z, _x.result.desired.pose.orientation.w, _x.result.desired.wrench_or_stiffness.force.x, _x.result.desired.wrench_or_stiffness.force.y, _x.result.desired.wrench_or_stiffness.force.z, _x.result.desired.wrench_or_stiffness.torque.x, _x.result.desired.wrench_or_stiffness.torque.y, _x.result.desired.wrench_or_stiffness.torque.z, _x.result.desired.isForceX, _x.result.desired.isForceY, _x.result.desired.isForceZ, _x.result.desired.isTorqueX, _x.result.desired.isTorqueY, _x.result.desired.isTorqueZ, _x.result.desired.time_from_start.secs, _x.result.desired.time_from_start.nsecs, _x.result.actual_pose.position.x, _x.result.actual_pose.position.y, _x.result.actual_pose.position.z, _x.result.actual_pose.orientation.x, _x.result.actual_pose.orientation.y, _x.result.actual_pose.orientation.z, _x.result.actual_pose.orientation.w, _x.result.effort_sq_error))
00375 except struct.error as se: self._check_types(se)
00376 except TypeError as te: self._check_types(te)
00377
00378 def deserialize_numpy(self, str, numpy):
00379 """
00380 unpack serialized message in str into this message instance using numpy for array types
00381 :param str: byte array of serialized message, ``str``
00382 :param numpy: numpy python module
00383 """
00384 try:
00385 if self.header is None:
00386 self.header = std_msgs.msg.Header()
00387 if self.status is None:
00388 self.status = actionlib_msgs.msg.GoalStatus()
00389 if self.result is None:
00390 self.result = ee_cart_imped_msgs.msg.EECartImpedResult()
00391 end = 0
00392 _x = self
00393 start = end
00394 end += 12
00395 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00396 start = end
00397 end += 4
00398 (length,) = _struct_I.unpack(str[start:end])
00399 start = end
00400 end += length
00401 if python3:
00402 self.header.frame_id = str[start:end].decode('utf-8')
00403 else:
00404 self.header.frame_id = str[start:end]
00405 _x = self
00406 start = end
00407 end += 8
00408 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00409 start = end
00410 end += 4
00411 (length,) = _struct_I.unpack(str[start:end])
00412 start = end
00413 end += length
00414 if python3:
00415 self.status.goal_id.id = str[start:end].decode('utf-8')
00416 else:
00417 self.status.goal_id.id = str[start:end]
00418 start = end
00419 end += 1
00420 (self.status.status,) = _struct_B.unpack(str[start:end])
00421 start = end
00422 end += 4
00423 (length,) = _struct_I.unpack(str[start:end])
00424 start = end
00425 end += length
00426 if python3:
00427 self.status.text = str[start:end].decode('utf-8')
00428 else:
00429 self.status.text = str[start:end]
00430 _x = self
00431 start = end
00432 end += 12
00433 (_x.result.header.seq, _x.result.header.stamp.secs, _x.result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00434 start = end
00435 end += 4
00436 (length,) = _struct_I.unpack(str[start:end])
00437 start = end
00438 end += length
00439 if python3:
00440 self.result.header.frame_id = str[start:end].decode('utf-8')
00441 else:
00442 self.result.header.frame_id = str[start:end]
00443 _x = self
00444 start = end
00445 end += 13
00446 (_x.result.success, _x.result.desired.header.seq, _x.result.desired.header.stamp.secs, _x.result.desired.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00447 self.result.success = bool(self.result.success)
00448 start = end
00449 end += 4
00450 (length,) = _struct_I.unpack(str[start:end])
00451 start = end
00452 end += length
00453 if python3:
00454 self.result.desired.header.frame_id = str[start:end].decode('utf-8')
00455 else:
00456 self.result.desired.header.frame_id = str[start:end]
00457 _x = self
00458 start = end
00459 end += 182
00460 (_x.result.desired.pose.position.x, _x.result.desired.pose.position.y, _x.result.desired.pose.position.z, _x.result.desired.pose.orientation.x, _x.result.desired.pose.orientation.y, _x.result.desired.pose.orientation.z, _x.result.desired.pose.orientation.w, _x.result.desired.wrench_or_stiffness.force.x, _x.result.desired.wrench_or_stiffness.force.y, _x.result.desired.wrench_or_stiffness.force.z, _x.result.desired.wrench_or_stiffness.torque.x, _x.result.desired.wrench_or_stiffness.torque.y, _x.result.desired.wrench_or_stiffness.torque.z, _x.result.desired.isForceX, _x.result.desired.isForceY, _x.result.desired.isForceZ, _x.result.desired.isTorqueX, _x.result.desired.isTorqueY, _x.result.desired.isTorqueZ, _x.result.desired.time_from_start.secs, _x.result.desired.time_from_start.nsecs, _x.result.actual_pose.position.x, _x.result.actual_pose.position.y, _x.result.actual_pose.position.z, _x.result.actual_pose.orientation.x, _x.result.actual_pose.orientation.y, _x.result.actual_pose.orientation.z, _x.result.actual_pose.orientation.w, _x.result.effort_sq_error,) = _struct_13d6B2i8d.unpack(str[start:end])
00461 self.result.desired.isForceX = bool(self.result.desired.isForceX)
00462 self.result.desired.isForceY = bool(self.result.desired.isForceY)
00463 self.result.desired.isForceZ = bool(self.result.desired.isForceZ)
00464 self.result.desired.isTorqueX = bool(self.result.desired.isTorqueX)
00465 self.result.desired.isTorqueY = bool(self.result.desired.isTorqueY)
00466 self.result.desired.isTorqueZ = bool(self.result.desired.isTorqueZ)
00467 return self
00468 except struct.error as e:
00469 raise genpy.DeserializationError(e)
00470
00471 _struct_I = genpy.struct_I
00472 _struct_3I = struct.Struct("<3I")
00473 _struct_B = struct.Struct("<B")
00474 _struct_2I = struct.Struct("<2I")
00475 _struct_13d6B2i8d = struct.Struct("<13d6B2i8d")
00476 _struct_B3I = struct.Struct("<B3I")