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