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