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