$search
00001 """autogenerated by genmsg_py from ReactivePlaceResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import object_manipulation_msgs.msg 00006 00007 class ReactivePlaceResult(roslib.message.Message): 00008 _md5sum = "659cc9c343e1df3a6e418ad380f5e7c4" 00009 _type = "object_manipulation_msgs/ReactivePlaceResult" 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 # the result of the reactive place attempt 00014 00015 ManipulationResult manipulation_result 00016 00017 00018 ================================================================================ 00019 MSG: object_manipulation_msgs/ManipulationResult 00020 # Result codes for manipulation tasks 00021 00022 # task completed as expected 00023 # generally means you can proceed as planned 00024 int32 SUCCESS = 1 00025 00026 # task not possible (e.g. out of reach or obstacles in the way) 00027 # generally means that the world was not disturbed, so you can try another task 00028 int32 UNFEASIBLE = -1 00029 00030 # task was thought possible, but failed due to unexpected events during execution 00031 # it is likely that the world was disturbed, so you are encouraged to refresh 00032 # your sensed world model before proceeding to another task 00033 int32 FAILED = -2 00034 00035 # a lower level error prevented task completion (e.g. joint controller not responding) 00036 # generally requires human attention 00037 int32 ERROR = -3 00038 00039 # means that at some point during execution we ended up in a state that the collision-aware 00040 # arm navigation module will not move out of. The world was likely not disturbed, but you 00041 # probably need a new collision map to move the arm out of the stuck position 00042 int32 ARM_MOVEMENT_PREVENTED = -4 00043 00044 # specific to grasp actions 00045 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested 00046 # it is likely that the collision environment will see collisions between the hand/object and the support surface 00047 int32 LIFT_FAILED = -5 00048 00049 # specific to place actions 00050 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested 00051 # it is likely that the collision environment will see collisions between the hand and the object 00052 int32 RETREAT_FAILED = -6 00053 00054 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else" 00055 int32 CANCELLED = -7 00056 00057 # the actual value of this error code 00058 int32 value 00059 00060 """ 00061 __slots__ = ['manipulation_result'] 00062 _slot_types = ['object_manipulation_msgs/ManipulationResult'] 00063 00064 def __init__(self, *args, **kwds): 00065 """ 00066 Constructor. Any message fields that are implicitly/explicitly 00067 set to None will be assigned a default value. The recommend 00068 use is keyword arguments as this is more robust to future message 00069 changes. You cannot mix in-order arguments and keyword arguments. 00070 00071 The available fields are: 00072 manipulation_result 00073 00074 @param args: complete set of field values, in .msg order 00075 @param kwds: use keyword arguments corresponding to message field names 00076 to set specific fields. 00077 """ 00078 if args or kwds: 00079 super(ReactivePlaceResult, self).__init__(*args, **kwds) 00080 #message fields cannot be None, assign default values for those that are 00081 if self.manipulation_result is None: 00082 self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult() 00083 else: 00084 self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult() 00085 00086 def _get_types(self): 00087 """ 00088 internal API method 00089 """ 00090 return self._slot_types 00091 00092 def serialize(self, buff): 00093 """ 00094 serialize message into buffer 00095 @param buff: buffer 00096 @type buff: StringIO 00097 """ 00098 try: 00099 buff.write(_struct_i.pack(self.manipulation_result.value)) 00100 except struct.error as se: self._check_types(se) 00101 except TypeError as te: self._check_types(te) 00102 00103 def deserialize(self, str): 00104 """ 00105 unpack serialized message in str into this message instance 00106 @param str: byte array of serialized message 00107 @type str: str 00108 """ 00109 try: 00110 if self.manipulation_result is None: 00111 self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult() 00112 end = 0 00113 start = end 00114 end += 4 00115 (self.manipulation_result.value,) = _struct_i.unpack(str[start:end]) 00116 return self 00117 except struct.error as e: 00118 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00119 00120 00121 def serialize_numpy(self, buff, numpy): 00122 """ 00123 serialize message with numpy array types into buffer 00124 @param buff: buffer 00125 @type buff: StringIO 00126 @param numpy: numpy python module 00127 @type numpy module 00128 """ 00129 try: 00130 buff.write(_struct_i.pack(self.manipulation_result.value)) 00131 except struct.error as se: self._check_types(se) 00132 except TypeError as te: self._check_types(te) 00133 00134 def deserialize_numpy(self, str, numpy): 00135 """ 00136 unpack serialized message in str into this message instance using numpy for array types 00137 @param str: byte array of serialized message 00138 @type str: str 00139 @param numpy: numpy python module 00140 @type numpy: module 00141 """ 00142 try: 00143 if self.manipulation_result is None: 00144 self.manipulation_result = object_manipulation_msgs.msg.ManipulationResult() 00145 end = 0 00146 start = end 00147 end += 4 00148 (self.manipulation_result.value,) = _struct_i.unpack(str[start:end]) 00149 return self 00150 except struct.error as e: 00151 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00152 00153 _struct_I = roslib.message.struct_I 00154 _struct_i = struct.Struct("<i")