_openAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_dynamixel_gripper/openAction.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 openAction(genpy.Message):
00013   _md5sum = "310e509b685d460bd9d5a7c15911bbec"
00014   _type = "iri_dynamixel_gripper/openAction"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 openActionGoal action_goal
00019 openActionResult action_result
00020 openActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: iri_dynamixel_gripper/openActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 openGoal 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/openGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 #goal definition
00065 
00066 ================================================================================
00067 MSG: iri_dynamixel_gripper/openActionResult
00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00069 
00070 Header header
00071 actionlib_msgs/GoalStatus status
00072 openResult 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/openResult
00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00103 #result definition
00104 bool successful
00105 
00106 ================================================================================
00107 MSG: iri_dynamixel_gripper/openActionFeedback
00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00109 
00110 Header header
00111 actionlib_msgs/GoalStatus status
00112 openFeedback feedback
00113 
00114 ================================================================================
00115 MSG: iri_dynamixel_gripper/openFeedback
00116 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00117 #feedback
00118 float32 angle
00119 float32 effort
00120 
00121 
00122 """
00123   __slots__ = ['action_goal','action_result','action_feedback']
00124   _slot_types = ['iri_dynamixel_gripper/openActionGoal','iri_dynamixel_gripper/openActionResult','iri_dynamixel_gripper/openActionFeedback']
00125 
00126   def __init__(self, *args, **kwds):
00127     """
00128     Constructor. Any message fields that are implicitly/explicitly
00129     set to None will be assigned a default value. The recommend
00130     use is keyword arguments as this is more robust to future message
00131     changes.  You cannot mix in-order arguments and keyword arguments.
00132 
00133     The available fields are:
00134        action_goal,action_result,action_feedback
00135 
00136     :param args: complete set of field values, in .msg order
00137     :param kwds: use keyword arguments corresponding to message field names
00138     to set specific fields.
00139     """
00140     if args or kwds:
00141       super(openAction, self).__init__(*args, **kwds)
00142       #message fields cannot be None, assign default values for those that are
00143       if self.action_goal is None:
00144         self.action_goal = iri_dynamixel_gripper.msg.openActionGoal()
00145       if self.action_result is None:
00146         self.action_result = iri_dynamixel_gripper.msg.openActionResult()
00147       if self.action_feedback is None:
00148         self.action_feedback = iri_dynamixel_gripper.msg.openActionFeedback()
00149     else:
00150       self.action_goal = iri_dynamixel_gripper.msg.openActionGoal()
00151       self.action_result = iri_dynamixel_gripper.msg.openActionResult()
00152       self.action_feedback = iri_dynamixel_gripper.msg.openActionFeedback()
00153 
00154   def _get_types(self):
00155     """
00156     internal API method
00157     """
00158     return self._slot_types
00159 
00160   def serialize(self, buff):
00161     """
00162     serialize message into buffer
00163     :param buff: buffer, ``StringIO``
00164     """
00165     try:
00166       _x = self
00167       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00168       _x = self.action_goal.header.frame_id
00169       length = len(_x)
00170       if python3 or type(_x) == unicode:
00171         _x = _x.encode('utf-8')
00172         length = len(_x)
00173       buff.write(struct.pack('<I%ss'%length, length, _x))
00174       _x = self
00175       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00176       _x = self.action_goal.goal_id.id
00177       length = len(_x)
00178       if python3 or type(_x) == unicode:
00179         _x = _x.encode('utf-8')
00180         length = len(_x)
00181       buff.write(struct.pack('<I%ss'%length, length, _x))
00182       _x = self
00183       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00184       _x = self.action_result.header.frame_id
00185       length = len(_x)
00186       if python3 or type(_x) == unicode:
00187         _x = _x.encode('utf-8')
00188         length = len(_x)
00189       buff.write(struct.pack('<I%ss'%length, length, _x))
00190       _x = self
00191       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00192       _x = self.action_result.status.goal_id.id
00193       length = len(_x)
00194       if python3 or type(_x) == unicode:
00195         _x = _x.encode('utf-8')
00196         length = len(_x)
00197       buff.write(struct.pack('<I%ss'%length, length, _x))
00198       buff.write(_struct_B.pack(self.action_result.status.status))
00199       _x = self.action_result.status.text
00200       length = len(_x)
00201       if python3 or type(_x) == unicode:
00202         _x = _x.encode('utf-8')
00203         length = len(_x)
00204       buff.write(struct.pack('<I%ss'%length, length, _x))
00205       _x = self
00206       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))
00207       _x = self.action_feedback.header.frame_id
00208       length = len(_x)
00209       if python3 or type(_x) == unicode:
00210         _x = _x.encode('utf-8')
00211         length = len(_x)
00212       buff.write(struct.pack('<I%ss'%length, length, _x))
00213       _x = self
00214       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00215       _x = self.action_feedback.status.goal_id.id
00216       length = len(_x)
00217       if python3 or type(_x) == unicode:
00218         _x = _x.encode('utf-8')
00219         length = len(_x)
00220       buff.write(struct.pack('<I%ss'%length, length, _x))
00221       buff.write(_struct_B.pack(self.action_feedback.status.status))
00222       _x = self.action_feedback.status.text
00223       length = len(_x)
00224       if python3 or type(_x) == unicode:
00225         _x = _x.encode('utf-8')
00226         length = len(_x)
00227       buff.write(struct.pack('<I%ss'%length, length, _x))
00228       _x = self
00229       buff.write(_struct_2f.pack(_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort))
00230     except struct.error as se: self._check_types(se)
00231     except TypeError as te: self._check_types(te)
00232 
00233   def deserialize(self, str):
00234     """
00235     unpack serialized message in str into this message instance
00236     :param str: byte array of serialized message, ``str``
00237     """
00238     try:
00239       if self.action_goal is None:
00240         self.action_goal = iri_dynamixel_gripper.msg.openActionGoal()
00241       if self.action_result is None:
00242         self.action_result = iri_dynamixel_gripper.msg.openActionResult()
00243       if self.action_feedback is None:
00244         self.action_feedback = iri_dynamixel_gripper.msg.openActionFeedback()
00245       end = 0
00246       _x = self
00247       start = end
00248       end += 12
00249       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       start = end
00254       end += length
00255       if python3:
00256         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00257       else:
00258         self.action_goal.header.frame_id = str[start:end]
00259       _x = self
00260       start = end
00261       end += 8
00262       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00263       start = end
00264       end += 4
00265       (length,) = _struct_I.unpack(str[start:end])
00266       start = end
00267       end += length
00268       if python3:
00269         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00270       else:
00271         self.action_goal.goal_id.id = str[start:end]
00272       _x = self
00273       start = end
00274       end += 12
00275       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00276       start = end
00277       end += 4
00278       (length,) = _struct_I.unpack(str[start:end])
00279       start = end
00280       end += length
00281       if python3:
00282         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00283       else:
00284         self.action_result.header.frame_id = str[start:end]
00285       _x = self
00286       start = end
00287       end += 8
00288       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00289       start = end
00290       end += 4
00291       (length,) = _struct_I.unpack(str[start:end])
00292       start = end
00293       end += length
00294       if python3:
00295         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00296       else:
00297         self.action_result.status.goal_id.id = str[start:end]
00298       start = end
00299       end += 1
00300       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00301       start = end
00302       end += 4
00303       (length,) = _struct_I.unpack(str[start:end])
00304       start = end
00305       end += length
00306       if python3:
00307         self.action_result.status.text = str[start:end].decode('utf-8')
00308       else:
00309         self.action_result.status.text = str[start:end]
00310       _x = self
00311       start = end
00312       end += 13
00313       (_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])
00314       self.action_result.result.successful = bool(self.action_result.result.successful)
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       _x = self
00350       start = end
00351       end += 8
00352       (_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort,) = _struct_2f.unpack(str[start:end])
00353       return self
00354     except struct.error as e:
00355       raise genpy.DeserializationError(e) #most likely buffer underfill
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_3I.pack(_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_B3I.pack(_x.action_result.result.successful, _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       _x = self
00428       buff.write(_struct_2f.pack(_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort))
00429     except struct.error as se: self._check_types(se)
00430     except TypeError as te: self._check_types(te)
00431 
00432   def deserialize_numpy(self, str, numpy):
00433     """
00434     unpack serialized message in str into this message instance using numpy for array types
00435     :param str: byte array of serialized message, ``str``
00436     :param numpy: numpy python module
00437     """
00438     try:
00439       if self.action_goal is None:
00440         self.action_goal = iri_dynamixel_gripper.msg.openActionGoal()
00441       if self.action_result is None:
00442         self.action_result = iri_dynamixel_gripper.msg.openActionResult()
00443       if self.action_feedback is None:
00444         self.action_feedback = iri_dynamixel_gripper.msg.openActionFeedback()
00445       end = 0
00446       _x = self
00447       start = end
00448       end += 12
00449       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00450       start = end
00451       end += 4
00452       (length,) = _struct_I.unpack(str[start:end])
00453       start = end
00454       end += length
00455       if python3:
00456         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00457       else:
00458         self.action_goal.header.frame_id = str[start:end]
00459       _x = self
00460       start = end
00461       end += 8
00462       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00463       start = end
00464       end += 4
00465       (length,) = _struct_I.unpack(str[start:end])
00466       start = end
00467       end += length
00468       if python3:
00469         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00470       else:
00471         self.action_goal.goal_id.id = str[start:end]
00472       _x = self
00473       start = end
00474       end += 12
00475       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00476       start = end
00477       end += 4
00478       (length,) = _struct_I.unpack(str[start:end])
00479       start = end
00480       end += length
00481       if python3:
00482         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00483       else:
00484         self.action_result.header.frame_id = str[start:end]
00485       _x = self
00486       start = end
00487       end += 8
00488       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end].decode('utf-8')
00496       else:
00497         self.action_result.status.goal_id.id = str[start:end]
00498       start = end
00499       end += 1
00500       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00501       start = end
00502       end += 4
00503       (length,) = _struct_I.unpack(str[start:end])
00504       start = end
00505       end += length
00506       if python3:
00507         self.action_result.status.text = str[start:end].decode('utf-8')
00508       else:
00509         self.action_result.status.text = str[start:end]
00510       _x = self
00511       start = end
00512       end += 13
00513       (_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])
00514       self.action_result.result.successful = bool(self.action_result.result.successful)
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.header.frame_id = str[start:end].decode('utf-8')
00522       else:
00523         self.action_feedback.header.frame_id = str[start:end]
00524       _x = self
00525       start = end
00526       end += 8
00527       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00528       start = end
00529       end += 4
00530       (length,) = _struct_I.unpack(str[start:end])
00531       start = end
00532       end += length
00533       if python3:
00534         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00535       else:
00536         self.action_feedback.status.goal_id.id = str[start:end]
00537       start = end
00538       end += 1
00539       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00540       start = end
00541       end += 4
00542       (length,) = _struct_I.unpack(str[start:end])
00543       start = end
00544       end += length
00545       if python3:
00546         self.action_feedback.status.text = str[start:end].decode('utf-8')
00547       else:
00548         self.action_feedback.status.text = str[start:end]
00549       _x = self
00550       start = end
00551       end += 8
00552       (_x.action_feedback.feedback.angle, _x.action_feedback.feedback.effort,) = _struct_2f.unpack(str[start:end])
00553       return self
00554     except struct.error as e:
00555       raise genpy.DeserializationError(e) #most likely buffer underfill
00556 
00557 _struct_I = genpy.struct_I
00558 _struct_3I = struct.Struct("<3I")
00559 _struct_B = struct.Struct("<B")
00560 _struct_2I = struct.Struct("<2I")
00561 _struct_2f = struct.Struct("<2f")
00562 _struct_B3I = struct.Struct("<B3I")


iri_dynamixel_gripper
Author(s): Jose Luis Rivero
autogenerated on Fri Dec 6 2013 20:13:59