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