_MoveArmAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from simple_arm_server/MoveArmAction.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 geometry_msgs.msg
00008 import simple_arm_server.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class MoveArmAction(genpy.Message):
00014   _md5sum = "5df88a47036664a92df46ab9c52bc03c"
00015   _type = "simple_arm_server/MoveArmAction"
00016   _has_header = False #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 MoveArmActionGoal action_goal
00020 MoveArmActionResult action_result
00021 MoveArmActionFeedback action_feedback
00022 
00023 ================================================================================
00024 MSG: simple_arm_server/MoveArmActionGoal
00025 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00026 
00027 Header header
00028 actionlib_msgs/GoalID goal_id
00029 MoveArmGoal goal
00030 
00031 ================================================================================
00032 MSG: std_msgs/Header
00033 # Standard metadata for higher-level stamped data types.
00034 # This is generally used to communicate timestamped data 
00035 # in a particular coordinate frame.
00036 # 
00037 # sequence ID: consecutively increasing ID 
00038 uint32 seq
00039 #Two-integer timestamp that is expressed as:
00040 # * stamp.secs: seconds (stamp_secs) since epoch
00041 # * stamp.nsecs: nanoseconds since stamp_secs
00042 # time-handling sugar is provided by the client library
00043 time stamp
00044 #Frame this data is associated with
00045 # 0: no frame
00046 # 1: global frame
00047 string frame_id
00048 
00049 ================================================================================
00050 MSG: actionlib_msgs/GoalID
00051 # The stamp should store the time at which this goal was requested.
00052 # It is used by an action server when it tries to preempt all
00053 # goals that were requested before a certain time
00054 time stamp
00055 
00056 # The id provides a way to associate feedback and
00057 # result message with specific goal requests. The id
00058 # specified must be unique.
00059 string id
00060 
00061 
00062 ================================================================================
00063 MSG: simple_arm_server/MoveArmGoal
00064 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00065 std_msgs/Header header
00066 ArmAction[] motions
00067 
00068 ================================================================================
00069 MSG: simple_arm_server/ArmAction
00070 #
00071 # Move arm or adjust gripper
00072 #
00073 
00074 byte MOVE_ARM=0
00075 byte MOVE_GRIPPER=1
00076 
00077 byte type                   # move the arm or the gripper?
00078 
00079 geometry_msgs/Pose goal     # goal for arm
00080 float64 command    # width to open gripper
00081 
00082 duration move_time
00083 
00084 ================================================================================
00085 MSG: geometry_msgs/Pose
00086 # A representation of pose in free space, composed of postion and orientation. 
00087 Point position
00088 Quaternion orientation
00089 
00090 ================================================================================
00091 MSG: geometry_msgs/Point
00092 # This contains the position of a point in free space
00093 float64 x
00094 float64 y
00095 float64 z
00096 
00097 ================================================================================
00098 MSG: geometry_msgs/Quaternion
00099 # This represents an orientation in free space in quaternion form.
00100 
00101 float64 x
00102 float64 y
00103 float64 z
00104 float64 w
00105 
00106 ================================================================================
00107 MSG: simple_arm_server/MoveArmActionResult
00108 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00109 
00110 Header header
00111 actionlib_msgs/GoalStatus status
00112 MoveArmResult result
00113 
00114 ================================================================================
00115 MSG: actionlib_msgs/GoalStatus
00116 GoalID goal_id
00117 uint8 status
00118 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00119 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00120 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00121                             #   and has since completed its execution (Terminal State)
00122 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00123 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00124                             #    to some failure (Terminal State)
00125 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00126                             #    because the goal was unattainable or invalid (Terminal State)
00127 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00128                             #    and has not yet completed execution
00129 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00130                             #    but the action server has not yet confirmed that the goal is canceled
00131 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00132                             #    and was successfully cancelled (Terminal State)
00133 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00134                             #    sent over the wire by an action server
00135 
00136 #Allow for the user to associate a string with GoalStatus for debugging
00137 string text
00138 
00139 
00140 ================================================================================
00141 MSG: simple_arm_server/MoveArmResult
00142 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00143 bool success
00144 
00145 ================================================================================
00146 MSG: simple_arm_server/MoveArmActionFeedback
00147 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00148 
00149 Header header
00150 actionlib_msgs/GoalStatus status
00151 MoveArmFeedback feedback
00152 
00153 ================================================================================
00154 MSG: simple_arm_server/MoveArmFeedback
00155 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00156 duration time_to_completion
00157 
00158 
00159 """
00160   __slots__ = ['action_goal','action_result','action_feedback']
00161   _slot_types = ['simple_arm_server/MoveArmActionGoal','simple_arm_server/MoveArmActionResult','simple_arm_server/MoveArmActionFeedback']
00162 
00163   def __init__(self, *args, **kwds):
00164     """
00165     Constructor. Any message fields that are implicitly/explicitly
00166     set to None will be assigned a default value. The recommend
00167     use is keyword arguments as this is more robust to future message
00168     changes.  You cannot mix in-order arguments and keyword arguments.
00169 
00170     The available fields are:
00171        action_goal,action_result,action_feedback
00172 
00173     :param args: complete set of field values, in .msg order
00174     :param kwds: use keyword arguments corresponding to message field names
00175     to set specific fields.
00176     """
00177     if args or kwds:
00178       super(MoveArmAction, self).__init__(*args, **kwds)
00179       #message fields cannot be None, assign default values for those that are
00180       if self.action_goal is None:
00181         self.action_goal = simple_arm_server.msg.MoveArmActionGoal()
00182       if self.action_result is None:
00183         self.action_result = simple_arm_server.msg.MoveArmActionResult()
00184       if self.action_feedback is None:
00185         self.action_feedback = simple_arm_server.msg.MoveArmActionFeedback()
00186     else:
00187       self.action_goal = simple_arm_server.msg.MoveArmActionGoal()
00188       self.action_result = simple_arm_server.msg.MoveArmActionResult()
00189       self.action_feedback = simple_arm_server.msg.MoveArmActionFeedback()
00190 
00191   def _get_types(self):
00192     """
00193     internal API method
00194     """
00195     return self._slot_types
00196 
00197   def serialize(self, buff):
00198     """
00199     serialize message into buffer
00200     :param buff: buffer, ``StringIO``
00201     """
00202     try:
00203       _x = self
00204       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00205       _x = self.action_goal.header.frame_id
00206       length = len(_x)
00207       if python3 or type(_x) == unicode:
00208         _x = _x.encode('utf-8')
00209         length = len(_x)
00210       buff.write(struct.pack('<I%ss'%length, length, _x))
00211       _x = self
00212       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00213       _x = self.action_goal.goal_id.id
00214       length = len(_x)
00215       if python3 or type(_x) == unicode:
00216         _x = _x.encode('utf-8')
00217         length = len(_x)
00218       buff.write(struct.pack('<I%ss'%length, length, _x))
00219       _x = self
00220       buff.write(_struct_3I.pack(_x.action_goal.goal.header.seq, _x.action_goal.goal.header.stamp.secs, _x.action_goal.goal.header.stamp.nsecs))
00221       _x = self.action_goal.goal.header.frame_id
00222       length = len(_x)
00223       if python3 or type(_x) == unicode:
00224         _x = _x.encode('utf-8')
00225         length = len(_x)
00226       buff.write(struct.pack('<I%ss'%length, length, _x))
00227       length = len(self.action_goal.goal.motions)
00228       buff.write(_struct_I.pack(length))
00229       for val1 in self.action_goal.goal.motions:
00230         buff.write(_struct_b.pack(val1.type))
00231         _v1 = val1.goal
00232         _v2 = _v1.position
00233         _x = _v2
00234         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00235         _v3 = _v1.orientation
00236         _x = _v3
00237         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00238         buff.write(_struct_d.pack(val1.command))
00239         _v4 = val1.move_time
00240         _x = _v4
00241         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00242       _x = self
00243       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00244       _x = self.action_result.header.frame_id
00245       length = len(_x)
00246       if python3 or type(_x) == unicode:
00247         _x = _x.encode('utf-8')
00248         length = len(_x)
00249       buff.write(struct.pack('<I%ss'%length, length, _x))
00250       _x = self
00251       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00252       _x = self.action_result.status.goal_id.id
00253       length = len(_x)
00254       if python3 or type(_x) == unicode:
00255         _x = _x.encode('utf-8')
00256         length = len(_x)
00257       buff.write(struct.pack('<I%ss'%length, length, _x))
00258       buff.write(_struct_B.pack(self.action_result.status.status))
00259       _x = self.action_result.status.text
00260       length = len(_x)
00261       if python3 or type(_x) == unicode:
00262         _x = _x.encode('utf-8')
00263         length = len(_x)
00264       buff.write(struct.pack('<I%ss'%length, length, _x))
00265       _x = self
00266       buff.write(_struct_B3I.pack(_x.action_result.result.success, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00267       _x = self.action_feedback.header.frame_id
00268       length = len(_x)
00269       if python3 or type(_x) == unicode:
00270         _x = _x.encode('utf-8')
00271         length = len(_x)
00272       buff.write(struct.pack('<I%ss'%length, length, _x))
00273       _x = self
00274       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00275       _x = self.action_feedback.status.goal_id.id
00276       length = len(_x)
00277       if python3 or type(_x) == unicode:
00278         _x = _x.encode('utf-8')
00279         length = len(_x)
00280       buff.write(struct.pack('<I%ss'%length, length, _x))
00281       buff.write(_struct_B.pack(self.action_feedback.status.status))
00282       _x = self.action_feedback.status.text
00283       length = len(_x)
00284       if python3 or type(_x) == unicode:
00285         _x = _x.encode('utf-8')
00286         length = len(_x)
00287       buff.write(struct.pack('<I%ss'%length, length, _x))
00288       _x = self
00289       buff.write(_struct_2i.pack(_x.action_feedback.feedback.time_to_completion.secs, _x.action_feedback.feedback.time_to_completion.nsecs))
00290     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00291     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00292 
00293   def deserialize(self, str):
00294     """
00295     unpack serialized message in str into this message instance
00296     :param str: byte array of serialized message, ``str``
00297     """
00298     try:
00299       if self.action_goal is None:
00300         self.action_goal = simple_arm_server.msg.MoveArmActionGoal()
00301       if self.action_result is None:
00302         self.action_result = simple_arm_server.msg.MoveArmActionResult()
00303       if self.action_feedback is None:
00304         self.action_feedback = simple_arm_server.msg.MoveArmActionFeedback()
00305       end = 0
00306       _x = self
00307       start = end
00308       end += 12
00309       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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_goal.header.frame_id = str[start:end].decode('utf-8')
00317       else:
00318         self.action_goal.header.frame_id = str[start:end]
00319       _x = self
00320       start = end
00321       end += 8
00322       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.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_goal.goal_id.id = str[start:end].decode('utf-8')
00330       else:
00331         self.action_goal.goal_id.id = str[start:end]
00332       _x = self
00333       start = end
00334       end += 12
00335       (_x.action_goal.goal.header.seq, _x.action_goal.goal.header.stamp.secs, _x.action_goal.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00336       start = end
00337       end += 4
00338       (length,) = _struct_I.unpack(str[start:end])
00339       start = end
00340       end += length
00341       if python3:
00342         self.action_goal.goal.header.frame_id = str[start:end].decode('utf-8')
00343       else:
00344         self.action_goal.goal.header.frame_id = str[start:end]
00345       start = end
00346       end += 4
00347       (length,) = _struct_I.unpack(str[start:end])
00348       self.action_goal.goal.motions = []
00349       for i in range(0, length):
00350         val1 = simple_arm_server.msg.ArmAction()
00351         start = end
00352         end += 1
00353         (val1.type,) = _struct_b.unpack(str[start:end])
00354         _v5 = val1.goal
00355         _v6 = _v5.position
00356         _x = _v6
00357         start = end
00358         end += 24
00359         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00360         _v7 = _v5.orientation
00361         _x = _v7
00362         start = end
00363         end += 32
00364         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00365         start = end
00366         end += 8
00367         (val1.command,) = _struct_d.unpack(str[start:end])
00368         _v8 = val1.move_time
00369         _x = _v8
00370         start = end
00371         end += 8
00372         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00373         self.action_goal.goal.motions.append(val1)
00374       _x = self
00375       start = end
00376       end += 12
00377       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00378       start = end
00379       end += 4
00380       (length,) = _struct_I.unpack(str[start:end])
00381       start = end
00382       end += length
00383       if python3:
00384         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00385       else:
00386         self.action_result.header.frame_id = str[start:end]
00387       _x = self
00388       start = end
00389       end += 8
00390       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00391       start = end
00392       end += 4
00393       (length,) = _struct_I.unpack(str[start:end])
00394       start = end
00395       end += length
00396       if python3:
00397         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00398       else:
00399         self.action_result.status.goal_id.id = str[start:end]
00400       start = end
00401       end += 1
00402       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00403       start = end
00404       end += 4
00405       (length,) = _struct_I.unpack(str[start:end])
00406       start = end
00407       end += length
00408       if python3:
00409         self.action_result.status.text = str[start:end].decode('utf-8')
00410       else:
00411         self.action_result.status.text = str[start:end]
00412       _x = self
00413       start = end
00414       end += 13
00415       (_x.action_result.result.success, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00416       self.action_result.result.success = bool(self.action_result.result.success)
00417       start = end
00418       end += 4
00419       (length,) = _struct_I.unpack(str[start:end])
00420       start = end
00421       end += length
00422       if python3:
00423         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00424       else:
00425         self.action_feedback.header.frame_id = str[start:end]
00426       _x = self
00427       start = end
00428       end += 8
00429       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00430       start = end
00431       end += 4
00432       (length,) = _struct_I.unpack(str[start:end])
00433       start = end
00434       end += length
00435       if python3:
00436         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00437       else:
00438         self.action_feedback.status.goal_id.id = str[start:end]
00439       start = end
00440       end += 1
00441       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00442       start = end
00443       end += 4
00444       (length,) = _struct_I.unpack(str[start:end])
00445       start = end
00446       end += length
00447       if python3:
00448         self.action_feedback.status.text = str[start:end].decode('utf-8')
00449       else:
00450         self.action_feedback.status.text = str[start:end]
00451       _x = self
00452       start = end
00453       end += 8
00454       (_x.action_feedback.feedback.time_to_completion.secs, _x.action_feedback.feedback.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00455       return self
00456     except struct.error as e:
00457       raise genpy.DeserializationError(e) #most likely buffer underfill
00458 
00459 
00460   def serialize_numpy(self, buff, numpy):
00461     """
00462     serialize message with numpy array types into buffer
00463     :param buff: buffer, ``StringIO``
00464     :param numpy: numpy python module
00465     """
00466     try:
00467       _x = self
00468       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00469       _x = self.action_goal.header.frame_id
00470       length = len(_x)
00471       if python3 or type(_x) == unicode:
00472         _x = _x.encode('utf-8')
00473         length = len(_x)
00474       buff.write(struct.pack('<I%ss'%length, length, _x))
00475       _x = self
00476       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00477       _x = self.action_goal.goal_id.id
00478       length = len(_x)
00479       if python3 or type(_x) == unicode:
00480         _x = _x.encode('utf-8')
00481         length = len(_x)
00482       buff.write(struct.pack('<I%ss'%length, length, _x))
00483       _x = self
00484       buff.write(_struct_3I.pack(_x.action_goal.goal.header.seq, _x.action_goal.goal.header.stamp.secs, _x.action_goal.goal.header.stamp.nsecs))
00485       _x = self.action_goal.goal.header.frame_id
00486       length = len(_x)
00487       if python3 or type(_x) == unicode:
00488         _x = _x.encode('utf-8')
00489         length = len(_x)
00490       buff.write(struct.pack('<I%ss'%length, length, _x))
00491       length = len(self.action_goal.goal.motions)
00492       buff.write(_struct_I.pack(length))
00493       for val1 in self.action_goal.goal.motions:
00494         buff.write(_struct_b.pack(val1.type))
00495         _v9 = val1.goal
00496         _v10 = _v9.position
00497         _x = _v10
00498         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00499         _v11 = _v9.orientation
00500         _x = _v11
00501         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00502         buff.write(_struct_d.pack(val1.command))
00503         _v12 = val1.move_time
00504         _x = _v12
00505         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00506       _x = self
00507       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00508       _x = self.action_result.header.frame_id
00509       length = len(_x)
00510       if python3 or type(_x) == unicode:
00511         _x = _x.encode('utf-8')
00512         length = len(_x)
00513       buff.write(struct.pack('<I%ss'%length, length, _x))
00514       _x = self
00515       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00516       _x = self.action_result.status.goal_id.id
00517       length = len(_x)
00518       if python3 or type(_x) == unicode:
00519         _x = _x.encode('utf-8')
00520         length = len(_x)
00521       buff.write(struct.pack('<I%ss'%length, length, _x))
00522       buff.write(_struct_B.pack(self.action_result.status.status))
00523       _x = self.action_result.status.text
00524       length = len(_x)
00525       if python3 or type(_x) == unicode:
00526         _x = _x.encode('utf-8')
00527         length = len(_x)
00528       buff.write(struct.pack('<I%ss'%length, length, _x))
00529       _x = self
00530       buff.write(_struct_B3I.pack(_x.action_result.result.success, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00531       _x = self.action_feedback.header.frame_id
00532       length = len(_x)
00533       if python3 or type(_x) == unicode:
00534         _x = _x.encode('utf-8')
00535         length = len(_x)
00536       buff.write(struct.pack('<I%ss'%length, length, _x))
00537       _x = self
00538       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00539       _x = self.action_feedback.status.goal_id.id
00540       length = len(_x)
00541       if python3 or type(_x) == unicode:
00542         _x = _x.encode('utf-8')
00543         length = len(_x)
00544       buff.write(struct.pack('<I%ss'%length, length, _x))
00545       buff.write(_struct_B.pack(self.action_feedback.status.status))
00546       _x = self.action_feedback.status.text
00547       length = len(_x)
00548       if python3 or type(_x) == unicode:
00549         _x = _x.encode('utf-8')
00550         length = len(_x)
00551       buff.write(struct.pack('<I%ss'%length, length, _x))
00552       _x = self
00553       buff.write(_struct_2i.pack(_x.action_feedback.feedback.time_to_completion.secs, _x.action_feedback.feedback.time_to_completion.nsecs))
00554     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00555     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00556 
00557   def deserialize_numpy(self, str, numpy):
00558     """
00559     unpack serialized message in str into this message instance using numpy for array types
00560     :param str: byte array of serialized message, ``str``
00561     :param numpy: numpy python module
00562     """
00563     try:
00564       if self.action_goal is None:
00565         self.action_goal = simple_arm_server.msg.MoveArmActionGoal()
00566       if self.action_result is None:
00567         self.action_result = simple_arm_server.msg.MoveArmActionResult()
00568       if self.action_feedback is None:
00569         self.action_feedback = simple_arm_server.msg.MoveArmActionFeedback()
00570       end = 0
00571       _x = self
00572       start = end
00573       end += 12
00574       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00575       start = end
00576       end += 4
00577       (length,) = _struct_I.unpack(str[start:end])
00578       start = end
00579       end += length
00580       if python3:
00581         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00582       else:
00583         self.action_goal.header.frame_id = str[start:end]
00584       _x = self
00585       start = end
00586       end += 8
00587       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00588       start = end
00589       end += 4
00590       (length,) = _struct_I.unpack(str[start:end])
00591       start = end
00592       end += length
00593       if python3:
00594         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00595       else:
00596         self.action_goal.goal_id.id = str[start:end]
00597       _x = self
00598       start = end
00599       end += 12
00600       (_x.action_goal.goal.header.seq, _x.action_goal.goal.header.stamp.secs, _x.action_goal.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00601       start = end
00602       end += 4
00603       (length,) = _struct_I.unpack(str[start:end])
00604       start = end
00605       end += length
00606       if python3:
00607         self.action_goal.goal.header.frame_id = str[start:end].decode('utf-8')
00608       else:
00609         self.action_goal.goal.header.frame_id = str[start:end]
00610       start = end
00611       end += 4
00612       (length,) = _struct_I.unpack(str[start:end])
00613       self.action_goal.goal.motions = []
00614       for i in range(0, length):
00615         val1 = simple_arm_server.msg.ArmAction()
00616         start = end
00617         end += 1
00618         (val1.type,) = _struct_b.unpack(str[start:end])
00619         _v13 = val1.goal
00620         _v14 = _v13.position
00621         _x = _v14
00622         start = end
00623         end += 24
00624         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00625         _v15 = _v13.orientation
00626         _x = _v15
00627         start = end
00628         end += 32
00629         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00630         start = end
00631         end += 8
00632         (val1.command,) = _struct_d.unpack(str[start:end])
00633         _v16 = val1.move_time
00634         _x = _v16
00635         start = end
00636         end += 8
00637         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00638         self.action_goal.goal.motions.append(val1)
00639       _x = self
00640       start = end
00641       end += 12
00642       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00643       start = end
00644       end += 4
00645       (length,) = _struct_I.unpack(str[start:end])
00646       start = end
00647       end += length
00648       if python3:
00649         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00650       else:
00651         self.action_result.header.frame_id = str[start:end]
00652       _x = self
00653       start = end
00654       end += 8
00655       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00656       start = end
00657       end += 4
00658       (length,) = _struct_I.unpack(str[start:end])
00659       start = end
00660       end += length
00661       if python3:
00662         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00663       else:
00664         self.action_result.status.goal_id.id = str[start:end]
00665       start = end
00666       end += 1
00667       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00668       start = end
00669       end += 4
00670       (length,) = _struct_I.unpack(str[start:end])
00671       start = end
00672       end += length
00673       if python3:
00674         self.action_result.status.text = str[start:end].decode('utf-8')
00675       else:
00676         self.action_result.status.text = str[start:end]
00677       _x = self
00678       start = end
00679       end += 13
00680       (_x.action_result.result.success, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00681       self.action_result.result.success = bool(self.action_result.result.success)
00682       start = end
00683       end += 4
00684       (length,) = _struct_I.unpack(str[start:end])
00685       start = end
00686       end += length
00687       if python3:
00688         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00689       else:
00690         self.action_feedback.header.frame_id = str[start:end]
00691       _x = self
00692       start = end
00693       end += 8
00694       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00695       start = end
00696       end += 4
00697       (length,) = _struct_I.unpack(str[start:end])
00698       start = end
00699       end += length
00700       if python3:
00701         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00702       else:
00703         self.action_feedback.status.goal_id.id = str[start:end]
00704       start = end
00705       end += 1
00706       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00707       start = end
00708       end += 4
00709       (length,) = _struct_I.unpack(str[start:end])
00710       start = end
00711       end += length
00712       if python3:
00713         self.action_feedback.status.text = str[start:end].decode('utf-8')
00714       else:
00715         self.action_feedback.status.text = str[start:end]
00716       _x = self
00717       start = end
00718       end += 8
00719       (_x.action_feedback.feedback.time_to_completion.secs, _x.action_feedback.feedback.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00720       return self
00721     except struct.error as e:
00722       raise genpy.DeserializationError(e) #most likely buffer underfill
00723 
00724 _struct_I = genpy.struct_I
00725 _struct_b = struct.Struct("<b")
00726 _struct_d = struct.Struct("<d")
00727 _struct_2i = struct.Struct("<2i")
00728 _struct_3I = struct.Struct("<3I")
00729 _struct_B = struct.Struct("<B")
00730 _struct_B3I = struct.Struct("<B3I")
00731 _struct_4d = struct.Struct("<4d")
00732 _struct_2I = struct.Struct("<2I")
00733 _struct_3d = struct.Struct("<3d")


simple_arm_server
Author(s): Michael Ferguson
autogenerated on Mon Oct 6 2014 07:42:06