00001 """autogenerated by genpy from simple_arm_actions/RelaxArmAction.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 simple_arm_actions.msg
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class RelaxArmAction(genpy.Message):
00013 _md5sum = "d5a016b49f278075666fbc901debbd08"
00014 _type = "simple_arm_actions/RelaxArmAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 RelaxArmActionGoal action_goal
00019 RelaxArmActionResult action_result
00020 RelaxArmActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: simple_arm_actions/RelaxArmActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 RelaxArmGoal 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_arm_actions/RelaxArmGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064
00065
00066 ================================================================================
00067 MSG: simple_arm_actions/RelaxArmActionResult
00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00069
00070 Header header
00071 actionlib_msgs/GoalStatus status
00072 RelaxArmResult 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_arm_actions/RelaxArmResult
00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00103
00104
00105 ================================================================================
00106 MSG: simple_arm_actions/RelaxArmActionFeedback
00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00108
00109 Header header
00110 actionlib_msgs/GoalStatus status
00111 RelaxArmFeedback feedback
00112
00113 ================================================================================
00114 MSG: simple_arm_actions/RelaxArmFeedback
00115 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00116
00117
00118
00119 """
00120 __slots__ = ['action_goal','action_result','action_feedback']
00121 _slot_types = ['simple_arm_actions/RelaxArmActionGoal','simple_arm_actions/RelaxArmActionResult','simple_arm_actions/RelaxArmActionFeedback']
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(RelaxArmAction, self).__init__(*args, **kwds)
00139
00140 if self.action_goal is None:
00141 self.action_goal = simple_arm_actions.msg.RelaxArmActionGoal()
00142 if self.action_result is None:
00143 self.action_result = simple_arm_actions.msg.RelaxArmActionResult()
00144 if self.action_feedback is None:
00145 self.action_feedback = simple_arm_actions.msg.RelaxArmActionFeedback()
00146 else:
00147 self.action_goal = simple_arm_actions.msg.RelaxArmActionGoal()
00148 self.action_result = simple_arm_actions.msg.RelaxArmActionResult()
00149 self.action_feedback = simple_arm_actions.msg.RelaxArmActionFeedback()
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_3I.pack(_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_3I.pack(_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 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00226 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00227
00228 def deserialize(self, str):
00229 """
00230 unpack serialized message in str into this message instance
00231 :param str: byte array of serialized message, ``str``
00232 """
00233 try:
00234 if self.action_goal is None:
00235 self.action_goal = simple_arm_actions.msg.RelaxArmActionGoal()
00236 if self.action_result is None:
00237 self.action_result = simple_arm_actions.msg.RelaxArmActionResult()
00238 if self.action_feedback is None:
00239 self.action_feedback = simple_arm_actions.msg.RelaxArmActionFeedback()
00240 end = 0
00241 _x = self
00242 start = end
00243 end += 12
00244 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00245 start = end
00246 end += 4
00247 (length,) = _struct_I.unpack(str[start:end])
00248 start = end
00249 end += length
00250 if python3:
00251 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00252 else:
00253 self.action_goal.header.frame_id = str[start:end]
00254 _x = self
00255 start = end
00256 end += 8
00257 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00258 start = end
00259 end += 4
00260 (length,) = _struct_I.unpack(str[start:end])
00261 start = end
00262 end += length
00263 if python3:
00264 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00265 else:
00266 self.action_goal.goal_id.id = str[start:end]
00267 _x = self
00268 start = end
00269 end += 12
00270 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00271 start = end
00272 end += 4
00273 (length,) = _struct_I.unpack(str[start:end])
00274 start = end
00275 end += length
00276 if python3:
00277 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00278 else:
00279 self.action_result.header.frame_id = str[start:end]
00280 _x = self
00281 start = end
00282 end += 8
00283 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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 if python3:
00290 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00291 else:
00292 self.action_result.status.goal_id.id = str[start:end]
00293 start = end
00294 end += 1
00295 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00296 start = end
00297 end += 4
00298 (length,) = _struct_I.unpack(str[start:end])
00299 start = end
00300 end += length
00301 if python3:
00302 self.action_result.status.text = str[start:end].decode('utf-8')
00303 else:
00304 self.action_result.status.text = str[start:end]
00305 _x = self
00306 start = end
00307 end += 12
00308 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00309 start = end
00310 end += 4
00311 (length,) = _struct_I.unpack(str[start:end])
00312 start = end
00313 end += length
00314 if python3:
00315 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00316 else:
00317 self.action_feedback.header.frame_id = str[start:end]
00318 _x = self
00319 start = end
00320 end += 8
00321 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00322 start = end
00323 end += 4
00324 (length,) = _struct_I.unpack(str[start:end])
00325 start = end
00326 end += length
00327 if python3:
00328 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00329 else:
00330 self.action_feedback.status.goal_id.id = str[start:end]
00331 start = end
00332 end += 1
00333 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00334 start = end
00335 end += 4
00336 (length,) = _struct_I.unpack(str[start:end])
00337 start = end
00338 end += length
00339 if python3:
00340 self.action_feedback.status.text = str[start:end].decode('utf-8')
00341 else:
00342 self.action_feedback.status.text = str[start:end]
00343 return self
00344 except struct.error as e:
00345 raise genpy.DeserializationError(e)
00346
00347
00348 def serialize_numpy(self, buff, numpy):
00349 """
00350 serialize message with numpy array types into buffer
00351 :param buff: buffer, ``StringIO``
00352 :param numpy: numpy python module
00353 """
00354 try:
00355 _x = self
00356 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00357 _x = self.action_goal.header.frame_id
00358 length = len(_x)
00359 if python3 or type(_x) == unicode:
00360 _x = _x.encode('utf-8')
00361 length = len(_x)
00362 buff.write(struct.pack('<I%ss'%length, length, _x))
00363 _x = self
00364 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00365 _x = self.action_goal.goal_id.id
00366 length = len(_x)
00367 if python3 or type(_x) == unicode:
00368 _x = _x.encode('utf-8')
00369 length = len(_x)
00370 buff.write(struct.pack('<I%ss'%length, length, _x))
00371 _x = self
00372 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00373 _x = self.action_result.header.frame_id
00374 length = len(_x)
00375 if python3 or type(_x) == unicode:
00376 _x = _x.encode('utf-8')
00377 length = len(_x)
00378 buff.write(struct.pack('<I%ss'%length, length, _x))
00379 _x = self
00380 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00381 _x = self.action_result.status.goal_id.id
00382 length = len(_x)
00383 if python3 or type(_x) == unicode:
00384 _x = _x.encode('utf-8')
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 buff.write(_struct_B.pack(self.action_result.status.status))
00388 _x = self.action_result.status.text
00389 length = len(_x)
00390 if python3 or type(_x) == unicode:
00391 _x = _x.encode('utf-8')
00392 length = len(_x)
00393 buff.write(struct.pack('<I%ss'%length, length, _x))
00394 _x = self
00395 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00396 _x = self.action_feedback.header.frame_id
00397 length = len(_x)
00398 if python3 or type(_x) == unicode:
00399 _x = _x.encode('utf-8')
00400 length = len(_x)
00401 buff.write(struct.pack('<I%ss'%length, length, _x))
00402 _x = self
00403 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00404 _x = self.action_feedback.status.goal_id.id
00405 length = len(_x)
00406 if python3 or type(_x) == unicode:
00407 _x = _x.encode('utf-8')
00408 length = len(_x)
00409 buff.write(struct.pack('<I%ss'%length, length, _x))
00410 buff.write(_struct_B.pack(self.action_feedback.status.status))
00411 _x = self.action_feedback.status.text
00412 length = len(_x)
00413 if python3 or type(_x) == unicode:
00414 _x = _x.encode('utf-8')
00415 length = len(_x)
00416 buff.write(struct.pack('<I%ss'%length, length, _x))
00417 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00418 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00419
00420 def deserialize_numpy(self, str, numpy):
00421 """
00422 unpack serialized message in str into this message instance using numpy for array types
00423 :param str: byte array of serialized message, ``str``
00424 :param numpy: numpy python module
00425 """
00426 try:
00427 if self.action_goal is None:
00428 self.action_goal = simple_arm_actions.msg.RelaxArmActionGoal()
00429 if self.action_result is None:
00430 self.action_result = simple_arm_actions.msg.RelaxArmActionResult()
00431 if self.action_feedback is None:
00432 self.action_feedback = simple_arm_actions.msg.RelaxArmActionFeedback()
00433 end = 0
00434 _x = self
00435 start = end
00436 end += 12
00437 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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 if python3:
00444 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00445 else:
00446 self.action_goal.header.frame_id = str[start:end]
00447 _x = self
00448 start = end
00449 end += 8
00450 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00451 start = end
00452 end += 4
00453 (length,) = _struct_I.unpack(str[start:end])
00454 start = end
00455 end += length
00456 if python3:
00457 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00458 else:
00459 self.action_goal.goal_id.id = str[start:end]
00460 _x = self
00461 start = end
00462 end += 12
00463 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00464 start = end
00465 end += 4
00466 (length,) = _struct_I.unpack(str[start:end])
00467 start = end
00468 end += length
00469 if python3:
00470 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00471 else:
00472 self.action_result.header.frame_id = str[start:end]
00473 _x = self
00474 start = end
00475 end += 8
00476 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00477 start = end
00478 end += 4
00479 (length,) = _struct_I.unpack(str[start:end])
00480 start = end
00481 end += length
00482 if python3:
00483 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00484 else:
00485 self.action_result.status.goal_id.id = str[start:end]
00486 start = end
00487 end += 1
00488 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00489 start = end
00490 end += 4
00491 (length,) = _struct_I.unpack(str[start:end])
00492 start = end
00493 end += length
00494 if python3:
00495 self.action_result.status.text = str[start:end].decode('utf-8')
00496 else:
00497 self.action_result.status.text = str[start:end]
00498 _x = self
00499 start = end
00500 end += 12
00501 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00502 start = end
00503 end += 4
00504 (length,) = _struct_I.unpack(str[start:end])
00505 start = end
00506 end += length
00507 if python3:
00508 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00509 else:
00510 self.action_feedback.header.frame_id = str[start:end]
00511 _x = self
00512 start = end
00513 end += 8
00514 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00515 start = end
00516 end += 4
00517 (length,) = _struct_I.unpack(str[start:end])
00518 start = end
00519 end += length
00520 if python3:
00521 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00522 else:
00523 self.action_feedback.status.goal_id.id = str[start:end]
00524 start = end
00525 end += 1
00526 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00527 start = end
00528 end += 4
00529 (length,) = _struct_I.unpack(str[start:end])
00530 start = end
00531 end += length
00532 if python3:
00533 self.action_feedback.status.text = str[start:end].decode('utf-8')
00534 else:
00535 self.action_feedback.status.text = str[start:end]
00536 return self
00537 except struct.error as e:
00538 raise genpy.DeserializationError(e)
00539
00540 _struct_I = genpy.struct_I
00541 _struct_3I = struct.Struct("<3I")
00542 _struct_B = struct.Struct("<B")
00543 _struct_2I = struct.Struct("<2I")