$search
00001 """autogenerated by genmsg_py from PR2GripperSlipServoActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import actionlib_msgs.msg 00007 import pr2_gripper_sensor_msgs.msg 00008 import std_msgs.msg 00009 00010 class PR2GripperSlipServoActionResult(roslib.message.Message): 00011 _md5sum = "803e6845ed2b1f1d15016f48d0689075" 00012 _type = "pr2_gripper_sensor_msgs/PR2GripperSlipServoActionResult" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 Header header 00017 actionlib_msgs/GoalStatus status 00018 PR2GripperSlipServoResult result 00019 00020 ================================================================================ 00021 MSG: std_msgs/Header 00022 # Standard metadata for higher-level stamped data types. 00023 # This is generally used to communicate timestamped data 00024 # in a particular coordinate frame. 00025 # 00026 # sequence ID: consecutively increasing ID 00027 uint32 seq 00028 #Two-integer timestamp that is expressed as: 00029 # * stamp.secs: seconds (stamp_secs) since epoch 00030 # * stamp.nsecs: nanoseconds since stamp_secs 00031 # time-handling sugar is provided by the client library 00032 time stamp 00033 #Frame this data is associated with 00034 # 0: no frame 00035 # 1: global frame 00036 string frame_id 00037 00038 ================================================================================ 00039 MSG: actionlib_msgs/GoalStatus 00040 GoalID goal_id 00041 uint8 status 00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00045 # and has since completed its execution (Terminal State) 00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00048 # to some failure (Terminal State) 00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00050 # because the goal was unattainable or invalid (Terminal State) 00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00052 # and has not yet completed execution 00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00054 # but the action server has not yet confirmed that the goal is canceled 00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00056 # and was successfully cancelled (Terminal State) 00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00058 # sent over the wire by an action server 00059 00060 #Allow for the user to associate a string with GoalStatus for debugging 00061 string text 00062 00063 00064 ================================================================================ 00065 MSG: actionlib_msgs/GoalID 00066 # The stamp should store the time at which this goal was requested. 00067 # It is used by an action server when it tries to preempt all 00068 # goals that were requested before a certain time 00069 time stamp 00070 00071 # The id provides a way to associate feedback and 00072 # result message with specific goal requests. The id 00073 # specified must be unique. 00074 string id 00075 00076 00077 ================================================================================ 00078 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoResult 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 00081 #result 00082 PR2GripperSlipServoData data 00083 00084 00085 ================================================================================ 00086 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoData 00087 # time the data was recorded at 00088 time stamp 00089 00090 # the amount of deformation from action start (in meters) 00091 float64 deformation 00092 00093 # the force experinced by the finger Pads (N) 00094 # NOTE:this ignores data from the edges of the finger pressure 00095 float64 left_fingertip_pad_force 00096 float64 right_fingertip_pad_force 00097 00098 # the current virtual parallel joint effort of the gripper (in N) 00099 float64 joint_effort 00100 00101 # true if the object recently slipped 00102 bool slip_detected 00103 00104 # true if we are at or exceeding the deformation limit 00105 # (see wiki page and param server for more info) 00106 bool deformation_limit_reached 00107 00108 # true if we are at or exceeding our force 00109 # (see wiki page and param server for more info) 00110 bool fingertip_force_limit_reached 00111 00112 # true if the controller thinks the gripper is empty 00113 # (see wiki page for more info) 00114 bool gripper_empty 00115 00116 # the control state of our realtime controller 00117 PR2GripperSensorRTState rtstate 00118 ================================================================================ 00119 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState 00120 # the control state of our realtime controller 00121 int8 realtime_controller_state 00122 00123 # predefined values to indicate our realtime_controller_state 00124 int8 DISABLED = 0 00125 int8 POSITION_SERVO = 3 00126 int8 FORCE_SERVO = 4 00127 int8 FIND_CONTACT = 5 00128 int8 SLIP_SERVO = 6 00129 """ 00130 __slots__ = ['header','status','result'] 00131 _slot_types = ['Header','actionlib_msgs/GoalStatus','pr2_gripper_sensor_msgs/PR2GripperSlipServoResult'] 00132 00133 def __init__(self, *args, **kwds): 00134 """ 00135 Constructor. Any message fields that are implicitly/explicitly 00136 set to None will be assigned a default value. The recommend 00137 use is keyword arguments as this is more robust to future message 00138 changes. You cannot mix in-order arguments and keyword arguments. 00139 00140 The available fields are: 00141 header,status,result 00142 00143 @param args: complete set of field values, in .msg order 00144 @param kwds: use keyword arguments corresponding to message field names 00145 to set specific fields. 00146 """ 00147 if args or kwds: 00148 super(PR2GripperSlipServoActionResult, self).__init__(*args, **kwds) 00149 #message fields cannot be None, assign default values for those that are 00150 if self.header is None: 00151 self.header = std_msgs.msg._Header.Header() 00152 if self.status is None: 00153 self.status = actionlib_msgs.msg.GoalStatus() 00154 if self.result is None: 00155 self.result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoResult() 00156 else: 00157 self.header = std_msgs.msg._Header.Header() 00158 self.status = actionlib_msgs.msg.GoalStatus() 00159 self.result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoResult() 00160 00161 def _get_types(self): 00162 """ 00163 internal API method 00164 """ 00165 return self._slot_types 00166 00167 def serialize(self, buff): 00168 """ 00169 serialize message into buffer 00170 @param buff: buffer 00171 @type buff: StringIO 00172 """ 00173 try: 00174 _x = self 00175 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00176 _x = self.header.frame_id 00177 length = len(_x) 00178 buff.write(struct.pack('<I%ss'%length, length, _x)) 00179 _x = self 00180 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00181 _x = self.status.goal_id.id 00182 length = len(_x) 00183 buff.write(struct.pack('<I%ss'%length, length, _x)) 00184 buff.write(_struct_B.pack(self.status.status)) 00185 _x = self.status.text 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 _x = self 00189 buff.write(_struct_2I4d4Bb.pack(_x.result.data.stamp.secs, _x.result.data.stamp.nsecs, _x.result.data.deformation, _x.result.data.left_fingertip_pad_force, _x.result.data.right_fingertip_pad_force, _x.result.data.joint_effort, _x.result.data.slip_detected, _x.result.data.deformation_limit_reached, _x.result.data.fingertip_force_limit_reached, _x.result.data.gripper_empty, _x.result.data.rtstate.realtime_controller_state)) 00190 except struct.error as se: self._check_types(se) 00191 except TypeError as te: self._check_types(te) 00192 00193 def deserialize(self, str): 00194 """ 00195 unpack serialized message in str into this message instance 00196 @param str: byte array of serialized message 00197 @type str: str 00198 """ 00199 try: 00200 if self.header is None: 00201 self.header = std_msgs.msg._Header.Header() 00202 if self.status is None: 00203 self.status = actionlib_msgs.msg.GoalStatus() 00204 if self.result is None: 00205 self.result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoResult() 00206 end = 0 00207 _x = self 00208 start = end 00209 end += 12 00210 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00211 start = end 00212 end += 4 00213 (length,) = _struct_I.unpack(str[start:end]) 00214 start = end 00215 end += length 00216 self.header.frame_id = str[start:end] 00217 _x = self 00218 start = end 00219 end += 8 00220 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00221 start = end 00222 end += 4 00223 (length,) = _struct_I.unpack(str[start:end]) 00224 start = end 00225 end += length 00226 self.status.goal_id.id = str[start:end] 00227 start = end 00228 end += 1 00229 (self.status.status,) = _struct_B.unpack(str[start:end]) 00230 start = end 00231 end += 4 00232 (length,) = _struct_I.unpack(str[start:end]) 00233 start = end 00234 end += length 00235 self.status.text = str[start:end] 00236 _x = self 00237 start = end 00238 end += 45 00239 (_x.result.data.stamp.secs, _x.result.data.stamp.nsecs, _x.result.data.deformation, _x.result.data.left_fingertip_pad_force, _x.result.data.right_fingertip_pad_force, _x.result.data.joint_effort, _x.result.data.slip_detected, _x.result.data.deformation_limit_reached, _x.result.data.fingertip_force_limit_reached, _x.result.data.gripper_empty, _x.result.data.rtstate.realtime_controller_state,) = _struct_2I4d4Bb.unpack(str[start:end]) 00240 self.result.data.slip_detected = bool(self.result.data.slip_detected) 00241 self.result.data.deformation_limit_reached = bool(self.result.data.deformation_limit_reached) 00242 self.result.data.fingertip_force_limit_reached = bool(self.result.data.fingertip_force_limit_reached) 00243 self.result.data.gripper_empty = bool(self.result.data.gripper_empty) 00244 return self 00245 except struct.error as e: 00246 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00247 00248 00249 def serialize_numpy(self, buff, numpy): 00250 """ 00251 serialize message with numpy array types into buffer 00252 @param buff: buffer 00253 @type buff: StringIO 00254 @param numpy: numpy python module 00255 @type numpy module 00256 """ 00257 try: 00258 _x = self 00259 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00260 _x = self.header.frame_id 00261 length = len(_x) 00262 buff.write(struct.pack('<I%ss'%length, length, _x)) 00263 _x = self 00264 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00265 _x = self.status.goal_id.id 00266 length = len(_x) 00267 buff.write(struct.pack('<I%ss'%length, length, _x)) 00268 buff.write(_struct_B.pack(self.status.status)) 00269 _x = self.status.text 00270 length = len(_x) 00271 buff.write(struct.pack('<I%ss'%length, length, _x)) 00272 _x = self 00273 buff.write(_struct_2I4d4Bb.pack(_x.result.data.stamp.secs, _x.result.data.stamp.nsecs, _x.result.data.deformation, _x.result.data.left_fingertip_pad_force, _x.result.data.right_fingertip_pad_force, _x.result.data.joint_effort, _x.result.data.slip_detected, _x.result.data.deformation_limit_reached, _x.result.data.fingertip_force_limit_reached, _x.result.data.gripper_empty, _x.result.data.rtstate.realtime_controller_state)) 00274 except struct.error as se: self._check_types(se) 00275 except TypeError as te: self._check_types(te) 00276 00277 def deserialize_numpy(self, str, numpy): 00278 """ 00279 unpack serialized message in str into this message instance using numpy for array types 00280 @param str: byte array of serialized message 00281 @type str: str 00282 @param numpy: numpy python module 00283 @type numpy: module 00284 """ 00285 try: 00286 if self.header is None: 00287 self.header = std_msgs.msg._Header.Header() 00288 if self.status is None: 00289 self.status = actionlib_msgs.msg.GoalStatus() 00290 if self.result is None: 00291 self.result = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoResult() 00292 end = 0 00293 _x = self 00294 start = end 00295 end += 12 00296 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00297 start = end 00298 end += 4 00299 (length,) = _struct_I.unpack(str[start:end]) 00300 start = end 00301 end += length 00302 self.header.frame_id = str[start:end] 00303 _x = self 00304 start = end 00305 end += 8 00306 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00307 start = end 00308 end += 4 00309 (length,) = _struct_I.unpack(str[start:end]) 00310 start = end 00311 end += length 00312 self.status.goal_id.id = str[start:end] 00313 start = end 00314 end += 1 00315 (self.status.status,) = _struct_B.unpack(str[start:end]) 00316 start = end 00317 end += 4 00318 (length,) = _struct_I.unpack(str[start:end]) 00319 start = end 00320 end += length 00321 self.status.text = str[start:end] 00322 _x = self 00323 start = end 00324 end += 45 00325 (_x.result.data.stamp.secs, _x.result.data.stamp.nsecs, _x.result.data.deformation, _x.result.data.left_fingertip_pad_force, _x.result.data.right_fingertip_pad_force, _x.result.data.joint_effort, _x.result.data.slip_detected, _x.result.data.deformation_limit_reached, _x.result.data.fingertip_force_limit_reached, _x.result.data.gripper_empty, _x.result.data.rtstate.realtime_controller_state,) = _struct_2I4d4Bb.unpack(str[start:end]) 00326 self.result.data.slip_detected = bool(self.result.data.slip_detected) 00327 self.result.data.deformation_limit_reached = bool(self.result.data.deformation_limit_reached) 00328 self.result.data.fingertip_force_limit_reached = bool(self.result.data.fingertip_force_limit_reached) 00329 self.result.data.gripper_empty = bool(self.result.data.gripper_empty) 00330 return self 00331 except struct.error as e: 00332 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00333 00334 _struct_I = roslib.message.struct_I 00335 _struct_3I = struct.Struct("<3I") 00336 _struct_B = struct.Struct("<B") 00337 _struct_2I = struct.Struct("<2I") 00338 _struct_2I4d4Bb = struct.Struct("<2I4d4Bb")