00001 """autogenerated by genpy from iri_dynamixel_gripper/closeAction.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 actionlib_msgs.msg
00009 import iri_dynamixel_gripper.msg
00010 import std_msgs.msg
00011
00012 class closeAction(genpy.Message):
00013 _md5sum = "310e509b685d460bd9d5a7c15911bbec"
00014 _type = "iri_dynamixel_gripper/closeAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 closeActionGoal action_goal
00019 closeActionResult action_result
00020 closeActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: iri_dynamixel_gripper/closeActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 closeGoal 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: iri_dynamixel_gripper/closeGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 #goal definition
00065
00066 ================================================================================
00067 MSG: iri_dynamixel_gripper/closeActionResult
00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00069
00070 Header header
00071 actionlib_msgs/GoalStatus status
00072 closeResult 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: iri_dynamixel_gripper/closeResult
00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00103 #result definition
00104 bool successful
00105
00106 ================================================================================
00107 MSG: iri_dynamixel_gripper/closeActionFeedback
00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00109
00110 Header header
00111 actionlib_msgs/GoalStatus status
00112 closeFeedback feedback
00113
00114 ================================================================================
00115 MSG: iri_dynamixel_gripper/closeFeedback
00116 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00117 #feedback
00118 float32 angle
00119 float32 effort
00120
00121
00122
00123 """
00124 __slots__ = ['action_goal','action_result','action_feedback']
00125 _slot_types = ['iri_dynamixel_gripper/closeActionGoal','iri_dynamixel_gripper/closeActionResult','iri_dynamixel_gripper/closeActionFeedback']
00126
00127 def __init__(self, *args, **kwds):
00128 """
00129 Constructor. Any message fields that are implicitly/explicitly
00130 set to None will be assigned a default value. The recommend
00131 use is keyword arguments as this is more robust to future message
00132 changes. You cannot mix in-order arguments and keyword arguments.
00133
00134 The available fields are:
00135 action_goal,action_result,action_feedback
00136
00137 :param args: complete set of field values, in .msg order
00138 :param kwds: use keyword arguments corresponding to message field names
00139 to set specific fields.
00140 """
00141 if args or kwds:
00142 super(closeAction, self).__init__(*args, **kwds)
00143
00144 if self.action_goal is None:
00145 self.action_goal = iri_dynamixel_gripper.msg.closeActionGoal()
00146 if self.action_result is None:
00147 self.action_result = iri_dynamixel_gripper.msg.closeActionResult()
00148 if self.action_feedback is None:
00149 self.action_feedback = iri_dynamixel_gripper.msg.closeActionFeedback()
00150 else:
00151 self.action_goal = iri_dynamixel_gripper.msg.closeActionGoal()
00152 self.action_result = iri_dynamixel_gripper.msg.closeActionResult()
00153 self.action_feedback = iri_dynamixel_gripper.msg.closeActionFeedback()
00154
00155 def _get_types(self):
00156 """
00157 internal API method
00158 """
00159 return self._slot_types
00160
00161 def serialize(self, buff):
00162 """
00163 serialize message into buffer
00164 :param buff: buffer, ``StringIO``
00165 """
00166 try:
00167 _x = self
00168 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00169 _x = self.action_goal.header.frame_id
00170 length = len(_x)
00171 if python3 or type(_x) == unicode:
00172 _x = _x.encode('utf-8')
00173 length = len(_x)
00174 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 _x = self
00176 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00177 _x = self.action_goal.goal_id.id
00178 length = len(_x)
00179 if python3 or type(_x) == unicode:
00180 _x = _x.encode('utf-8')
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 _x = self
00184 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00185 _x = self.action_result.header.frame_id
00186 length = len(_x)
00187 if python3 or type(_x) == unicode:
00188 _x = _x.encode('utf-8')
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_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00193 _x = self.action_result.status.goal_id.id
00194 length = len(_x)
00195 if python3 or type(_x) == unicode:
00196 _x = _x.encode('utf-8')
00197 length = len(_x)
00198 buff.write(struct.pack('<I%ss'%length, length, _x))
00199 buff.write(_struct_B.pack(self.action_result.status.status))
00200 _x = self.action_result.status.text
00201 length = len(_x)
00202 if python3 or type(_x) == unicode:
00203 _x = _x.encode('utf-8')
00204 length = len(_x)
00205 buff.write(struct.pack('<I%ss'%length, length, _x))
00206 _x = self
00207 buff.write(_struct_B3I.pack(_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00208 _x = self.action_feedback.header.frame_id
00209 length = len(_x)
00210 if python3 or type(_x) == unicode:
00211 _x = _x.encode('utf-8')
00212 length = len(_x)
00213 buff.write(struct.pack('<I%ss'%length, length, _x))
00214 _x = self
00215 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00216 _x = self.action_feedback.status.goal_id.id
00217 length = len(_x)
00218 if python3 or type(_x) == unicode:
00219 _x = _x.encode('utf-8')
00220 length = len(_x)
00221 buff.write(struct.pack('<I%ss'%length, length, _x))
00222 buff.write(_struct_B.pack(self.action_feedback.status.status))
00223 _x = self.action_feedback.status.text
00224 length = len(_x)
00225 if python3 or type(_x) == unicode:
00226 _x = _x.encode('utf-8')
00227 length = len(_x)
00228 buff.write(struct.pack('<I%ss'%length, length, _x))
00229 _x = self
00230 buff.write(_struct_2f.pack(_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort))
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 = iri_dynamixel_gripper.msg.closeActionGoal()
00242 if self.action_result is None:
00243 self.action_result = iri_dynamixel_gripper.msg.closeActionResult()
00244 if self.action_feedback is None:
00245 self.action_feedback = iri_dynamixel_gripper.msg.closeActionFeedback()
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 += 12
00276 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.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 += 13
00314 (_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00315 self.action_result.result.successful = bool(self.action_result.result.successful)
00316 start = end
00317 end += 4
00318 (length,) = _struct_I.unpack(str[start:end])
00319 start = end
00320 end += length
00321 if python3:
00322 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00323 else:
00324 self.action_feedback.header.frame_id = str[start:end]
00325 _x = self
00326 start = end
00327 end += 8
00328 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00329 start = end
00330 end += 4
00331 (length,) = _struct_I.unpack(str[start:end])
00332 start = end
00333 end += length
00334 if python3:
00335 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00336 else:
00337 self.action_feedback.status.goal_id.id = str[start:end]
00338 start = end
00339 end += 1
00340 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00341 start = end
00342 end += 4
00343 (length,) = _struct_I.unpack(str[start:end])
00344 start = end
00345 end += length
00346 if python3:
00347 self.action_feedback.status.text = str[start:end].decode('utf-8')
00348 else:
00349 self.action_feedback.status.text = str[start:end]
00350 _x = self
00351 start = end
00352 end += 8
00353 (_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort,) = _struct_2f.unpack(str[start:end])
00354 return self
00355 except struct.error as e:
00356 raise genpy.DeserializationError(e)
00357
00358
00359 def serialize_numpy(self, buff, numpy):
00360 """
00361 serialize message with numpy array types into buffer
00362 :param buff: buffer, ``StringIO``
00363 :param numpy: numpy python module
00364 """
00365 try:
00366 _x = self
00367 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00368 _x = self.action_goal.header.frame_id
00369 length = len(_x)
00370 if python3 or type(_x) == unicode:
00371 _x = _x.encode('utf-8')
00372 length = len(_x)
00373 buff.write(struct.pack('<I%ss'%length, length, _x))
00374 _x = self
00375 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00376 _x = self.action_goal.goal_id.id
00377 length = len(_x)
00378 if python3 or type(_x) == unicode:
00379 _x = _x.encode('utf-8')
00380 length = len(_x)
00381 buff.write(struct.pack('<I%ss'%length, length, _x))
00382 _x = self
00383 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00384 _x = self.action_result.header.frame_id
00385 length = len(_x)
00386 if python3 or type(_x) == unicode:
00387 _x = _x.encode('utf-8')
00388 length = len(_x)
00389 buff.write(struct.pack('<I%ss'%length, length, _x))
00390 _x = self
00391 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00392 _x = self.action_result.status.goal_id.id
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 buff.write(_struct_B.pack(self.action_result.status.status))
00399 _x = self.action_result.status.text
00400 length = len(_x)
00401 if python3 or type(_x) == unicode:
00402 _x = _x.encode('utf-8')
00403 length = len(_x)
00404 buff.write(struct.pack('<I%ss'%length, length, _x))
00405 _x = self
00406 buff.write(_struct_B3I.pack(_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00407 _x = self.action_feedback.header.frame_id
00408 length = len(_x)
00409 if python3 or type(_x) == unicode:
00410 _x = _x.encode('utf-8')
00411 length = len(_x)
00412 buff.write(struct.pack('<I%ss'%length, length, _x))
00413 _x = self
00414 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00415 _x = self.action_feedback.status.goal_id.id
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_B.pack(self.action_feedback.status.status))
00422 _x = self.action_feedback.status.text
00423 length = len(_x)
00424 if python3 or type(_x) == unicode:
00425 _x = _x.encode('utf-8')
00426 length = len(_x)
00427 buff.write(struct.pack('<I%ss'%length, length, _x))
00428 _x = self
00429 buff.write(_struct_2f.pack(_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort))
00430 except struct.error as se: self._check_types(se)
00431 except TypeError as te: self._check_types(te)
00432
00433 def deserialize_numpy(self, str, numpy):
00434 """
00435 unpack serialized message in str into this message instance using numpy for array types
00436 :param str: byte array of serialized message, ``str``
00437 :param numpy: numpy python module
00438 """
00439 try:
00440 if self.action_goal is None:
00441 self.action_goal = iri_dynamixel_gripper.msg.closeActionGoal()
00442 if self.action_result is None:
00443 self.action_result = iri_dynamixel_gripper.msg.closeActionResult()
00444 if self.action_feedback is None:
00445 self.action_feedback = iri_dynamixel_gripper.msg.closeActionFeedback()
00446 end = 0
00447 _x = self
00448 start = end
00449 end += 12
00450 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end].decode('utf-8')
00458 else:
00459 self.action_goal.header.frame_id = str[start:end]
00460 _x = self
00461 start = end
00462 end += 8
00463 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.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_goal.goal_id.id = str[start:end].decode('utf-8')
00471 else:
00472 self.action_goal.goal_id.id = str[start:end]
00473 _x = self
00474 start = end
00475 end += 12
00476 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end].decode('utf-8')
00484 else:
00485 self.action_result.header.frame_id = str[start:end]
00486 _x = self
00487 start = end
00488 end += 8
00489 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00490 start = end
00491 end += 4
00492 (length,) = _struct_I.unpack(str[start:end])
00493 start = end
00494 end += length
00495 if python3:
00496 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00497 else:
00498 self.action_result.status.goal_id.id = str[start:end]
00499 start = end
00500 end += 1
00501 (self.action_result.status.status,) = _struct_B.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_result.status.text = str[start:end].decode('utf-8')
00509 else:
00510 self.action_result.status.text = str[start:end]
00511 _x = self
00512 start = end
00513 end += 13
00514 (_x.action_result.result.successful, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00515 self.action_result.result.successful = bool(self.action_result.result.successful)
00516 start = end
00517 end += 4
00518 (length,) = _struct_I.unpack(str[start:end])
00519 start = end
00520 end += length
00521 if python3:
00522 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00523 else:
00524 self.action_feedback.header.frame_id = str[start:end]
00525 _x = self
00526 start = end
00527 end += 8
00528 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00529 start = end
00530 end += 4
00531 (length,) = _struct_I.unpack(str[start:end])
00532 start = end
00533 end += length
00534 if python3:
00535 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00536 else:
00537 self.action_feedback.status.goal_id.id = str[start:end]
00538 start = end
00539 end += 1
00540 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00541 start = end
00542 end += 4
00543 (length,) = _struct_I.unpack(str[start:end])
00544 start = end
00545 end += length
00546 if python3:
00547 self.action_feedback.status.text = str[start:end].decode('utf-8')
00548 else:
00549 self.action_feedback.status.text = str[start:end]
00550 _x = self
00551 start = end
00552 end += 8
00553 (_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort,) = _struct_2f.unpack(str[start:end])
00554 return self
00555 except struct.error as e:
00556 raise genpy.DeserializationError(e)
00557
00558 _struct_I = genpy.struct_I
00559 _struct_3I = struct.Struct("<3I")
00560 _struct_B = struct.Struct("<B")
00561 _struct_2I = struct.Struct("<2I")
00562 _struct_2f = struct.Struct("<2f")
00563 _struct_B3I = struct.Struct("<B3I")