$search
00001 """autogenerated by genmsg_py from TwoIntsAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import actionlib_msgs.msg 00006 import roslib.rostime 00007 import actionlib.msg 00008 import std_msgs.msg 00009 00010 class TwoIntsAction(roslib.message.Message): 00011 _md5sum = "6d1aa538c4bd6183a2dfb7fcac41ee50" 00012 _type = "actionlib/TwoIntsAction" 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 TwoIntsActionGoal action_goal 00017 TwoIntsActionResult action_result 00018 TwoIntsActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: actionlib/TwoIntsActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 TwoIntsGoal 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: actionlib/TwoIntsGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 int64 a 00063 int64 b 00064 00065 ================================================================================ 00066 MSG: actionlib/TwoIntsActionResult 00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00068 00069 Header header 00070 actionlib_msgs/GoalStatus status 00071 TwoIntsResult 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: actionlib/TwoIntsResult 00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00102 int64 sum 00103 00104 ================================================================================ 00105 MSG: actionlib/TwoIntsActionFeedback 00106 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00107 00108 Header header 00109 actionlib_msgs/GoalStatus status 00110 TwoIntsFeedback feedback 00111 00112 ================================================================================ 00113 MSG: actionlib/TwoIntsFeedback 00114 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00115 00116 00117 """ 00118 __slots__ = ['action_goal','action_result','action_feedback'] 00119 _slot_types = ['actionlib/TwoIntsActionGoal','actionlib/TwoIntsActionResult','actionlib/TwoIntsActionFeedback'] 00120 00121 def __init__(self, *args, **kwds): 00122 """ 00123 Constructor. Any message fields that are implicitly/explicitly 00124 set to None will be assigned a default value. The recommend 00125 use is keyword arguments as this is more robust to future message 00126 changes. You cannot mix in-order arguments and keyword arguments. 00127 00128 The available fields are: 00129 action_goal,action_result,action_feedback 00130 00131 @param args: complete set of field values, in .msg order 00132 @param kwds: use keyword arguments corresponding to message field names 00133 to set specific fields. 00134 """ 00135 if args or kwds: 00136 super(TwoIntsAction, self).__init__(*args, **kwds) 00137 #message fields cannot be None, assign default values for those that are 00138 if self.action_goal is None: 00139 self.action_goal = actionlib.msg.TwoIntsActionGoal() 00140 if self.action_result is None: 00141 self.action_result = actionlib.msg.TwoIntsActionResult() 00142 if self.action_feedback is None: 00143 self.action_feedback = actionlib.msg.TwoIntsActionFeedback() 00144 else: 00145 self.action_goal = actionlib.msg.TwoIntsActionGoal() 00146 self.action_result = actionlib.msg.TwoIntsActionResult() 00147 self.action_feedback = actionlib.msg.TwoIntsActionFeedback() 00148 00149 def _get_types(self): 00150 """ 00151 internal API method 00152 """ 00153 return self._slot_types 00154 00155 def serialize(self, buff): 00156 """ 00157 serialize message into buffer 00158 @param buff: buffer 00159 @type buff: StringIO 00160 """ 00161 try: 00162 _x = self 00163 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00164 _x = self.action_goal.header.frame_id 00165 length = len(_x) 00166 buff.write(struct.pack('<I%ss'%length, length, _x)) 00167 _x = self 00168 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00169 _x = self.action_goal.goal_id.id 00170 length = len(_x) 00171 buff.write(struct.pack('<I%ss'%length, length, _x)) 00172 _x = self 00173 buff.write(_struct_2q3I.pack(_x.action_goal.goal.a, _x.action_goal.goal.b, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00174 _x = self.action_result.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_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00179 _x = self.action_result.status.goal_id.id 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 buff.write(_struct_B.pack(self.action_result.status.status)) 00183 _x = self.action_result.status.text 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 _x = self 00187 buff.write(_struct_q3I.pack(_x.action_result.result.sum, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00188 _x = self.action_feedback.header.frame_id 00189 length = len(_x) 00190 buff.write(struct.pack('<I%ss'%length, length, _x)) 00191 _x = self 00192 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00193 _x = self.action_feedback.status.goal_id.id 00194 length = len(_x) 00195 buff.write(struct.pack('<I%ss'%length, length, _x)) 00196 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00197 _x = self.action_feedback.status.text 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 except struct.error as se: self._check_types(se) 00201 except TypeError as te: self._check_types(te) 00202 00203 def deserialize(self, str): 00204 """ 00205 unpack serialized message in str into this message instance 00206 @param str: byte array of serialized message 00207 @type str: str 00208 """ 00209 try: 00210 if self.action_goal is None: 00211 self.action_goal = actionlib.msg.TwoIntsActionGoal() 00212 if self.action_result is None: 00213 self.action_result = actionlib.msg.TwoIntsActionResult() 00214 if self.action_feedback is None: 00215 self.action_feedback = actionlib.msg.TwoIntsActionFeedback() 00216 end = 0 00217 _x = self 00218 start = end 00219 end += 12 00220 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00221 start = end 00222 end += 4 00223 (length,) = _struct_I.unpack(str[start:end]) 00224 start = end 00225 end += length 00226 self.action_goal.header.frame_id = str[start:end] 00227 _x = self 00228 start = end 00229 end += 8 00230 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end] 00237 _x = self 00238 start = end 00239 end += 28 00240 (_x.action_goal.goal.a, _x.action_goal.goal.b, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2q3I.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_result.header.frame_id = str[start:end] 00247 _x = self 00248 start = end 00249 end += 8 00250 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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.status.goal_id.id = str[start:end] 00257 start = end 00258 end += 1 00259 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00260 start = end 00261 end += 4 00262 (length,) = _struct_I.unpack(str[start:end]) 00263 start = end 00264 end += length 00265 self.action_result.status.text = str[start:end] 00266 _x = self 00267 start = end 00268 end += 20 00269 (_x.action_result.result.sum, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_q3I.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_feedback.header.frame_id = str[start:end] 00276 _x = self 00277 start = end 00278 end += 8 00279 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00280 start = end 00281 end += 4 00282 (length,) = _struct_I.unpack(str[start:end]) 00283 start = end 00284 end += length 00285 self.action_feedback.status.goal_id.id = str[start:end] 00286 start = end 00287 end += 1 00288 (self.action_feedback.status.status,) = _struct_B.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.action_feedback.status.text = str[start:end] 00295 return self 00296 except struct.error as e: 00297 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00298 00299 00300 def serialize_numpy(self, buff, numpy): 00301 """ 00302 serialize message with numpy array types into buffer 00303 @param buff: buffer 00304 @type buff: StringIO 00305 @param numpy: numpy python module 00306 @type numpy module 00307 """ 00308 try: 00309 _x = self 00310 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00311 _x = self.action_goal.header.frame_id 00312 length = len(_x) 00313 buff.write(struct.pack('<I%ss'%length, length, _x)) 00314 _x = self 00315 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00316 _x = self.action_goal.goal_id.id 00317 length = len(_x) 00318 buff.write(struct.pack('<I%ss'%length, length, _x)) 00319 _x = self 00320 buff.write(_struct_2q3I.pack(_x.action_goal.goal.a, _x.action_goal.goal.b, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00321 _x = self.action_result.header.frame_id 00322 length = len(_x) 00323 buff.write(struct.pack('<I%ss'%length, length, _x)) 00324 _x = self 00325 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00326 _x = self.action_result.status.goal_id.id 00327 length = len(_x) 00328 buff.write(struct.pack('<I%ss'%length, length, _x)) 00329 buff.write(_struct_B.pack(self.action_result.status.status)) 00330 _x = self.action_result.status.text 00331 length = len(_x) 00332 buff.write(struct.pack('<I%ss'%length, length, _x)) 00333 _x = self 00334 buff.write(_struct_q3I.pack(_x.action_result.result.sum, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00335 _x = self.action_feedback.header.frame_id 00336 length = len(_x) 00337 buff.write(struct.pack('<I%ss'%length, length, _x)) 00338 _x = self 00339 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00340 _x = self.action_feedback.status.goal_id.id 00341 length = len(_x) 00342 buff.write(struct.pack('<I%ss'%length, length, _x)) 00343 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00344 _x = self.action_feedback.status.text 00345 length = len(_x) 00346 buff.write(struct.pack('<I%ss'%length, length, _x)) 00347 except struct.error as se: self._check_types(se) 00348 except TypeError as te: self._check_types(te) 00349 00350 def deserialize_numpy(self, str, numpy): 00351 """ 00352 unpack serialized message in str into this message instance using numpy for array types 00353 @param str: byte array of serialized message 00354 @type str: str 00355 @param numpy: numpy python module 00356 @type numpy: module 00357 """ 00358 try: 00359 if self.action_goal is None: 00360 self.action_goal = actionlib.msg.TwoIntsActionGoal() 00361 if self.action_result is None: 00362 self.action_result = actionlib.msg.TwoIntsActionResult() 00363 if self.action_feedback is None: 00364 self.action_feedback = actionlib.msg.TwoIntsActionFeedback() 00365 end = 0 00366 _x = self 00367 start = end 00368 end += 12 00369 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00370 start = end 00371 end += 4 00372 (length,) = _struct_I.unpack(str[start:end]) 00373 start = end 00374 end += length 00375 self.action_goal.header.frame_id = str[start:end] 00376 _x = self 00377 start = end 00378 end += 8 00379 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00380 start = end 00381 end += 4 00382 (length,) = _struct_I.unpack(str[start:end]) 00383 start = end 00384 end += length 00385 self.action_goal.goal_id.id = str[start:end] 00386 _x = self 00387 start = end 00388 end += 28 00389 (_x.action_goal.goal.a, _x.action_goal.goal.b, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2q3I.unpack(str[start:end]) 00390 start = end 00391 end += 4 00392 (length,) = _struct_I.unpack(str[start:end]) 00393 start = end 00394 end += length 00395 self.action_result.header.frame_id = str[start:end] 00396 _x = self 00397 start = end 00398 end += 8 00399 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00400 start = end 00401 end += 4 00402 (length,) = _struct_I.unpack(str[start:end]) 00403 start = end 00404 end += length 00405 self.action_result.status.goal_id.id = str[start:end] 00406 start = end 00407 end += 1 00408 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00409 start = end 00410 end += 4 00411 (length,) = _struct_I.unpack(str[start:end]) 00412 start = end 00413 end += length 00414 self.action_result.status.text = str[start:end] 00415 _x = self 00416 start = end 00417 end += 20 00418 (_x.action_result.result.sum, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_q3I.unpack(str[start:end]) 00419 start = end 00420 end += 4 00421 (length,) = _struct_I.unpack(str[start:end]) 00422 start = end 00423 end += length 00424 self.action_feedback.header.frame_id = str[start:end] 00425 _x = self 00426 start = end 00427 end += 8 00428 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00429 start = end 00430 end += 4 00431 (length,) = _struct_I.unpack(str[start:end]) 00432 start = end 00433 end += length 00434 self.action_feedback.status.goal_id.id = str[start:end] 00435 start = end 00436 end += 1 00437 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00438 start = end 00439 end += 4 00440 (length,) = _struct_I.unpack(str[start:end]) 00441 start = end 00442 end += length 00443 self.action_feedback.status.text = str[start:end] 00444 return self 00445 except struct.error as e: 00446 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00447 00448 _struct_I = roslib.message.struct_I 00449 _struct_q3I = struct.Struct("<q3I") 00450 _struct_3I = struct.Struct("<3I") 00451 _struct_B = struct.Struct("<B") 00452 _struct_2I = struct.Struct("<2I") 00453 _struct_2q3I = struct.Struct("<2q3I")