$search
00001 """autogenerated by genmsg_py from PlaceLocationResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class PlaceLocationResult(roslib.message.Message): 00007 _md5sum = "8dd9edc3a2a98cab298ca81031224cda" 00008 _type = "object_manipulation_msgs/PlaceLocationResult" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """int32 SUCCESS = 1 00011 int32 PLACE_OUT_OF_REACH = 2 00012 int32 PLACE_IN_COLLISION = 3 00013 int32 PLACE_UNFEASIBLE = 4 00014 int32 PREPLACE_OUT_OF_REACH = 5 00015 int32 PREPLACE_IN_COLLISION = 6 00016 int32 PREPLACE_UNFEASIBLE = 7 00017 int32 RETREAT_OUT_OF_REACH = 8 00018 int32 RETREAT_IN_COLLISION = 9 00019 int32 RETREAT_UNFEASIBLE = 10 00020 int32 MOVE_ARM_FAILED = 11 00021 int32 PLACE_FAILED = 12 00022 int32 RETREAT_FAILED = 13 00023 int32 result_code 00024 00025 # whether the state of the world was disturbed by this attempt. generally, this flag 00026 # shows if another task can be attempted, or a new sensed world model is recommeded 00027 # before proceeding 00028 bool continuation_possible 00029 00030 """ 00031 # Pseudo-constants 00032 SUCCESS = 1 00033 PLACE_OUT_OF_REACH = 2 00034 PLACE_IN_COLLISION = 3 00035 PLACE_UNFEASIBLE = 4 00036 PREPLACE_OUT_OF_REACH = 5 00037 PREPLACE_IN_COLLISION = 6 00038 PREPLACE_UNFEASIBLE = 7 00039 RETREAT_OUT_OF_REACH = 8 00040 RETREAT_IN_COLLISION = 9 00041 RETREAT_UNFEASIBLE = 10 00042 MOVE_ARM_FAILED = 11 00043 PLACE_FAILED = 12 00044 RETREAT_FAILED = 13 00045 00046 __slots__ = ['result_code','continuation_possible'] 00047 _slot_types = ['int32','bool'] 00048 00049 def __init__(self, *args, **kwds): 00050 """ 00051 Constructor. Any message fields that are implicitly/explicitly 00052 set to None will be assigned a default value. The recommend 00053 use is keyword arguments as this is more robust to future message 00054 changes. You cannot mix in-order arguments and keyword arguments. 00055 00056 The available fields are: 00057 result_code,continuation_possible 00058 00059 @param args: complete set of field values, in .msg order 00060 @param kwds: use keyword arguments corresponding to message field names 00061 to set specific fields. 00062 """ 00063 if args or kwds: 00064 super(PlaceLocationResult, self).__init__(*args, **kwds) 00065 #message fields cannot be None, assign default values for those that are 00066 if self.result_code is None: 00067 self.result_code = 0 00068 if self.continuation_possible is None: 00069 self.continuation_possible = False 00070 else: 00071 self.result_code = 0 00072 self.continuation_possible = False 00073 00074 def _get_types(self): 00075 """ 00076 internal API method 00077 """ 00078 return self._slot_types 00079 00080 def serialize(self, buff): 00081 """ 00082 serialize message into buffer 00083 @param buff: buffer 00084 @type buff: StringIO 00085 """ 00086 try: 00087 _x = self 00088 buff.write(_struct_iB.pack(_x.result_code, _x.continuation_possible)) 00089 except struct.error as se: self._check_types(se) 00090 except TypeError as te: self._check_types(te) 00091 00092 def deserialize(self, str): 00093 """ 00094 unpack serialized message in str into this message instance 00095 @param str: byte array of serialized message 00096 @type str: str 00097 """ 00098 try: 00099 end = 0 00100 _x = self 00101 start = end 00102 end += 5 00103 (_x.result_code, _x.continuation_possible,) = _struct_iB.unpack(str[start:end]) 00104 self.continuation_possible = bool(self.continuation_possible) 00105 return self 00106 except struct.error as e: 00107 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00108 00109 00110 def serialize_numpy(self, buff, numpy): 00111 """ 00112 serialize message with numpy array types into buffer 00113 @param buff: buffer 00114 @type buff: StringIO 00115 @param numpy: numpy python module 00116 @type numpy module 00117 """ 00118 try: 00119 _x = self 00120 buff.write(_struct_iB.pack(_x.result_code, _x.continuation_possible)) 00121 except struct.error as se: self._check_types(se) 00122 except TypeError as te: self._check_types(te) 00123 00124 def deserialize_numpy(self, str, numpy): 00125 """ 00126 unpack serialized message in str into this message instance using numpy for array types 00127 @param str: byte array of serialized message 00128 @type str: str 00129 @param numpy: numpy python module 00130 @type numpy: module 00131 """ 00132 try: 00133 end = 0 00134 _x = self 00135 start = end 00136 end += 5 00137 (_x.result_code, _x.continuation_possible,) = _struct_iB.unpack(str[start:end]) 00138 self.continuation_possible = bool(self.continuation_possible) 00139 return self 00140 except struct.error as e: 00141 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00142 00143 _struct_I = roslib.message.struct_I 00144 _struct_iB = struct.Struct("<iB")