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