00001 """autogenerated by genmsg_py from PR2GripperSlipServoActionFeedback.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 PR2GripperSlipServoActionFeedback(roslib.message.Message):
00011 _md5sum = "8819de47d9e7dfd2acefc052395548ad"
00012 _type = "pr2_gripper_sensor_msgs/PR2GripperSlipServoActionFeedback"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalStatus status
00018 PR2GripperSlipServoFeedback feedback
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/PR2GripperSlipServoFeedback
00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00080
00081 #feedback
00082 PR2GripperSlipServoData data
00083
00084 ================================================================================
00085 MSG: pr2_gripper_sensor_msgs/PR2GripperSlipServoData
00086 # time the data was recorded at
00087 time stamp
00088
00089 # the amount of deformation from action start (in meters)
00090 float64 deformation
00091
00092 # the force experinced by the finger Pads (N)
00093 # NOTE:this ignores data from the edges of the finger pressure
00094 float64 left_fingertip_pad_force
00095 float64 right_fingertip_pad_force
00096
00097 # the current virtual parallel joint effort of the gripper (in N)
00098 float64 joint_effort
00099
00100 # true if the object recently slipped
00101 bool slip_detected
00102
00103 # true if we are at or exceeding the deformation limit
00104 # (see wiki page and param server for more info)
00105 bool deformation_limit_reached
00106
00107 # true if we are at or exceeding our force
00108 # (see wiki page and param server for more info)
00109 bool fingertip_force_limit_reached
00110
00111 # true if the controller thinks the gripper is empty
00112 # (see wiki page for more info)
00113 bool gripper_empty
00114
00115 # the control state of our realtime controller
00116 PR2GripperSensorRTState rtstate
00117 ================================================================================
00118 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState
00119 # the control state of our realtime controller
00120 int8 realtime_controller_state
00121
00122 # predefined values to indicate our realtime_controller_state
00123 int8 DISABLED = 0
00124 int8 POSITION_SERVO = 3
00125 int8 FORCE_SERVO = 4
00126 int8 FIND_CONTACT = 5
00127 int8 SLIP_SERVO = 6
00128 """
00129 __slots__ = ['header','status','feedback']
00130 _slot_types = ['Header','actionlib_msgs/GoalStatus','pr2_gripper_sensor_msgs/PR2GripperSlipServoFeedback']
00131
00132 def __init__(self, *args, **kwds):
00133 """
00134 Constructor. Any message fields that are implicitly/explicitly
00135 set to None will be assigned a default value. The recommend
00136 use is keyword arguments as this is more robust to future message
00137 changes. You cannot mix in-order arguments and keyword arguments.
00138
00139 The available fields are:
00140 header,status,feedback
00141
00142 @param args: complete set of field values, in .msg order
00143 @param kwds: use keyword arguments corresponding to message field names
00144 to set specific fields.
00145 """
00146 if args or kwds:
00147 super(PR2GripperSlipServoActionFeedback, self).__init__(*args, **kwds)
00148
00149 if self.header is None:
00150 self.header = std_msgs.msg._Header.Header()
00151 if self.status is None:
00152 self.status = actionlib_msgs.msg.GoalStatus()
00153 if self.feedback is None:
00154 self.feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoFeedback()
00155 else:
00156 self.header = std_msgs.msg._Header.Header()
00157 self.status = actionlib_msgs.msg.GoalStatus()
00158 self.feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoFeedback()
00159
00160 def _get_types(self):
00161 """
00162 internal API method
00163 """
00164 return self._slot_types
00165
00166 def serialize(self, buff):
00167 """
00168 serialize message into buffer
00169 @param buff: buffer
00170 @type buff: StringIO
00171 """
00172 try:
00173 _x = self
00174 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00175 _x = self.header.frame_id
00176 length = len(_x)
00177 buff.write(struct.pack('<I%ss'%length, length, _x))
00178 _x = self
00179 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00180 _x = self.status.goal_id.id
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 buff.write(_struct_B.pack(self.status.status))
00184 _x = self.status.text
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_2I4d4Bb.pack(_x.feedback.data.stamp.secs, _x.feedback.data.stamp.nsecs, _x.feedback.data.deformation, _x.feedback.data.left_fingertip_pad_force, _x.feedback.data.right_fingertip_pad_force, _x.feedback.data.joint_effort, _x.feedback.data.slip_detected, _x.feedback.data.deformation_limit_reached, _x.feedback.data.fingertip_force_limit_reached, _x.feedback.data.gripper_empty, _x.feedback.data.rtstate.realtime_controller_state))
00189 except struct.error, se: self._check_types(se)
00190 except TypeError, te: self._check_types(te)
00191
00192 def deserialize(self, str):
00193 """
00194 unpack serialized message in str into this message instance
00195 @param str: byte array of serialized message
00196 @type str: str
00197 """
00198 try:
00199 if self.header is None:
00200 self.header = std_msgs.msg._Header.Header()
00201 if self.status is None:
00202 self.status = actionlib_msgs.msg.GoalStatus()
00203 if self.feedback is None:
00204 self.feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoFeedback()
00205 end = 0
00206 _x = self
00207 start = end
00208 end += 12
00209 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00210 start = end
00211 end += 4
00212 (length,) = _struct_I.unpack(str[start:end])
00213 start = end
00214 end += length
00215 self.header.frame_id = str[start:end]
00216 _x = self
00217 start = end
00218 end += 8
00219 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00220 start = end
00221 end += 4
00222 (length,) = _struct_I.unpack(str[start:end])
00223 start = end
00224 end += length
00225 self.status.goal_id.id = str[start:end]
00226 start = end
00227 end += 1
00228 (self.status.status,) = _struct_B.unpack(str[start:end])
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 self.status.text = str[start:end]
00235 _x = self
00236 start = end
00237 end += 45
00238 (_x.feedback.data.stamp.secs, _x.feedback.data.stamp.nsecs, _x.feedback.data.deformation, _x.feedback.data.left_fingertip_pad_force, _x.feedback.data.right_fingertip_pad_force, _x.feedback.data.joint_effort, _x.feedback.data.slip_detected, _x.feedback.data.deformation_limit_reached, _x.feedback.data.fingertip_force_limit_reached, _x.feedback.data.gripper_empty, _x.feedback.data.rtstate.realtime_controller_state,) = _struct_2I4d4Bb.unpack(str[start:end])
00239 self.feedback.data.slip_detected = bool(self.feedback.data.slip_detected)
00240 self.feedback.data.deformation_limit_reached = bool(self.feedback.data.deformation_limit_reached)
00241 self.feedback.data.fingertip_force_limit_reached = bool(self.feedback.data.fingertip_force_limit_reached)
00242 self.feedback.data.gripper_empty = bool(self.feedback.data.gripper_empty)
00243 return self
00244 except struct.error, e:
00245 raise roslib.message.DeserializationError(e)
00246
00247
00248 def serialize_numpy(self, buff, numpy):
00249 """
00250 serialize message with numpy array types into buffer
00251 @param buff: buffer
00252 @type buff: StringIO
00253 @param numpy: numpy python module
00254 @type numpy module
00255 """
00256 try:
00257 _x = self
00258 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00259 _x = self.header.frame_id
00260 length = len(_x)
00261 buff.write(struct.pack('<I%ss'%length, length, _x))
00262 _x = self
00263 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00264 _x = self.status.goal_id.id
00265 length = len(_x)
00266 buff.write(struct.pack('<I%ss'%length, length, _x))
00267 buff.write(_struct_B.pack(self.status.status))
00268 _x = self.status.text
00269 length = len(_x)
00270 buff.write(struct.pack('<I%ss'%length, length, _x))
00271 _x = self
00272 buff.write(_struct_2I4d4Bb.pack(_x.feedback.data.stamp.secs, _x.feedback.data.stamp.nsecs, _x.feedback.data.deformation, _x.feedback.data.left_fingertip_pad_force, _x.feedback.data.right_fingertip_pad_force, _x.feedback.data.joint_effort, _x.feedback.data.slip_detected, _x.feedback.data.deformation_limit_reached, _x.feedback.data.fingertip_force_limit_reached, _x.feedback.data.gripper_empty, _x.feedback.data.rtstate.realtime_controller_state))
00273 except struct.error, se: self._check_types(se)
00274 except TypeError, te: self._check_types(te)
00275
00276 def deserialize_numpy(self, str, numpy):
00277 """
00278 unpack serialized message in str into this message instance using numpy for array types
00279 @param str: byte array of serialized message
00280 @type str: str
00281 @param numpy: numpy python module
00282 @type numpy: module
00283 """
00284 try:
00285 if self.header is None:
00286 self.header = std_msgs.msg._Header.Header()
00287 if self.status is None:
00288 self.status = actionlib_msgs.msg.GoalStatus()
00289 if self.feedback is None:
00290 self.feedback = pr2_gripper_sensor_msgs.msg.PR2GripperSlipServoFeedback()
00291 end = 0
00292 _x = self
00293 start = end
00294 end += 12
00295 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00296 start = end
00297 end += 4
00298 (length,) = _struct_I.unpack(str[start:end])
00299 start = end
00300 end += length
00301 self.header.frame_id = str[start:end]
00302 _x = self
00303 start = end
00304 end += 8
00305 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00306 start = end
00307 end += 4
00308 (length,) = _struct_I.unpack(str[start:end])
00309 start = end
00310 end += length
00311 self.status.goal_id.id = str[start:end]
00312 start = end
00313 end += 1
00314 (self.status.status,) = _struct_B.unpack(str[start:end])
00315 start = end
00316 end += 4
00317 (length,) = _struct_I.unpack(str[start:end])
00318 start = end
00319 end += length
00320 self.status.text = str[start:end]
00321 _x = self
00322 start = end
00323 end += 45
00324 (_x.feedback.data.stamp.secs, _x.feedback.data.stamp.nsecs, _x.feedback.data.deformation, _x.feedback.data.left_fingertip_pad_force, _x.feedback.data.right_fingertip_pad_force, _x.feedback.data.joint_effort, _x.feedback.data.slip_detected, _x.feedback.data.deformation_limit_reached, _x.feedback.data.fingertip_force_limit_reached, _x.feedback.data.gripper_empty, _x.feedback.data.rtstate.realtime_controller_state,) = _struct_2I4d4Bb.unpack(str[start:end])
00325 self.feedback.data.slip_detected = bool(self.feedback.data.slip_detected)
00326 self.feedback.data.deformation_limit_reached = bool(self.feedback.data.deformation_limit_reached)
00327 self.feedback.data.fingertip_force_limit_reached = bool(self.feedback.data.fingertip_force_limit_reached)
00328 self.feedback.data.gripper_empty = bool(self.feedback.data.gripper_empty)
00329 return self
00330 except struct.error, e:
00331 raise roslib.message.DeserializationError(e)
00332
00333 _struct_I = roslib.message.struct_I
00334 _struct_3I = struct.Struct("<3I")
00335 _struct_B = struct.Struct("<B")
00336 _struct_2I = struct.Struct("<2I")
00337 _struct_2I4d4Bb = struct.Struct("<2I4d4Bb")