00001 """autogenerated by genmsg_py from PR2GripperReleaseFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import pr2_gripper_sensor_msgs.msg
00006
00007 class PR2GripperReleaseFeedback(roslib.message.Message):
00008 _md5sum = "b4b68d48ac7d07bdb11b7f3badfa9266"
00009 _type = "pr2_gripper_sensor_msgs/PR2GripperReleaseFeedback"
00010 _has_header = False
00011 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00012
00013 #feedback
00014 PR2GripperReleaseData data
00015
00016
00017 ================================================================================
00018 MSG: pr2_gripper_sensor_msgs/PR2GripperReleaseData
00019 # the control state of our realtime controller
00020 PR2GripperSensorRTState rtstate
00021 ================================================================================
00022 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState
00023 # the control state of our realtime controller
00024 int8 realtime_controller_state
00025
00026 # predefined values to indicate our realtime_controller_state
00027 int8 DISABLED = 0
00028 int8 POSITION_SERVO = 3
00029 int8 FORCE_SERVO = 4
00030 int8 FIND_CONTACT = 5
00031 int8 SLIP_SERVO = 6
00032 """
00033 __slots__ = ['data']
00034 _slot_types = ['pr2_gripper_sensor_msgs/PR2GripperReleaseData']
00035
00036 def __init__(self, *args, **kwds):
00037 """
00038 Constructor. Any message fields that are implicitly/explicitly
00039 set to None will be assigned a default value. The recommend
00040 use is keyword arguments as this is more robust to future message
00041 changes. You cannot mix in-order arguments and keyword arguments.
00042
00043 The available fields are:
00044 data
00045
00046 @param args: complete set of field values, in .msg order
00047 @param kwds: use keyword arguments corresponding to message field names
00048 to set specific fields.
00049 """
00050 if args or kwds:
00051 super(PR2GripperReleaseFeedback, self).__init__(*args, **kwds)
00052
00053 if self.data is None:
00054 self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00055 else:
00056 self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00057
00058 def _get_types(self):
00059 """
00060 internal API method
00061 """
00062 return self._slot_types
00063
00064 def serialize(self, buff):
00065 """
00066 serialize message into buffer
00067 @param buff: buffer
00068 @type buff: StringIO
00069 """
00070 try:
00071 buff.write(_struct_b.pack(self.data.rtstate.realtime_controller_state))
00072 except struct.error, se: self._check_types(se)
00073 except TypeError, te: self._check_types(te)
00074
00075 def deserialize(self, str):
00076 """
00077 unpack serialized message in str into this message instance
00078 @param str: byte array of serialized message
00079 @type str: str
00080 """
00081 try:
00082 if self.data is None:
00083 self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00084 end = 0
00085 start = end
00086 end += 1
00087 (self.data.rtstate.realtime_controller_state,) = _struct_b.unpack(str[start:end])
00088 return self
00089 except struct.error, e:
00090 raise roslib.message.DeserializationError(e)
00091
00092
00093 def serialize_numpy(self, buff, numpy):
00094 """
00095 serialize message with numpy array types into buffer
00096 @param buff: buffer
00097 @type buff: StringIO
00098 @param numpy: numpy python module
00099 @type numpy module
00100 """
00101 try:
00102 buff.write(_struct_b.pack(self.data.rtstate.realtime_controller_state))
00103 except struct.error, se: self._check_types(se)
00104 except TypeError, te: self._check_types(te)
00105
00106 def deserialize_numpy(self, str, numpy):
00107 """
00108 unpack serialized message in str into this message instance using numpy for array types
00109 @param str: byte array of serialized message
00110 @type str: str
00111 @param numpy: numpy python module
00112 @type numpy: module
00113 """
00114 try:
00115 if self.data is None:
00116 self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00117 end = 0
00118 start = end
00119 end += 1
00120 (self.data.rtstate.realtime_controller_state,) = _struct_b.unpack(str[start:end])
00121 return self
00122 except struct.error, e:
00123 raise roslib.message.DeserializationError(e)
00124
00125 _struct_I = roslib.message.struct_I
00126 _struct_b = struct.Struct("<b")