00001 """autogenerated by genpy from nao_msgs/BodyPoseAction.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 genpy
00008 import nao_msgs.msg
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class BodyPoseAction(genpy.Message):
00013 _md5sum = "bc58fd1218bb64624b76dca7ad8a5a81"
00014 _type = "nao_msgs/BodyPoseAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 BodyPoseActionGoal action_goal
00019 BodyPoseActionResult action_result
00020 BodyPoseActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: nao_msgs/BodyPoseActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 BodyPoseGoal 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: nao_msgs/BodyPoseGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 # goal: a registered body pose name
00065 string pose_name
00066
00067 ================================================================================
00068 MSG: nao_msgs/BodyPoseActionResult
00069 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00070
00071 Header header
00072 actionlib_msgs/GoalStatus status
00073 BodyPoseResult result
00074
00075 ================================================================================
00076 MSG: actionlib_msgs/GoalStatus
00077 GoalID goal_id
00078 uint8 status
00079 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00080 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00081 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00082 # and has since completed its execution (Terminal State)
00083 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00084 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00085 # to some failure (Terminal State)
00086 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00087 # because the goal was unattainable or invalid (Terminal State)
00088 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00089 # and has not yet completed execution
00090 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00091 # but the action server has not yet confirmed that the goal is canceled
00092 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00093 # and was successfully cancelled (Terminal State)
00094 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00095 # sent over the wire by an action server
00096
00097 #Allow for the user to associate a string with GoalStatus for debugging
00098 string text
00099
00100
00101 ================================================================================
00102 MSG: nao_msgs/BodyPoseResult
00103 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00104 # no result currently
00105
00106 ================================================================================
00107 MSG: nao_msgs/BodyPoseActionFeedback
00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00109
00110 Header header
00111 actionlib_msgs/GoalStatus status
00112 BodyPoseFeedback feedback
00113
00114 ================================================================================
00115 MSG: nao_msgs/BodyPoseFeedback
00116 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00117 # no feedback currently
00118
00119 """
00120 __slots__ = ['action_goal','action_result','action_feedback']
00121 _slot_types = ['nao_msgs/BodyPoseActionGoal','nao_msgs/BodyPoseActionResult','nao_msgs/BodyPoseActionFeedback']
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(BodyPoseAction, self).__init__(*args, **kwds)
00139
00140 if self.action_goal is None:
00141 self.action_goal = nao_msgs.msg.BodyPoseActionGoal()
00142 if self.action_result is None:
00143 self.action_result = nao_msgs.msg.BodyPoseActionResult()
00144 if self.action_feedback is None:
00145 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback()
00146 else:
00147 self.action_goal = nao_msgs.msg.BodyPoseActionGoal()
00148 self.action_result = nao_msgs.msg.BodyPoseActionResult()
00149 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback()
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, ``StringIO``
00161 """
00162 try:
00163 _x = self
00164 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00165 _x = self.action_goal.header.frame_id
00166 length = len(_x)
00167 if python3 or type(_x) == unicode:
00168 _x = _x.encode('utf-8')
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 if python3 or type(_x) == unicode:
00176 _x = _x.encode('utf-8')
00177 length = len(_x)
00178 buff.write(struct.pack('<I%ss'%length, length, _x))
00179 _x = self.action_goal.goal.pose_name
00180 length = len(_x)
00181 if python3 or type(_x) == unicode:
00182 _x = _x.encode('utf-8')
00183 length = len(_x)
00184 buff.write(struct.pack('<I%ss'%length, length, _x))
00185 _x = self
00186 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00187 _x = self.action_result.header.frame_id
00188 length = len(_x)
00189 if python3 or type(_x) == unicode:
00190 _x = _x.encode('utf-8')
00191 length = len(_x)
00192 buff.write(struct.pack('<I%ss'%length, length, _x))
00193 _x = self
00194 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00195 _x = self.action_result.status.goal_id.id
00196 length = len(_x)
00197 if python3 or type(_x) == unicode:
00198 _x = _x.encode('utf-8')
00199 length = len(_x)
00200 buff.write(struct.pack('<I%ss'%length, length, _x))
00201 buff.write(_struct_B.pack(self.action_result.status.status))
00202 _x = self.action_result.status.text
00203 length = len(_x)
00204 if python3 or type(_x) == unicode:
00205 _x = _x.encode('utf-8')
00206 length = len(_x)
00207 buff.write(struct.pack('<I%ss'%length, length, _x))
00208 _x = self
00209 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00210 _x = self.action_feedback.header.frame_id
00211 length = len(_x)
00212 if python3 or type(_x) == unicode:
00213 _x = _x.encode('utf-8')
00214 length = len(_x)
00215 buff.write(struct.pack('<I%ss'%length, length, _x))
00216 _x = self
00217 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00218 _x = self.action_feedback.status.goal_id.id
00219 length = len(_x)
00220 if python3 or type(_x) == unicode:
00221 _x = _x.encode('utf-8')
00222 length = len(_x)
00223 buff.write(struct.pack('<I%ss'%length, length, _x))
00224 buff.write(_struct_B.pack(self.action_feedback.status.status))
00225 _x = self.action_feedback.status.text
00226 length = len(_x)
00227 if python3 or type(_x) == unicode:
00228 _x = _x.encode('utf-8')
00229 length = len(_x)
00230 buff.write(struct.pack('<I%ss'%length, length, _x))
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 = nao_msgs.msg.BodyPoseActionGoal()
00242 if self.action_result is None:
00243 self.action_result = nao_msgs.msg.BodyPoseActionResult()
00244 if self.action_feedback is None:
00245 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback()
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 start = end
00274 end += 4
00275 (length,) = _struct_I.unpack(str[start:end])
00276 start = end
00277 end += length
00278 if python3:
00279 self.action_goal.goal.pose_name = str[start:end].decode('utf-8')
00280 else:
00281 self.action_goal.goal.pose_name = str[start:end]
00282 _x = self
00283 start = end
00284 end += 12
00285 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.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 if python3:
00292 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00293 else:
00294 self.action_result.header.frame_id = str[start:end]
00295 _x = self
00296 start = end
00297 end += 8
00298 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00299 start = end
00300 end += 4
00301 (length,) = _struct_I.unpack(str[start:end])
00302 start = end
00303 end += length
00304 if python3:
00305 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00306 else:
00307 self.action_result.status.goal_id.id = str[start:end]
00308 start = end
00309 end += 1
00310 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00311 start = end
00312 end += 4
00313 (length,) = _struct_I.unpack(str[start:end])
00314 start = end
00315 end += length
00316 if python3:
00317 self.action_result.status.text = str[start:end].decode('utf-8')
00318 else:
00319 self.action_result.status.text = str[start:end]
00320 _x = self
00321 start = end
00322 end += 12
00323 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00324 start = end
00325 end += 4
00326 (length,) = _struct_I.unpack(str[start:end])
00327 start = end
00328 end += length
00329 if python3:
00330 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00331 else:
00332 self.action_feedback.header.frame_id = str[start:end]
00333 _x = self
00334 start = end
00335 end += 8
00336 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00337 start = end
00338 end += 4
00339 (length,) = _struct_I.unpack(str[start:end])
00340 start = end
00341 end += length
00342 if python3:
00343 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00344 else:
00345 self.action_feedback.status.goal_id.id = str[start:end]
00346 start = end
00347 end += 1
00348 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00349 start = end
00350 end += 4
00351 (length,) = _struct_I.unpack(str[start:end])
00352 start = end
00353 end += length
00354 if python3:
00355 self.action_feedback.status.text = str[start:end].decode('utf-8')
00356 else:
00357 self.action_feedback.status.text = str[start:end]
00358 return self
00359 except struct.error as e:
00360 raise genpy.DeserializationError(e)
00361
00362
00363 def serialize_numpy(self, buff, numpy):
00364 """
00365 serialize message with numpy array types into buffer
00366 :param buff: buffer, ``StringIO``
00367 :param numpy: numpy python module
00368 """
00369 try:
00370 _x = self
00371 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00372 _x = self.action_goal.header.frame_id
00373 length = len(_x)
00374 if python3 or type(_x) == unicode:
00375 _x = _x.encode('utf-8')
00376 length = len(_x)
00377 buff.write(struct.pack('<I%ss'%length, length, _x))
00378 _x = self
00379 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00380 _x = self.action_goal.goal_id.id
00381 length = len(_x)
00382 if python3 or type(_x) == unicode:
00383 _x = _x.encode('utf-8')
00384 length = len(_x)
00385 buff.write(struct.pack('<I%ss'%length, length, _x))
00386 _x = self.action_goal.goal.pose_name
00387 length = len(_x)
00388 if python3 or type(_x) == unicode:
00389 _x = _x.encode('utf-8')
00390 length = len(_x)
00391 buff.write(struct.pack('<I%ss'%length, length, _x))
00392 _x = self
00393 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00394 _x = self.action_result.header.frame_id
00395 length = len(_x)
00396 if python3 or type(_x) == unicode:
00397 _x = _x.encode('utf-8')
00398 length = len(_x)
00399 buff.write(struct.pack('<I%ss'%length, length, _x))
00400 _x = self
00401 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00402 _x = self.action_result.status.goal_id.id
00403 length = len(_x)
00404 if python3 or type(_x) == unicode:
00405 _x = _x.encode('utf-8')
00406 length = len(_x)
00407 buff.write(struct.pack('<I%ss'%length, length, _x))
00408 buff.write(_struct_B.pack(self.action_result.status.status))
00409 _x = self.action_result.status.text
00410 length = len(_x)
00411 if python3 or type(_x) == unicode:
00412 _x = _x.encode('utf-8')
00413 length = len(_x)
00414 buff.write(struct.pack('<I%ss'%length, length, _x))
00415 _x = self
00416 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00417 _x = self.action_feedback.header.frame_id
00418 length = len(_x)
00419 if python3 or type(_x) == unicode:
00420 _x = _x.encode('utf-8')
00421 length = len(_x)
00422 buff.write(struct.pack('<I%ss'%length, length, _x))
00423 _x = self
00424 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00425 _x = self.action_feedback.status.goal_id.id
00426 length = len(_x)
00427 if python3 or type(_x) == unicode:
00428 _x = _x.encode('utf-8')
00429 length = len(_x)
00430 buff.write(struct.pack('<I%ss'%length, length, _x))
00431 buff.write(_struct_B.pack(self.action_feedback.status.status))
00432 _x = self.action_feedback.status.text
00433 length = len(_x)
00434 if python3 or type(_x) == unicode:
00435 _x = _x.encode('utf-8')
00436 length = len(_x)
00437 buff.write(struct.pack('<I%ss'%length, length, _x))
00438 except struct.error as se: self._check_types(se)
00439 except TypeError as te: self._check_types(te)
00440
00441 def deserialize_numpy(self, str, numpy):
00442 """
00443 unpack serialized message in str into this message instance using numpy for array types
00444 :param str: byte array of serialized message, ``str``
00445 :param numpy: numpy python module
00446 """
00447 try:
00448 if self.action_goal is None:
00449 self.action_goal = nao_msgs.msg.BodyPoseActionGoal()
00450 if self.action_result is None:
00451 self.action_result = nao_msgs.msg.BodyPoseActionResult()
00452 if self.action_feedback is None:
00453 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback()
00454 end = 0
00455 _x = self
00456 start = end
00457 end += 12
00458 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00459 start = end
00460 end += 4
00461 (length,) = _struct_I.unpack(str[start:end])
00462 start = end
00463 end += length
00464 if python3:
00465 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00466 else:
00467 self.action_goal.header.frame_id = str[start:end]
00468 _x = self
00469 start = end
00470 end += 8
00471 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.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 if python3:
00478 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00479 else:
00480 self.action_goal.goal_id.id = str[start:end]
00481 start = end
00482 end += 4
00483 (length,) = _struct_I.unpack(str[start:end])
00484 start = end
00485 end += length
00486 if python3:
00487 self.action_goal.goal.pose_name = str[start:end].decode('utf-8')
00488 else:
00489 self.action_goal.goal.pose_name = str[start:end]
00490 _x = self
00491 start = end
00492 end += 12
00493 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00494 start = end
00495 end += 4
00496 (length,) = _struct_I.unpack(str[start:end])
00497 start = end
00498 end += length
00499 if python3:
00500 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00501 else:
00502 self.action_result.header.frame_id = str[start:end]
00503 _x = self
00504 start = end
00505 end += 8
00506 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00507 start = end
00508 end += 4
00509 (length,) = _struct_I.unpack(str[start:end])
00510 start = end
00511 end += length
00512 if python3:
00513 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00514 else:
00515 self.action_result.status.goal_id.id = str[start:end]
00516 start = end
00517 end += 1
00518 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00519 start = end
00520 end += 4
00521 (length,) = _struct_I.unpack(str[start:end])
00522 start = end
00523 end += length
00524 if python3:
00525 self.action_result.status.text = str[start:end].decode('utf-8')
00526 else:
00527 self.action_result.status.text = str[start:end]
00528 _x = self
00529 start = end
00530 end += 12
00531 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00532 start = end
00533 end += 4
00534 (length,) = _struct_I.unpack(str[start:end])
00535 start = end
00536 end += length
00537 if python3:
00538 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00539 else:
00540 self.action_feedback.header.frame_id = str[start:end]
00541 _x = self
00542 start = end
00543 end += 8
00544 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00545 start = end
00546 end += 4
00547 (length,) = _struct_I.unpack(str[start:end])
00548 start = end
00549 end += length
00550 if python3:
00551 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00552 else:
00553 self.action_feedback.status.goal_id.id = str[start:end]
00554 start = end
00555 end += 1
00556 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00557 start = end
00558 end += 4
00559 (length,) = _struct_I.unpack(str[start:end])
00560 start = end
00561 end += length
00562 if python3:
00563 self.action_feedback.status.text = str[start:end].decode('utf-8')
00564 else:
00565 self.action_feedback.status.text = str[start:end]
00566 return self
00567 except struct.error as e:
00568 raise genpy.DeserializationError(e)
00569
00570 _struct_I = genpy.struct_I
00571 _struct_3I = struct.Struct("<3I")
00572 _struct_B = struct.Struct("<B")
00573 _struct_2I = struct.Struct("<2I")