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


pr2_gripper_sensor_msgs
Author(s): Joe Romano
autogenerated on Mon Oct 6 2014 12:17:32