$search
00001 """autogenerated by genmsg_py from IMGUIActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_object_manipulation_msgs.msg 00006 import object_manipulation_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class IMGUIActionResult(roslib.message.Message): 00012 _md5sum = "6434d1842053adb9e907efbf917fa72b" 00013 _type = "pr2_object_manipulation_msgs/IMGUIActionResult" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalStatus status 00019 IMGUIResult result 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalStatus 00041 GoalID goal_id 00042 uint8 status 00043 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00044 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00045 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00046 # and has since completed its execution (Terminal State) 00047 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00048 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00049 # to some failure (Terminal State) 00050 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00051 # because the goal was unattainable or invalid (Terminal State) 00052 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00053 # and has not yet completed execution 00054 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00055 # but the action server has not yet confirmed that the goal is canceled 00056 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00057 # and was successfully cancelled (Terminal State) 00058 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00059 # sent over the wire by an action server 00060 00061 #Allow for the user to associate a string with GoalStatus for debugging 00062 string text 00063 00064 00065 ================================================================================ 00066 MSG: actionlib_msgs/GoalID 00067 # The stamp should store the time at which this goal was requested. 00068 # It is used by an action server when it tries to preempt all 00069 # goals that were requested before a certain time 00070 time stamp 00071 00072 # The id provides a way to associate feedback and 00073 # result message with specific goal requests. The id 00074 # specified must be unique. 00075 string id 00076 00077 00078 ================================================================================ 00079 MSG: pr2_object_manipulation_msgs/IMGUIResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 00082 #empty result 00083 object_manipulation_msgs/ManipulationResult result 00084 00085 00086 ================================================================================ 00087 MSG: object_manipulation_msgs/ManipulationResult 00088 # Result codes for manipulation tasks 00089 00090 # task completed as expected 00091 # generally means you can proceed as planned 00092 int32 SUCCESS = 1 00093 00094 # task not possible (e.g. out of reach or obstacles in the way) 00095 # generally means that the world was not disturbed, so you can try another task 00096 int32 UNFEASIBLE = -1 00097 00098 # task was thought possible, but failed due to unexpected events during execution 00099 # it is likely that the world was disturbed, so you are encouraged to refresh 00100 # your sensed world model before proceeding to another task 00101 int32 FAILED = -2 00102 00103 # a lower level error prevented task completion (e.g. joint controller not responding) 00104 # generally requires human attention 00105 int32 ERROR = -3 00106 00107 # means that at some point during execution we ended up in a state that the collision-aware 00108 # arm navigation module will not move out of. The world was likely not disturbed, but you 00109 # probably need a new collision map to move the arm out of the stuck position 00110 int32 ARM_MOVEMENT_PREVENTED = -4 00111 00112 # specific to grasp actions 00113 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested 00114 # it is likely that the collision environment will see collisions between the hand/object and the support surface 00115 int32 LIFT_FAILED = -5 00116 00117 # specific to place actions 00118 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested 00119 # it is likely that the collision environment will see collisions between the hand and the object 00120 int32 RETREAT_FAILED = -6 00121 00122 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else" 00123 int32 CANCELLED = -7 00124 00125 # the actual value of this error code 00126 int32 value 00127 00128 """ 00129 __slots__ = ['header','status','result'] 00130 _slot_types = ['Header','actionlib_msgs/GoalStatus','pr2_object_manipulation_msgs/IMGUIResult'] 00131 00132 def __init__(self, *args, **kwds): 00133 """ 00134 Constructor. Any message fields that are implicitly/explicitly 00135 set to None will be assigned a default value. The recommend 00136 use is keyword arguments as this is more robust to future message 00137 changes. You cannot mix in-order arguments and keyword arguments. 00138 00139 The available fields are: 00140 header,status,result 00141 00142 @param args: complete set of field values, in .msg order 00143 @param kwds: use keyword arguments corresponding to message field names 00144 to set specific fields. 00145 """ 00146 if args or kwds: 00147 super(IMGUIActionResult, self).__init__(*args, **kwds) 00148 #message fields cannot be None, assign default values for those that are 00149 if self.header is None: 00150 self.header = std_msgs.msg._Header.Header() 00151 if self.status is None: 00152 self.status = actionlib_msgs.msg.GoalStatus() 00153 if self.result is None: 00154 self.result = pr2_object_manipulation_msgs.msg.IMGUIResult() 00155 else: 00156 self.header = std_msgs.msg._Header.Header() 00157 self.status = actionlib_msgs.msg.GoalStatus() 00158 self.result = pr2_object_manipulation_msgs.msg.IMGUIResult() 00159 00160 def _get_types(self): 00161 """ 00162 internal API method 00163 """ 00164 return self._slot_types 00165 00166 def serialize(self, buff): 00167 """ 00168 serialize message into buffer 00169 @param buff: buffer 00170 @type buff: StringIO 00171 """ 00172 try: 00173 _x = self 00174 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00175 _x = self.header.frame_id 00176 length = len(_x) 00177 buff.write(struct.pack('<I%ss'%length, length, _x)) 00178 _x = self 00179 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00180 _x = self.status.goal_id.id 00181 length = len(_x) 00182 buff.write(struct.pack('<I%ss'%length, length, _x)) 00183 buff.write(_struct_B.pack(self.status.status)) 00184 _x = self.status.text 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 buff.write(_struct_i.pack(self.result.result.value)) 00188 except struct.error as se: self._check_types(se) 00189 except TypeError as te: self._check_types(te) 00190 00191 def deserialize(self, str): 00192 """ 00193 unpack serialized message in str into this message instance 00194 @param str: byte array of serialized message 00195 @type str: str 00196 """ 00197 try: 00198 if self.header is None: 00199 self.header = std_msgs.msg._Header.Header() 00200 if self.status is None: 00201 self.status = actionlib_msgs.msg.GoalStatus() 00202 if self.result is None: 00203 self.result = pr2_object_manipulation_msgs.msg.IMGUIResult() 00204 end = 0 00205 _x = self 00206 start = end 00207 end += 12 00208 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00209 start = end 00210 end += 4 00211 (length,) = _struct_I.unpack(str[start:end]) 00212 start = end 00213 end += length 00214 self.header.frame_id = str[start:end] 00215 _x = self 00216 start = end 00217 end += 8 00218 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00219 start = end 00220 end += 4 00221 (length,) = _struct_I.unpack(str[start:end]) 00222 start = end 00223 end += length 00224 self.status.goal_id.id = str[start:end] 00225 start = end 00226 end += 1 00227 (self.status.status,) = _struct_B.unpack(str[start:end]) 00228 start = end 00229 end += 4 00230 (length,) = _struct_I.unpack(str[start:end]) 00231 start = end 00232 end += length 00233 self.status.text = str[start:end] 00234 start = end 00235 end += 4 00236 (self.result.result.value,) = _struct_i.unpack(str[start:end]) 00237 return self 00238 except struct.error as e: 00239 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00240 00241 00242 def serialize_numpy(self, buff, numpy): 00243 """ 00244 serialize message with numpy array types into buffer 00245 @param buff: buffer 00246 @type buff: StringIO 00247 @param numpy: numpy python module 00248 @type numpy module 00249 """ 00250 try: 00251 _x = self 00252 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00253 _x = self.header.frame_id 00254 length = len(_x) 00255 buff.write(struct.pack('<I%ss'%length, length, _x)) 00256 _x = self 00257 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00258 _x = self.status.goal_id.id 00259 length = len(_x) 00260 buff.write(struct.pack('<I%ss'%length, length, _x)) 00261 buff.write(_struct_B.pack(self.status.status)) 00262 _x = self.status.text 00263 length = len(_x) 00264 buff.write(struct.pack('<I%ss'%length, length, _x)) 00265 buff.write(_struct_i.pack(self.result.result.value)) 00266 except struct.error as se: self._check_types(se) 00267 except TypeError as te: self._check_types(te) 00268 00269 def deserialize_numpy(self, str, numpy): 00270 """ 00271 unpack serialized message in str into this message instance using numpy for array types 00272 @param str: byte array of serialized message 00273 @type str: str 00274 @param numpy: numpy python module 00275 @type numpy: module 00276 """ 00277 try: 00278 if self.header is None: 00279 self.header = std_msgs.msg._Header.Header() 00280 if self.status is None: 00281 self.status = actionlib_msgs.msg.GoalStatus() 00282 if self.result is None: 00283 self.result = pr2_object_manipulation_msgs.msg.IMGUIResult() 00284 end = 0 00285 _x = self 00286 start = end 00287 end += 12 00288 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00289 start = end 00290 end += 4 00291 (length,) = _struct_I.unpack(str[start:end]) 00292 start = end 00293 end += length 00294 self.header.frame_id = str[start:end] 00295 _x = self 00296 start = end 00297 end += 8 00298 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00299 start = end 00300 end += 4 00301 (length,) = _struct_I.unpack(str[start:end]) 00302 start = end 00303 end += length 00304 self.status.goal_id.id = str[start:end] 00305 start = end 00306 end += 1 00307 (self.status.status,) = _struct_B.unpack(str[start:end]) 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 start = end 00312 end += length 00313 self.status.text = str[start:end] 00314 start = end 00315 end += 4 00316 (self.result.result.value,) = _struct_i.unpack(str[start:end]) 00317 return self 00318 except struct.error as e: 00319 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00320 00321 _struct_I = roslib.message.struct_I 00322 _struct_i = struct.Struct("<i") 00323 _struct_3I = struct.Struct("<3I") 00324 _struct_B = struct.Struct("<B") 00325 _struct_2I = struct.Struct("<2I")