$search
00001 """autogenerated by genmsg_py from UserCommandAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_interactive_object_detection.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class UserCommandAction(roslib.message.Message): 00011 _md5sum = "6f0314e1800e44b4f4f8b0f30a7d5258" 00012 _type = "pr2_interactive_object_detection/UserCommandAction" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 UserCommandActionGoal action_goal 00017 UserCommandActionResult action_result 00018 UserCommandActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: pr2_interactive_object_detection/UserCommandActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 UserCommandGoal goal 00027 00028 ================================================================================ 00029 MSG: std_msgs/Header 00030 # Standard metadata for higher-level stamped data types. 00031 # This is generally used to communicate timestamped data 00032 # in a particular coordinate frame. 00033 # 00034 # sequence ID: consecutively increasing ID 00035 uint32 seq 00036 #Two-integer timestamp that is expressed as: 00037 # * stamp.secs: seconds (stamp_secs) since epoch 00038 # * stamp.nsecs: nanoseconds since stamp_secs 00039 # time-handling sugar is provided by the client library 00040 time stamp 00041 #Frame this data is associated with 00042 # 0: no frame 00043 # 1: global frame 00044 string frame_id 00045 00046 ================================================================================ 00047 MSG: actionlib_msgs/GoalID 00048 # The stamp should store the time at which this goal was requested. 00049 # It is used by an action server when it tries to preempt all 00050 # goals that were requested before a certain time 00051 time stamp 00052 00053 # The id provides a way to associate feedback and 00054 # result message with specific goal requests. The id 00055 # specified must be unique. 00056 string id 00057 00058 00059 ================================================================================ 00060 MSG: pr2_interactive_object_detection/UserCommandGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 #request constants 00063 int8 LOOK_AT_TABLE=0 00064 00065 int8 SEGMENT=1 00066 int8 RECOGNIZE=2 00067 int8 DETECT=3 00068 int8 RESET=4 00069 00070 int8 request 00071 bool interactive 00072 00073 ================================================================================ 00074 MSG: pr2_interactive_object_detection/UserCommandActionResult 00075 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00076 00077 Header header 00078 actionlib_msgs/GoalStatus status 00079 UserCommandResult result 00080 00081 ================================================================================ 00082 MSG: actionlib_msgs/GoalStatus 00083 GoalID goal_id 00084 uint8 status 00085 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00086 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00087 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00088 # and has since completed its execution (Terminal State) 00089 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00090 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00091 # to some failure (Terminal State) 00092 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00093 # because the goal was unattainable or invalid (Terminal State) 00094 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00095 # and has not yet completed execution 00096 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00097 # but the action server has not yet confirmed that the goal is canceled 00098 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00099 # and was successfully cancelled (Terminal State) 00100 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00101 # sent over the wire by an action server 00102 00103 #Allow for the user to associate a string with GoalStatus for debugging 00104 string text 00105 00106 00107 ================================================================================ 00108 MSG: pr2_interactive_object_detection/UserCommandResult 00109 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00110 #no specific result 00111 00112 ================================================================================ 00113 MSG: pr2_interactive_object_detection/UserCommandActionFeedback 00114 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00115 00116 Header header 00117 actionlib_msgs/GoalStatus status 00118 UserCommandFeedback feedback 00119 00120 ================================================================================ 00121 MSG: pr2_interactive_object_detection/UserCommandFeedback 00122 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00123 #feedback in the form of a status string 00124 string status 00125 00126 00127 """ 00128 __slots__ = ['action_goal','action_result','action_feedback'] 00129 _slot_types = ['pr2_interactive_object_detection/UserCommandActionGoal','pr2_interactive_object_detection/UserCommandActionResult','pr2_interactive_object_detection/UserCommandActionFeedback'] 00130 00131 def __init__(self, *args, **kwds): 00132 """ 00133 Constructor. Any message fields that are implicitly/explicitly 00134 set to None will be assigned a default value. The recommend 00135 use is keyword arguments as this is more robust to future message 00136 changes. You cannot mix in-order arguments and keyword arguments. 00137 00138 The available fields are: 00139 action_goal,action_result,action_feedback 00140 00141 @param args: complete set of field values, in .msg order 00142 @param kwds: use keyword arguments corresponding to message field names 00143 to set specific fields. 00144 """ 00145 if args or kwds: 00146 super(UserCommandAction, self).__init__(*args, **kwds) 00147 #message fields cannot be None, assign default values for those that are 00148 if self.action_goal is None: 00149 self.action_goal = pr2_interactive_object_detection.msg.UserCommandActionGoal() 00150 if self.action_result is None: 00151 self.action_result = pr2_interactive_object_detection.msg.UserCommandActionResult() 00152 if self.action_feedback is None: 00153 self.action_feedback = pr2_interactive_object_detection.msg.UserCommandActionFeedback() 00154 else: 00155 self.action_goal = pr2_interactive_object_detection.msg.UserCommandActionGoal() 00156 self.action_result = pr2_interactive_object_detection.msg.UserCommandActionResult() 00157 self.action_feedback = pr2_interactive_object_detection.msg.UserCommandActionFeedback() 00158 00159 def _get_types(self): 00160 """ 00161 internal API method 00162 """ 00163 return self._slot_types 00164 00165 def serialize(self, buff): 00166 """ 00167 serialize message into buffer 00168 @param buff: buffer 00169 @type buff: StringIO 00170 """ 00171 try: 00172 _x = self 00173 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00174 _x = self.action_goal.header.frame_id 00175 length = len(_x) 00176 buff.write(struct.pack('<I%ss'%length, length, _x)) 00177 _x = self 00178 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00179 _x = self.action_goal.goal_id.id 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 _x = self 00183 buff.write(_struct_bB3I.pack(_x.action_goal.goal.request, _x.action_goal.goal.interactive, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00184 _x = self.action_result.header.frame_id 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 _x = self 00188 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00189 _x = self.action_result.status.goal_id.id 00190 length = len(_x) 00191 buff.write(struct.pack('<I%ss'%length, length, _x)) 00192 buff.write(_struct_B.pack(self.action_result.status.status)) 00193 _x = self.action_result.status.text 00194 length = len(_x) 00195 buff.write(struct.pack('<I%ss'%length, length, _x)) 00196 _x = self 00197 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00198 _x = self.action_feedback.header.frame_id 00199 length = len(_x) 00200 buff.write(struct.pack('<I%ss'%length, length, _x)) 00201 _x = self 00202 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00203 _x = self.action_feedback.status.goal_id.id 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00207 _x = self.action_feedback.status.text 00208 length = len(_x) 00209 buff.write(struct.pack('<I%ss'%length, length, _x)) 00210 _x = self.action_feedback.feedback.status 00211 length = len(_x) 00212 buff.write(struct.pack('<I%ss'%length, length, _x)) 00213 except struct.error as se: self._check_types(se) 00214 except TypeError as te: self._check_types(te) 00215 00216 def deserialize(self, str): 00217 """ 00218 unpack serialized message in str into this message instance 00219 @param str: byte array of serialized message 00220 @type str: str 00221 """ 00222 try: 00223 if self.action_goal is None: 00224 self.action_goal = pr2_interactive_object_detection.msg.UserCommandActionGoal() 00225 if self.action_result is None: 00226 self.action_result = pr2_interactive_object_detection.msg.UserCommandActionResult() 00227 if self.action_feedback is None: 00228 self.action_feedback = pr2_interactive_object_detection.msg.UserCommandActionFeedback() 00229 end = 0 00230 _x = self 00231 start = end 00232 end += 12 00233 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 self.action_goal.header.frame_id = str[start:end] 00240 _x = self 00241 start = end 00242 end += 8 00243 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00244 start = end 00245 end += 4 00246 (length,) = _struct_I.unpack(str[start:end]) 00247 start = end 00248 end += length 00249 self.action_goal.goal_id.id = str[start:end] 00250 _x = self 00251 start = end 00252 end += 14 00253 (_x.action_goal.goal.request, _x.action_goal.goal.interactive, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_bB3I.unpack(str[start:end]) 00254 self.action_goal.goal.interactive = bool(self.action_goal.goal.interactive) 00255 start = end 00256 end += 4 00257 (length,) = _struct_I.unpack(str[start:end]) 00258 start = end 00259 end += length 00260 self.action_result.header.frame_id = str[start:end] 00261 _x = self 00262 start = end 00263 end += 8 00264 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00265 start = end 00266 end += 4 00267 (length,) = _struct_I.unpack(str[start:end]) 00268 start = end 00269 end += length 00270 self.action_result.status.goal_id.id = str[start:end] 00271 start = end 00272 end += 1 00273 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00274 start = end 00275 end += 4 00276 (length,) = _struct_I.unpack(str[start:end]) 00277 start = end 00278 end += length 00279 self.action_result.status.text = str[start:end] 00280 _x = self 00281 start = end 00282 end += 12 00283 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 start = end 00288 end += length 00289 self.action_feedback.header.frame_id = str[start:end] 00290 _x = self 00291 start = end 00292 end += 8 00293 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00294 start = end 00295 end += 4 00296 (length,) = _struct_I.unpack(str[start:end]) 00297 start = end 00298 end += length 00299 self.action_feedback.status.goal_id.id = str[start:end] 00300 start = end 00301 end += 1 00302 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00303 start = end 00304 end += 4 00305 (length,) = _struct_I.unpack(str[start:end]) 00306 start = end 00307 end += length 00308 self.action_feedback.status.text = str[start:end] 00309 start = end 00310 end += 4 00311 (length,) = _struct_I.unpack(str[start:end]) 00312 start = end 00313 end += length 00314 self.action_feedback.feedback.status = str[start:end] 00315 return self 00316 except struct.error as e: 00317 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00318 00319 00320 def serialize_numpy(self, buff, numpy): 00321 """ 00322 serialize message with numpy array types into buffer 00323 @param buff: buffer 00324 @type buff: StringIO 00325 @param numpy: numpy python module 00326 @type numpy module 00327 """ 00328 try: 00329 _x = self 00330 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00331 _x = self.action_goal.header.frame_id 00332 length = len(_x) 00333 buff.write(struct.pack('<I%ss'%length, length, _x)) 00334 _x = self 00335 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00336 _x = self.action_goal.goal_id.id 00337 length = len(_x) 00338 buff.write(struct.pack('<I%ss'%length, length, _x)) 00339 _x = self 00340 buff.write(_struct_bB3I.pack(_x.action_goal.goal.request, _x.action_goal.goal.interactive, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00341 _x = self.action_result.header.frame_id 00342 length = len(_x) 00343 buff.write(struct.pack('<I%ss'%length, length, _x)) 00344 _x = self 00345 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00346 _x = self.action_result.status.goal_id.id 00347 length = len(_x) 00348 buff.write(struct.pack('<I%ss'%length, length, _x)) 00349 buff.write(_struct_B.pack(self.action_result.status.status)) 00350 _x = self.action_result.status.text 00351 length = len(_x) 00352 buff.write(struct.pack('<I%ss'%length, length, _x)) 00353 _x = self 00354 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00355 _x = self.action_feedback.header.frame_id 00356 length = len(_x) 00357 buff.write(struct.pack('<I%ss'%length, length, _x)) 00358 _x = self 00359 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00360 _x = self.action_feedback.status.goal_id.id 00361 length = len(_x) 00362 buff.write(struct.pack('<I%ss'%length, length, _x)) 00363 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00364 _x = self.action_feedback.status.text 00365 length = len(_x) 00366 buff.write(struct.pack('<I%ss'%length, length, _x)) 00367 _x = self.action_feedback.feedback.status 00368 length = len(_x) 00369 buff.write(struct.pack('<I%ss'%length, length, _x)) 00370 except struct.error as se: self._check_types(se) 00371 except TypeError as te: self._check_types(te) 00372 00373 def deserialize_numpy(self, str, numpy): 00374 """ 00375 unpack serialized message in str into this message instance using numpy for array types 00376 @param str: byte array of serialized message 00377 @type str: str 00378 @param numpy: numpy python module 00379 @type numpy: module 00380 """ 00381 try: 00382 if self.action_goal is None: 00383 self.action_goal = pr2_interactive_object_detection.msg.UserCommandActionGoal() 00384 if self.action_result is None: 00385 self.action_result = pr2_interactive_object_detection.msg.UserCommandActionResult() 00386 if self.action_feedback is None: 00387 self.action_feedback = pr2_interactive_object_detection.msg.UserCommandActionFeedback() 00388 end = 0 00389 _x = self 00390 start = end 00391 end += 12 00392 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00393 start = end 00394 end += 4 00395 (length,) = _struct_I.unpack(str[start:end]) 00396 start = end 00397 end += length 00398 self.action_goal.header.frame_id = str[start:end] 00399 _x = self 00400 start = end 00401 end += 8 00402 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00403 start = end 00404 end += 4 00405 (length,) = _struct_I.unpack(str[start:end]) 00406 start = end 00407 end += length 00408 self.action_goal.goal_id.id = str[start:end] 00409 _x = self 00410 start = end 00411 end += 14 00412 (_x.action_goal.goal.request, _x.action_goal.goal.interactive, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_bB3I.unpack(str[start:end]) 00413 self.action_goal.goal.interactive = bool(self.action_goal.goal.interactive) 00414 start = end 00415 end += 4 00416 (length,) = _struct_I.unpack(str[start:end]) 00417 start = end 00418 end += length 00419 self.action_result.header.frame_id = str[start:end] 00420 _x = self 00421 start = end 00422 end += 8 00423 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00424 start = end 00425 end += 4 00426 (length,) = _struct_I.unpack(str[start:end]) 00427 start = end 00428 end += length 00429 self.action_result.status.goal_id.id = str[start:end] 00430 start = end 00431 end += 1 00432 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00433 start = end 00434 end += 4 00435 (length,) = _struct_I.unpack(str[start:end]) 00436 start = end 00437 end += length 00438 self.action_result.status.text = str[start:end] 00439 _x = self 00440 start = end 00441 end += 12 00442 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00443 start = end 00444 end += 4 00445 (length,) = _struct_I.unpack(str[start:end]) 00446 start = end 00447 end += length 00448 self.action_feedback.header.frame_id = str[start:end] 00449 _x = self 00450 start = end 00451 end += 8 00452 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00453 start = end 00454 end += 4 00455 (length,) = _struct_I.unpack(str[start:end]) 00456 start = end 00457 end += length 00458 self.action_feedback.status.goal_id.id = str[start:end] 00459 start = end 00460 end += 1 00461 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00462 start = end 00463 end += 4 00464 (length,) = _struct_I.unpack(str[start:end]) 00465 start = end 00466 end += length 00467 self.action_feedback.status.text = str[start:end] 00468 start = end 00469 end += 4 00470 (length,) = _struct_I.unpack(str[start:end]) 00471 start = end 00472 end += length 00473 self.action_feedback.feedback.status = str[start:end] 00474 return self 00475 except struct.error as e: 00476 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00477 00478 _struct_I = roslib.message.struct_I 00479 _struct_bB3I = struct.Struct("<bB3I") 00480 _struct_3I = struct.Struct("<3I") 00481 _struct_B = struct.Struct("<B") 00482 _struct_2I = struct.Struct("<2I")