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