00001 """autogenerated by genpy from simple_move_base/GoAngleAction.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 actionlib_msgs.msg
00008 import genpy
00009 import simple_move_base.msg
00010 import std_msgs.msg
00011
00012 class GoAngleAction(genpy.Message):
00013 _md5sum = "0756d4043cc95978d05497b2e6b0dc6b"
00014 _type = "simple_move_base/GoAngleAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 GoAngleActionGoal action_goal
00019 GoAngleActionResult action_result
00020 GoAngleActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: simple_move_base/GoAngleActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 GoAngleGoal 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: simple_move_base/GoAngleGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 float64 angle
00065
00066 ================================================================================
00067 MSG: simple_move_base/GoAngleActionResult
00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00069
00070 Header header
00071 actionlib_msgs/GoalStatus status
00072 GoAngleResult 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: simple_move_base/GoAngleResult
00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00103 float64 error
00104
00105 ================================================================================
00106 MSG: simple_move_base/GoAngleActionFeedback
00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00108
00109 Header header
00110 actionlib_msgs/GoalStatus status
00111 GoAngleFeedback feedback
00112
00113 ================================================================================
00114 MSG: simple_move_base/GoAngleFeedback
00115 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00116 float64 error
00117
00118
00119 """
00120 __slots__ = ['action_goal','action_result','action_feedback']
00121 _slot_types = ['simple_move_base/GoAngleActionGoal','simple_move_base/GoAngleActionResult','simple_move_base/GoAngleActionFeedback']
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(GoAngleAction, self).__init__(*args, **kwds)
00139
00140 if self.action_goal is None:
00141 self.action_goal = simple_move_base.msg.GoAngleActionGoal()
00142 if self.action_result is None:
00143 self.action_result = simple_move_base.msg.GoAngleActionResult()
00144 if self.action_feedback is None:
00145 self.action_feedback = simple_move_base.msg.GoAngleActionFeedback()
00146 else:
00147 self.action_goal = simple_move_base.msg.GoAngleActionGoal()
00148 self.action_result = simple_move_base.msg.GoAngleActionResult()
00149 self.action_feedback = simple_move_base.msg.GoAngleActionFeedback()
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
00180 buff.write(_struct_d3I.pack(_x.action_goal.goal.angle, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00181 _x = self.action_result.header.frame_id
00182 length = len(_x)
00183 if python3 or type(_x) == unicode:
00184 _x = _x.encode('utf-8')
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00189 _x = self.action_result.status.goal_id.id
00190 length = len(_x)
00191 if python3 or type(_x) == unicode:
00192 _x = _x.encode('utf-8')
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 buff.write(_struct_B.pack(self.action_result.status.status))
00196 _x = self.action_result.status.text
00197 length = len(_x)
00198 if python3 or type(_x) == unicode:
00199 _x = _x.encode('utf-8')
00200 length = len(_x)
00201 buff.write(struct.pack('<I%ss'%length, length, _x))
00202 _x = self
00203 buff.write(_struct_d3I.pack(_x.action_result.result.error, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00204 _x = self.action_feedback.header.frame_id
00205 length = len(_x)
00206 if python3 or type(_x) == unicode:
00207 _x = _x.encode('utf-8')
00208 length = len(_x)
00209 buff.write(struct.pack('<I%ss'%length, length, _x))
00210 _x = self
00211 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00212 _x = self.action_feedback.status.goal_id.id
00213 length = len(_x)
00214 if python3 or type(_x) == unicode:
00215 _x = _x.encode('utf-8')
00216 length = len(_x)
00217 buff.write(struct.pack('<I%ss'%length, length, _x))
00218 buff.write(_struct_B.pack(self.action_feedback.status.status))
00219 _x = self.action_feedback.status.text
00220 length = len(_x)
00221 if python3 or type(_x) == unicode:
00222 _x = _x.encode('utf-8')
00223 length = len(_x)
00224 buff.write(struct.pack('<I%ss'%length, length, _x))
00225 buff.write(_struct_d.pack(self.action_feedback.feedback.error))
00226 except struct.error as se: self._check_types(se)
00227 except TypeError as te: self._check_types(te)
00228
00229 def deserialize(self, str):
00230 """
00231 unpack serialized message in str into this message instance
00232 :param str: byte array of serialized message, ``str``
00233 """
00234 try:
00235 if self.action_goal is None:
00236 self.action_goal = simple_move_base.msg.GoAngleActionGoal()
00237 if self.action_result is None:
00238 self.action_result = simple_move_base.msg.GoAngleActionResult()
00239 if self.action_feedback is None:
00240 self.action_feedback = simple_move_base.msg.GoAngleActionFeedback()
00241 end = 0
00242 _x = self
00243 start = end
00244 end += 12
00245 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00246 start = end
00247 end += 4
00248 (length,) = _struct_I.unpack(str[start:end])
00249 start = end
00250 end += length
00251 if python3:
00252 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00253 else:
00254 self.action_goal.header.frame_id = str[start:end]
00255 _x = self
00256 start = end
00257 end += 8
00258 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00259 start = end
00260 end += 4
00261 (length,) = _struct_I.unpack(str[start:end])
00262 start = end
00263 end += length
00264 if python3:
00265 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00266 else:
00267 self.action_goal.goal_id.id = str[start:end]
00268 _x = self
00269 start = end
00270 end += 20
00271 (_x.action_goal.goal.angle, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_d3I.unpack(str[start:end])
00272 start = end
00273 end += 4
00274 (length,) = _struct_I.unpack(str[start:end])
00275 start = end
00276 end += length
00277 if python3:
00278 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00279 else:
00280 self.action_result.header.frame_id = str[start:end]
00281 _x = self
00282 start = end
00283 end += 8
00284 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00285 start = end
00286 end += 4
00287 (length,) = _struct_I.unpack(str[start:end])
00288 start = end
00289 end += length
00290 if python3:
00291 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00292 else:
00293 self.action_result.status.goal_id.id = str[start:end]
00294 start = end
00295 end += 1
00296 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00297 start = end
00298 end += 4
00299 (length,) = _struct_I.unpack(str[start:end])
00300 start = end
00301 end += length
00302 if python3:
00303 self.action_result.status.text = str[start:end].decode('utf-8')
00304 else:
00305 self.action_result.status.text = str[start:end]
00306 _x = self
00307 start = end
00308 end += 20
00309 (_x.action_result.result.error, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_d3I.unpack(str[start:end])
00310 start = end
00311 end += 4
00312 (length,) = _struct_I.unpack(str[start:end])
00313 start = end
00314 end += length
00315 if python3:
00316 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00317 else:
00318 self.action_feedback.header.frame_id = str[start:end]
00319 _x = self
00320 start = end
00321 end += 8
00322 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00323 start = end
00324 end += 4
00325 (length,) = _struct_I.unpack(str[start:end])
00326 start = end
00327 end += length
00328 if python3:
00329 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00330 else:
00331 self.action_feedback.status.goal_id.id = str[start:end]
00332 start = end
00333 end += 1
00334 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00335 start = end
00336 end += 4
00337 (length,) = _struct_I.unpack(str[start:end])
00338 start = end
00339 end += length
00340 if python3:
00341 self.action_feedback.status.text = str[start:end].decode('utf-8')
00342 else:
00343 self.action_feedback.status.text = str[start:end]
00344 start = end
00345 end += 8
00346 (self.action_feedback.feedback.error,) = _struct_d.unpack(str[start:end])
00347 return self
00348 except struct.error as e:
00349 raise genpy.DeserializationError(e)
00350
00351
00352 def serialize_numpy(self, buff, numpy):
00353 """
00354 serialize message with numpy array types into buffer
00355 :param buff: buffer, ``StringIO``
00356 :param numpy: numpy python module
00357 """
00358 try:
00359 _x = self
00360 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00361 _x = self.action_goal.header.frame_id
00362 length = len(_x)
00363 if python3 or type(_x) == unicode:
00364 _x = _x.encode('utf-8')
00365 length = len(_x)
00366 buff.write(struct.pack('<I%ss'%length, length, _x))
00367 _x = self
00368 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00369 _x = self.action_goal.goal_id.id
00370 length = len(_x)
00371 if python3 or type(_x) == unicode:
00372 _x = _x.encode('utf-8')
00373 length = len(_x)
00374 buff.write(struct.pack('<I%ss'%length, length, _x))
00375 _x = self
00376 buff.write(_struct_d3I.pack(_x.action_goal.goal.angle, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00377 _x = self.action_result.header.frame_id
00378 length = len(_x)
00379 if python3 or type(_x) == unicode:
00380 _x = _x.encode('utf-8')
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 _x = self
00384 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00385 _x = self.action_result.status.goal_id.id
00386 length = len(_x)
00387 if python3 or type(_x) == unicode:
00388 _x = _x.encode('utf-8')
00389 length = len(_x)
00390 buff.write(struct.pack('<I%ss'%length, length, _x))
00391 buff.write(_struct_B.pack(self.action_result.status.status))
00392 _x = self.action_result.status.text
00393 length = len(_x)
00394 if python3 or type(_x) == unicode:
00395 _x = _x.encode('utf-8')
00396 length = len(_x)
00397 buff.write(struct.pack('<I%ss'%length, length, _x))
00398 _x = self
00399 buff.write(_struct_d3I.pack(_x.action_result.result.error, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00400 _x = self.action_feedback.header.frame_id
00401 length = len(_x)
00402 if python3 or type(_x) == unicode:
00403 _x = _x.encode('utf-8')
00404 length = len(_x)
00405 buff.write(struct.pack('<I%ss'%length, length, _x))
00406 _x = self
00407 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00408 _x = self.action_feedback.status.goal_id.id
00409 length = len(_x)
00410 if python3 or type(_x) == unicode:
00411 _x = _x.encode('utf-8')
00412 length = len(_x)
00413 buff.write(struct.pack('<I%ss'%length, length, _x))
00414 buff.write(_struct_B.pack(self.action_feedback.status.status))
00415 _x = self.action_feedback.status.text
00416 length = len(_x)
00417 if python3 or type(_x) == unicode:
00418 _x = _x.encode('utf-8')
00419 length = len(_x)
00420 buff.write(struct.pack('<I%ss'%length, length, _x))
00421 buff.write(_struct_d.pack(self.action_feedback.feedback.error))
00422 except struct.error as se: self._check_types(se)
00423 except TypeError as te: self._check_types(te)
00424
00425 def deserialize_numpy(self, str, numpy):
00426 """
00427 unpack serialized message in str into this message instance using numpy for array types
00428 :param str: byte array of serialized message, ``str``
00429 :param numpy: numpy python module
00430 """
00431 try:
00432 if self.action_goal is None:
00433 self.action_goal = simple_move_base.msg.GoAngleActionGoal()
00434 if self.action_result is None:
00435 self.action_result = simple_move_base.msg.GoAngleActionResult()
00436 if self.action_feedback is None:
00437 self.action_feedback = simple_move_base.msg.GoAngleActionFeedback()
00438 end = 0
00439 _x = self
00440 start = end
00441 end += 12
00442 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00443 start = end
00444 end += 4
00445 (length,) = _struct_I.unpack(str[start:end])
00446 start = end
00447 end += length
00448 if python3:
00449 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00450 else:
00451 self.action_goal.header.frame_id = str[start:end]
00452 _x = self
00453 start = end
00454 end += 8
00455 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00456 start = end
00457 end += 4
00458 (length,) = _struct_I.unpack(str[start:end])
00459 start = end
00460 end += length
00461 if python3:
00462 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00463 else:
00464 self.action_goal.goal_id.id = str[start:end]
00465 _x = self
00466 start = end
00467 end += 20
00468 (_x.action_goal.goal.angle, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_d3I.unpack(str[start:end])
00469 start = end
00470 end += 4
00471 (length,) = _struct_I.unpack(str[start:end])
00472 start = end
00473 end += length
00474 if python3:
00475 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00476 else:
00477 self.action_result.header.frame_id = str[start:end]
00478 _x = self
00479 start = end
00480 end += 8
00481 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00482 start = end
00483 end += 4
00484 (length,) = _struct_I.unpack(str[start:end])
00485 start = end
00486 end += length
00487 if python3:
00488 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00489 else:
00490 self.action_result.status.goal_id.id = str[start:end]
00491 start = end
00492 end += 1
00493 (self.action_result.status.status,) = _struct_B.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.status.text = str[start:end].decode('utf-8')
00501 else:
00502 self.action_result.status.text = str[start:end]
00503 _x = self
00504 start = end
00505 end += 20
00506 (_x.action_result.result.error, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_d3I.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_feedback.header.frame_id = str[start:end].decode('utf-8')
00514 else:
00515 self.action_feedback.header.frame_id = str[start:end]
00516 _x = self
00517 start = end
00518 end += 8
00519 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00520 start = end
00521 end += 4
00522 (length,) = _struct_I.unpack(str[start:end])
00523 start = end
00524 end += length
00525 if python3:
00526 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00527 else:
00528 self.action_feedback.status.goal_id.id = str[start:end]
00529 start = end
00530 end += 1
00531 (self.action_feedback.status.status,) = _struct_B.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.status.text = str[start:end].decode('utf-8')
00539 else:
00540 self.action_feedback.status.text = str[start:end]
00541 start = end
00542 end += 8
00543 (self.action_feedback.feedback.error,) = _struct_d.unpack(str[start:end])
00544 return self
00545 except struct.error as e:
00546 raise genpy.DeserializationError(e)
00547
00548 _struct_I = genpy.struct_I
00549 _struct_d = struct.Struct("<d")
00550 _struct_3I = struct.Struct("<3I")
00551 _struct_B = struct.Struct("<B")
00552 _struct_2I = struct.Struct("<2I")
00553 _struct_d3I = struct.Struct("<d3I")