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