Go to the documentation of this file.00001 """autogenerated by genpy from object_manipulation_msgs/ReactiveGraspFeedback.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 object_manipulation_msgs.msg
00008
00009 class ReactiveGraspFeedback(genpy.Message):
00010 _md5sum = "f5854fd8810580aa0bc24d4d76384836"
00011 _type = "object_manipulation_msgs/ReactiveGraspFeedback"
00012 _has_header = False
00013 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014
00015 # which phase the grasp is in
00016
00017 ManipulationPhase manipulation_phase
00018
00019
00020
00021
00022 ================================================================================
00023 MSG: object_manipulation_msgs/ManipulationPhase
00024 int32 CHECKING_FEASIBILITY = 0
00025 int32 MOVING_TO_PREGRASP = 1
00026 int32 MOVING_TO_GRASP = 2
00027 int32 CLOSING = 3
00028 int32 ADJUSTING_GRASP = 4
00029 int32 LIFTING = 5
00030 int32 MOVING_WITH_OBJECT = 6
00031 int32 MOVING_TO_PLACE = 7
00032 int32 PLACING = 8
00033 int32 OPENING = 9
00034 int32 RETREATING = 10
00035 int32 MOVING_WITHOUT_OBJECT = 11
00036 int32 SHAKING = 12
00037 int32 SUCCEEDED = 13
00038 int32 FAILED = 14
00039 int32 ABORTED = 15
00040 int32 HOLDING_OBJECT = 16
00041
00042 int32 phase
00043 """
00044 __slots__ = ['manipulation_phase']
00045 _slot_types = ['object_manipulation_msgs/ManipulationPhase']
00046
00047 def __init__(self, *args, **kwds):
00048 """
00049 Constructor. Any message fields that are implicitly/explicitly
00050 set to None will be assigned a default value. The recommend
00051 use is keyword arguments as this is more robust to future message
00052 changes. You cannot mix in-order arguments and keyword arguments.
00053
00054 The available fields are:
00055 manipulation_phase
00056
00057 :param args: complete set of field values, in .msg order
00058 :param kwds: use keyword arguments corresponding to message field names
00059 to set specific fields.
00060 """
00061 if args or kwds:
00062 super(ReactiveGraspFeedback, self).__init__(*args, **kwds)
00063
00064 if self.manipulation_phase is None:
00065 self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00066 else:
00067 self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00068
00069 def _get_types(self):
00070 """
00071 internal API method
00072 """
00073 return self._slot_types
00074
00075 def serialize(self, buff):
00076 """
00077 serialize message into buffer
00078 :param buff: buffer, ``StringIO``
00079 """
00080 try:
00081 buff.write(_struct_i.pack(self.manipulation_phase.phase))
00082 except struct.error as se: self._check_types(se)
00083 except TypeError as te: self._check_types(te)
00084
00085 def deserialize(self, str):
00086 """
00087 unpack serialized message in str into this message instance
00088 :param str: byte array of serialized message, ``str``
00089 """
00090 try:
00091 if self.manipulation_phase is None:
00092 self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00093 end = 0
00094 start = end
00095 end += 4
00096 (self.manipulation_phase.phase,) = _struct_i.unpack(str[start:end])
00097 return self
00098 except struct.error as e:
00099 raise genpy.DeserializationError(e)
00100
00101
00102 def serialize_numpy(self, buff, numpy):
00103 """
00104 serialize message with numpy array types into buffer
00105 :param buff: buffer, ``StringIO``
00106 :param numpy: numpy python module
00107 """
00108 try:
00109 buff.write(_struct_i.pack(self.manipulation_phase.phase))
00110 except struct.error as se: self._check_types(se)
00111 except TypeError as te: self._check_types(te)
00112
00113 def deserialize_numpy(self, str, numpy):
00114 """
00115 unpack serialized message in str into this message instance using numpy for array types
00116 :param str: byte array of serialized message, ``str``
00117 :param numpy: numpy python module
00118 """
00119 try:
00120 if self.manipulation_phase is None:
00121 self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00122 end = 0
00123 start = end
00124 end += 4
00125 (self.manipulation_phase.phase,) = _struct_i.unpack(str[start:end])
00126 return self
00127 except struct.error as e:
00128 raise genpy.DeserializationError(e)
00129
00130 _struct_I = genpy.struct_I
00131 _struct_i = struct.Struct("<i")