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