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