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