_JointAnglesWithSpeedAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from nao_msgs/JointAnglesWithSpeedAction.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 sensor_msgs.msg
00009 import nao_msgs.msg
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class JointAnglesWithSpeedAction(genpy.Message):
00014   _md5sum = "efd2f7ac88847414fd26aacf32f993a5"
00015   _type = "nao_msgs/JointAnglesWithSpeedAction"
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 JointAnglesWithSpeedActionGoal action_goal
00020 JointAnglesWithSpeedActionResult action_result
00021 JointAnglesWithSpeedActionFeedback action_feedback
00022 
00023 ================================================================================
00024 MSG: nao_msgs/JointAnglesWithSpeedActionGoal
00025 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00026 
00027 Header header
00028 actionlib_msgs/GoalID goal_id
00029 JointAnglesWithSpeedGoal 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: nao_msgs/JointAnglesWithSpeedGoal
00064 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00065 # goal: a registered body pose name
00066 nao_msgs/JointAnglesWithSpeed joint_angles
00067 
00068 ================================================================================
00069 MSG: nao_msgs/JointAnglesWithSpeed
00070 Header header
00071 
00072 # A list of joint names, corresponding to their names in the Nao docs.
00073 # This must be either the same lenght of joint_angles or 1 if it's a
00074 # keyword such as 'Body' (for all angles)
00075 string[] joint_names
00076 float32[] joint_angles
00077 
00078 #fraction of max joint velocity [0:1]
00079 float32 speed
00080 
00081 # Absolute angle(=0, default) or relative change
00082 uint8 relative
00083 
00084 ================================================================================
00085 MSG: nao_msgs/JointAnglesWithSpeedActionResult
00086 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00087 
00088 Header header
00089 actionlib_msgs/GoalStatus status
00090 JointAnglesWithSpeedResult result
00091 
00092 ================================================================================
00093 MSG: actionlib_msgs/GoalStatus
00094 GoalID goal_id
00095 uint8 status
00096 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00097 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00098 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00099                             #   and has since completed its execution (Terminal State)
00100 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00101 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00102                             #    to some failure (Terminal State)
00103 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00104                             #    because the goal was unattainable or invalid (Terminal State)
00105 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00106                             #    and has not yet completed execution
00107 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00108                             #    but the action server has not yet confirmed that the goal is canceled
00109 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00110                             #    and was successfully cancelled (Terminal State)
00111 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00112                             #    sent over the wire by an action server
00113 
00114 #Allow for the user to associate a string with GoalStatus for debugging
00115 string text
00116 
00117 
00118 ================================================================================
00119 MSG: nao_msgs/JointAnglesWithSpeedResult
00120 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00121 # result is the actually reached position
00122 sensor_msgs/JointState goal_position
00123 
00124 ================================================================================
00125 MSG: sensor_msgs/JointState
00126 # This is a message that holds data to describe the state of a set of torque controlled joints. 
00127 #
00128 # The state of each joint (revolute or prismatic) is defined by:
00129 #  * the position of the joint (rad or m),
00130 #  * the velocity of the joint (rad/s or m/s) and 
00131 #  * the effort that is applied in the joint (Nm or N).
00132 #
00133 # Each joint is uniquely identified by its name
00134 # The header specifies the time at which the joint states were recorded. All the joint states
00135 # in one message have to be recorded at the same time.
00136 #
00137 # This message consists of a multiple arrays, one for each part of the joint state. 
00138 # The goal is to make each of the fields optional. When e.g. your joints have no
00139 # effort associated with them, you can leave the effort array empty. 
00140 #
00141 # All arrays in this message should have the same size, or be empty.
00142 # This is the only way to uniquely associate the joint name with the correct
00143 # states.
00144 
00145 
00146 Header header
00147 
00148 string[] name
00149 float64[] position
00150 float64[] velocity
00151 float64[] effort
00152 
00153 ================================================================================
00154 MSG: nao_msgs/JointAnglesWithSpeedActionFeedback
00155 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00156 
00157 Header header
00158 actionlib_msgs/GoalStatus status
00159 JointAnglesWithSpeedFeedback feedback
00160 
00161 ================================================================================
00162 MSG: nao_msgs/JointAnglesWithSpeedFeedback
00163 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00164 # no feedback currently 
00165 
00166 """
00167   __slots__ = ['action_goal','action_result','action_feedback']
00168   _slot_types = ['nao_msgs/JointAnglesWithSpeedActionGoal','nao_msgs/JointAnglesWithSpeedActionResult','nao_msgs/JointAnglesWithSpeedActionFeedback']
00169 
00170   def __init__(self, *args, **kwds):
00171     """
00172     Constructor. Any message fields that are implicitly/explicitly
00173     set to None will be assigned a default value. The recommend
00174     use is keyword arguments as this is more robust to future message
00175     changes.  You cannot mix in-order arguments and keyword arguments.
00176 
00177     The available fields are:
00178        action_goal,action_result,action_feedback
00179 
00180     :param args: complete set of field values, in .msg order
00181     :param kwds: use keyword arguments corresponding to message field names
00182     to set specific fields.
00183     """
00184     if args or kwds:
00185       super(JointAnglesWithSpeedAction, self).__init__(*args, **kwds)
00186       #message fields cannot be None, assign default values for those that are
00187       if self.action_goal is None:
00188         self.action_goal = nao_msgs.msg.JointAnglesWithSpeedActionGoal()
00189       if self.action_result is None:
00190         self.action_result = nao_msgs.msg.JointAnglesWithSpeedActionResult()
00191       if self.action_feedback is None:
00192         self.action_feedback = nao_msgs.msg.JointAnglesWithSpeedActionFeedback()
00193     else:
00194       self.action_goal = nao_msgs.msg.JointAnglesWithSpeedActionGoal()
00195       self.action_result = nao_msgs.msg.JointAnglesWithSpeedActionResult()
00196       self.action_feedback = nao_msgs.msg.JointAnglesWithSpeedActionFeedback()
00197 
00198   def _get_types(self):
00199     """
00200     internal API method
00201     """
00202     return self._slot_types
00203 
00204   def serialize(self, buff):
00205     """
00206     serialize message into buffer
00207     :param buff: buffer, ``StringIO``
00208     """
00209     try:
00210       _x = self
00211       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00212       _x = self.action_goal.header.frame_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       _x = self
00219       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00220       _x = self.action_goal.goal_id.id
00221       length = len(_x)
00222       if python3 or type(_x) == unicode:
00223         _x = _x.encode('utf-8')
00224         length = len(_x)
00225       buff.write(struct.pack('<I%ss'%length, length, _x))
00226       _x = self
00227       buff.write(_struct_3I.pack(_x.action_goal.goal.joint_angles.header.seq, _x.action_goal.goal.joint_angles.header.stamp.secs, _x.action_goal.goal.joint_angles.header.stamp.nsecs))
00228       _x = self.action_goal.goal.joint_angles.header.frame_id
00229       length = len(_x)
00230       if python3 or type(_x) == unicode:
00231         _x = _x.encode('utf-8')
00232         length = len(_x)
00233       buff.write(struct.pack('<I%ss'%length, length, _x))
00234       length = len(self.action_goal.goal.joint_angles.joint_names)
00235       buff.write(_struct_I.pack(length))
00236       for val1 in self.action_goal.goal.joint_angles.joint_names:
00237         length = len(val1)
00238         if python3 or type(val1) == unicode:
00239           val1 = val1.encode('utf-8')
00240           length = len(val1)
00241         buff.write(struct.pack('<I%ss'%length, length, val1))
00242       length = len(self.action_goal.goal.joint_angles.joint_angles)
00243       buff.write(_struct_I.pack(length))
00244       pattern = '<%sf'%length
00245       buff.write(struct.pack(pattern, *self.action_goal.goal.joint_angles.joint_angles))
00246       _x = self
00247       buff.write(_struct_fB3I.pack(_x.action_goal.goal.joint_angles.speed, _x.action_goal.goal.joint_angles.relative, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00248       _x = self.action_result.header.frame_id
00249       length = len(_x)
00250       if python3 or type(_x) == unicode:
00251         _x = _x.encode('utf-8')
00252         length = len(_x)
00253       buff.write(struct.pack('<I%ss'%length, length, _x))
00254       _x = self
00255       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00256       _x = self.action_result.status.goal_id.id
00257       length = len(_x)
00258       if python3 or type(_x) == unicode:
00259         _x = _x.encode('utf-8')
00260         length = len(_x)
00261       buff.write(struct.pack('<I%ss'%length, length, _x))
00262       buff.write(_struct_B.pack(self.action_result.status.status))
00263       _x = self.action_result.status.text
00264       length = len(_x)
00265       if python3 or type(_x) == unicode:
00266         _x = _x.encode('utf-8')
00267         length = len(_x)
00268       buff.write(struct.pack('<I%ss'%length, length, _x))
00269       _x = self
00270       buff.write(_struct_3I.pack(_x.action_result.result.goal_position.header.seq, _x.action_result.result.goal_position.header.stamp.secs, _x.action_result.result.goal_position.header.stamp.nsecs))
00271       _x = self.action_result.result.goal_position.header.frame_id
00272       length = len(_x)
00273       if python3 or type(_x) == unicode:
00274         _x = _x.encode('utf-8')
00275         length = len(_x)
00276       buff.write(struct.pack('<I%ss'%length, length, _x))
00277       length = len(self.action_result.result.goal_position.name)
00278       buff.write(_struct_I.pack(length))
00279       for val1 in self.action_result.result.goal_position.name:
00280         length = len(val1)
00281         if python3 or type(val1) == unicode:
00282           val1 = val1.encode('utf-8')
00283           length = len(val1)
00284         buff.write(struct.pack('<I%ss'%length, length, val1))
00285       length = len(self.action_result.result.goal_position.position)
00286       buff.write(_struct_I.pack(length))
00287       pattern = '<%sd'%length
00288       buff.write(struct.pack(pattern, *self.action_result.result.goal_position.position))
00289       length = len(self.action_result.result.goal_position.velocity)
00290       buff.write(_struct_I.pack(length))
00291       pattern = '<%sd'%length
00292       buff.write(struct.pack(pattern, *self.action_result.result.goal_position.velocity))
00293       length = len(self.action_result.result.goal_position.effort)
00294       buff.write(_struct_I.pack(length))
00295       pattern = '<%sd'%length
00296       buff.write(struct.pack(pattern, *self.action_result.result.goal_position.effort))
00297       _x = self
00298       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00299       _x = self.action_feedback.header.frame_id
00300       length = len(_x)
00301       if python3 or type(_x) == unicode:
00302         _x = _x.encode('utf-8')
00303         length = len(_x)
00304       buff.write(struct.pack('<I%ss'%length, length, _x))
00305       _x = self
00306       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00307       _x = self.action_feedback.status.goal_id.id
00308       length = len(_x)
00309       if python3 or type(_x) == unicode:
00310         _x = _x.encode('utf-8')
00311         length = len(_x)
00312       buff.write(struct.pack('<I%ss'%length, length, _x))
00313       buff.write(_struct_B.pack(self.action_feedback.status.status))
00314       _x = self.action_feedback.status.text
00315       length = len(_x)
00316       if python3 or type(_x) == unicode:
00317         _x = _x.encode('utf-8')
00318         length = len(_x)
00319       buff.write(struct.pack('<I%ss'%length, length, _x))
00320     except struct.error as se: self._check_types(se)
00321     except TypeError as te: self._check_types(te)
00322 
00323   def deserialize(self, str):
00324     """
00325     unpack serialized message in str into this message instance
00326     :param str: byte array of serialized message, ``str``
00327     """
00328     try:
00329       if self.action_goal is None:
00330         self.action_goal = nao_msgs.msg.JointAnglesWithSpeedActionGoal()
00331       if self.action_result is None:
00332         self.action_result = nao_msgs.msg.JointAnglesWithSpeedActionResult()
00333       if self.action_feedback is None:
00334         self.action_feedback = nao_msgs.msg.JointAnglesWithSpeedActionFeedback()
00335       end = 0
00336       _x = self
00337       start = end
00338       end += 12
00339       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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_goal.header.frame_id = str[start:end].decode('utf-8')
00347       else:
00348         self.action_goal.header.frame_id = str[start:end]
00349       _x = self
00350       start = end
00351       end += 8
00352       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00353       start = end
00354       end += 4
00355       (length,) = _struct_I.unpack(str[start:end])
00356       start = end
00357       end += length
00358       if python3:
00359         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00360       else:
00361         self.action_goal.goal_id.id = str[start:end]
00362       _x = self
00363       start = end
00364       end += 12
00365       (_x.action_goal.goal.joint_angles.header.seq, _x.action_goal.goal.joint_angles.header.stamp.secs, _x.action_goal.goal.joint_angles.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00366       start = end
00367       end += 4
00368       (length,) = _struct_I.unpack(str[start:end])
00369       start = end
00370       end += length
00371       if python3:
00372         self.action_goal.goal.joint_angles.header.frame_id = str[start:end].decode('utf-8')
00373       else:
00374         self.action_goal.goal.joint_angles.header.frame_id = str[start:end]
00375       start = end
00376       end += 4
00377       (length,) = _struct_I.unpack(str[start:end])
00378       self.action_goal.goal.joint_angles.joint_names = []
00379       for i in range(0, length):
00380         start = end
00381         end += 4
00382         (length,) = _struct_I.unpack(str[start:end])
00383         start = end
00384         end += length
00385         if python3:
00386           val1 = str[start:end].decode('utf-8')
00387         else:
00388           val1 = str[start:end]
00389         self.action_goal.goal.joint_angles.joint_names.append(val1)
00390       start = end
00391       end += 4
00392       (length,) = _struct_I.unpack(str[start:end])
00393       pattern = '<%sf'%length
00394       start = end
00395       end += struct.calcsize(pattern)
00396       self.action_goal.goal.joint_angles.joint_angles = struct.unpack(pattern, str[start:end])
00397       _x = self
00398       start = end
00399       end += 17
00400       (_x.action_goal.goal.joint_angles.speed, _x.action_goal.goal.joint_angles.relative, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_fB3I.unpack(str[start:end])
00401       start = end
00402       end += 4
00403       (length,) = _struct_I.unpack(str[start:end])
00404       start = end
00405       end += length
00406       if python3:
00407         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00408       else:
00409         self.action_result.header.frame_id = str[start:end]
00410       _x = self
00411       start = end
00412       end += 8
00413       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00414       start = end
00415       end += 4
00416       (length,) = _struct_I.unpack(str[start:end])
00417       start = end
00418       end += length
00419       if python3:
00420         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00421       else:
00422         self.action_result.status.goal_id.id = str[start:end]
00423       start = end
00424       end += 1
00425       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00426       start = end
00427       end += 4
00428       (length,) = _struct_I.unpack(str[start:end])
00429       start = end
00430       end += length
00431       if python3:
00432         self.action_result.status.text = str[start:end].decode('utf-8')
00433       else:
00434         self.action_result.status.text = str[start:end]
00435       _x = self
00436       start = end
00437       end += 12
00438       (_x.action_result.result.goal_position.header.seq, _x.action_result.result.goal_position.header.stamp.secs, _x.action_result.result.goal_position.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00439       start = end
00440       end += 4
00441       (length,) = _struct_I.unpack(str[start:end])
00442       start = end
00443       end += length
00444       if python3:
00445         self.action_result.result.goal_position.header.frame_id = str[start:end].decode('utf-8')
00446       else:
00447         self.action_result.result.goal_position.header.frame_id = str[start:end]
00448       start = end
00449       end += 4
00450       (length,) = _struct_I.unpack(str[start:end])
00451       self.action_result.result.goal_position.name = []
00452       for i in range(0, length):
00453         start = end
00454         end += 4
00455         (length,) = _struct_I.unpack(str[start:end])
00456         start = end
00457         end += length
00458         if python3:
00459           val1 = str[start:end].decode('utf-8')
00460         else:
00461           val1 = str[start:end]
00462         self.action_result.result.goal_position.name.append(val1)
00463       start = end
00464       end += 4
00465       (length,) = _struct_I.unpack(str[start:end])
00466       pattern = '<%sd'%length
00467       start = end
00468       end += struct.calcsize(pattern)
00469       self.action_result.result.goal_position.position = struct.unpack(pattern, str[start:end])
00470       start = end
00471       end += 4
00472       (length,) = _struct_I.unpack(str[start:end])
00473       pattern = '<%sd'%length
00474       start = end
00475       end += struct.calcsize(pattern)
00476       self.action_result.result.goal_position.velocity = struct.unpack(pattern, str[start:end])
00477       start = end
00478       end += 4
00479       (length,) = _struct_I.unpack(str[start:end])
00480       pattern = '<%sd'%length
00481       start = end
00482       end += struct.calcsize(pattern)
00483       self.action_result.result.goal_position.effort = struct.unpack(pattern, str[start:end])
00484       _x = self
00485       start = end
00486       end += 12
00487       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00488       start = end
00489       end += 4
00490       (length,) = _struct_I.unpack(str[start:end])
00491       start = end
00492       end += length
00493       if python3:
00494         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00495       else:
00496         self.action_feedback.header.frame_id = str[start:end]
00497       _x = self
00498       start = end
00499       end += 8
00500       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.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_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00508       else:
00509         self.action_feedback.status.goal_id.id = str[start:end]
00510       start = end
00511       end += 1
00512       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00513       start = end
00514       end += 4
00515       (length,) = _struct_I.unpack(str[start:end])
00516       start = end
00517       end += length
00518       if python3:
00519         self.action_feedback.status.text = str[start:end].decode('utf-8')
00520       else:
00521         self.action_feedback.status.text = str[start:end]
00522       return self
00523     except struct.error as e:
00524       raise genpy.DeserializationError(e) #most likely buffer underfill
00525 
00526 
00527   def serialize_numpy(self, buff, numpy):
00528     """
00529     serialize message with numpy array types into buffer
00530     :param buff: buffer, ``StringIO``
00531     :param numpy: numpy python module
00532     """
00533     try:
00534       _x = self
00535       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00536       _x = self.action_goal.header.frame_id
00537       length = len(_x)
00538       if python3 or type(_x) == unicode:
00539         _x = _x.encode('utf-8')
00540         length = len(_x)
00541       buff.write(struct.pack('<I%ss'%length, length, _x))
00542       _x = self
00543       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00544       _x = self.action_goal.goal_id.id
00545       length = len(_x)
00546       if python3 or type(_x) == unicode:
00547         _x = _x.encode('utf-8')
00548         length = len(_x)
00549       buff.write(struct.pack('<I%ss'%length, length, _x))
00550       _x = self
00551       buff.write(_struct_3I.pack(_x.action_goal.goal.joint_angles.header.seq, _x.action_goal.goal.joint_angles.header.stamp.secs, _x.action_goal.goal.joint_angles.header.stamp.nsecs))
00552       _x = self.action_goal.goal.joint_angles.header.frame_id
00553       length = len(_x)
00554       if python3 or type(_x) == unicode:
00555         _x = _x.encode('utf-8')
00556         length = len(_x)
00557       buff.write(struct.pack('<I%ss'%length, length, _x))
00558       length = len(self.action_goal.goal.joint_angles.joint_names)
00559       buff.write(_struct_I.pack(length))
00560       for val1 in self.action_goal.goal.joint_angles.joint_names:
00561         length = len(val1)
00562         if python3 or type(val1) == unicode:
00563           val1 = val1.encode('utf-8')
00564           length = len(val1)
00565         buff.write(struct.pack('<I%ss'%length, length, val1))
00566       length = len(self.action_goal.goal.joint_angles.joint_angles)
00567       buff.write(_struct_I.pack(length))
00568       pattern = '<%sf'%length
00569       buff.write(self.action_goal.goal.joint_angles.joint_angles.tostring())
00570       _x = self
00571       buff.write(_struct_fB3I.pack(_x.action_goal.goal.joint_angles.speed, _x.action_goal.goal.joint_angles.relative, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00572       _x = self.action_result.header.frame_id
00573       length = len(_x)
00574       if python3 or type(_x) == unicode:
00575         _x = _x.encode('utf-8')
00576         length = len(_x)
00577       buff.write(struct.pack('<I%ss'%length, length, _x))
00578       _x = self
00579       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00580       _x = self.action_result.status.goal_id.id
00581       length = len(_x)
00582       if python3 or type(_x) == unicode:
00583         _x = _x.encode('utf-8')
00584         length = len(_x)
00585       buff.write(struct.pack('<I%ss'%length, length, _x))
00586       buff.write(_struct_B.pack(self.action_result.status.status))
00587       _x = self.action_result.status.text
00588       length = len(_x)
00589       if python3 or type(_x) == unicode:
00590         _x = _x.encode('utf-8')
00591         length = len(_x)
00592       buff.write(struct.pack('<I%ss'%length, length, _x))
00593       _x = self
00594       buff.write(_struct_3I.pack(_x.action_result.result.goal_position.header.seq, _x.action_result.result.goal_position.header.stamp.secs, _x.action_result.result.goal_position.header.stamp.nsecs))
00595       _x = self.action_result.result.goal_position.header.frame_id
00596       length = len(_x)
00597       if python3 or type(_x) == unicode:
00598         _x = _x.encode('utf-8')
00599         length = len(_x)
00600       buff.write(struct.pack('<I%ss'%length, length, _x))
00601       length = len(self.action_result.result.goal_position.name)
00602       buff.write(_struct_I.pack(length))
00603       for val1 in self.action_result.result.goal_position.name:
00604         length = len(val1)
00605         if python3 or type(val1) == unicode:
00606           val1 = val1.encode('utf-8')
00607           length = len(val1)
00608         buff.write(struct.pack('<I%ss'%length, length, val1))
00609       length = len(self.action_result.result.goal_position.position)
00610       buff.write(_struct_I.pack(length))
00611       pattern = '<%sd'%length
00612       buff.write(self.action_result.result.goal_position.position.tostring())
00613       length = len(self.action_result.result.goal_position.velocity)
00614       buff.write(_struct_I.pack(length))
00615       pattern = '<%sd'%length
00616       buff.write(self.action_result.result.goal_position.velocity.tostring())
00617       length = len(self.action_result.result.goal_position.effort)
00618       buff.write(_struct_I.pack(length))
00619       pattern = '<%sd'%length
00620       buff.write(self.action_result.result.goal_position.effort.tostring())
00621       _x = self
00622       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00623       _x = self.action_feedback.header.frame_id
00624       length = len(_x)
00625       if python3 or type(_x) == unicode:
00626         _x = _x.encode('utf-8')
00627         length = len(_x)
00628       buff.write(struct.pack('<I%ss'%length, length, _x))
00629       _x = self
00630       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00631       _x = self.action_feedback.status.goal_id.id
00632       length = len(_x)
00633       if python3 or type(_x) == unicode:
00634         _x = _x.encode('utf-8')
00635         length = len(_x)
00636       buff.write(struct.pack('<I%ss'%length, length, _x))
00637       buff.write(_struct_B.pack(self.action_feedback.status.status))
00638       _x = self.action_feedback.status.text
00639       length = len(_x)
00640       if python3 or type(_x) == unicode:
00641         _x = _x.encode('utf-8')
00642         length = len(_x)
00643       buff.write(struct.pack('<I%ss'%length, length, _x))
00644     except struct.error as se: self._check_types(se)
00645     except TypeError as te: self._check_types(te)
00646 
00647   def deserialize_numpy(self, str, numpy):
00648     """
00649     unpack serialized message in str into this message instance using numpy for array types
00650     :param str: byte array of serialized message, ``str``
00651     :param numpy: numpy python module
00652     """
00653     try:
00654       if self.action_goal is None:
00655         self.action_goal = nao_msgs.msg.JointAnglesWithSpeedActionGoal()
00656       if self.action_result is None:
00657         self.action_result = nao_msgs.msg.JointAnglesWithSpeedActionResult()
00658       if self.action_feedback is None:
00659         self.action_feedback = nao_msgs.msg.JointAnglesWithSpeedActionFeedback()
00660       end = 0
00661       _x = self
00662       start = end
00663       end += 12
00664       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00665       start = end
00666       end += 4
00667       (length,) = _struct_I.unpack(str[start:end])
00668       start = end
00669       end += length
00670       if python3:
00671         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00672       else:
00673         self.action_goal.header.frame_id = str[start:end]
00674       _x = self
00675       start = end
00676       end += 8
00677       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00678       start = end
00679       end += 4
00680       (length,) = _struct_I.unpack(str[start:end])
00681       start = end
00682       end += length
00683       if python3:
00684         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00685       else:
00686         self.action_goal.goal_id.id = str[start:end]
00687       _x = self
00688       start = end
00689       end += 12
00690       (_x.action_goal.goal.joint_angles.header.seq, _x.action_goal.goal.joint_angles.header.stamp.secs, _x.action_goal.goal.joint_angles.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00691       start = end
00692       end += 4
00693       (length,) = _struct_I.unpack(str[start:end])
00694       start = end
00695       end += length
00696       if python3:
00697         self.action_goal.goal.joint_angles.header.frame_id = str[start:end].decode('utf-8')
00698       else:
00699         self.action_goal.goal.joint_angles.header.frame_id = str[start:end]
00700       start = end
00701       end += 4
00702       (length,) = _struct_I.unpack(str[start:end])
00703       self.action_goal.goal.joint_angles.joint_names = []
00704       for i in range(0, length):
00705         start = end
00706         end += 4
00707         (length,) = _struct_I.unpack(str[start:end])
00708         start = end
00709         end += length
00710         if python3:
00711           val1 = str[start:end].decode('utf-8')
00712         else:
00713           val1 = str[start:end]
00714         self.action_goal.goal.joint_angles.joint_names.append(val1)
00715       start = end
00716       end += 4
00717       (length,) = _struct_I.unpack(str[start:end])
00718       pattern = '<%sf'%length
00719       start = end
00720       end += struct.calcsize(pattern)
00721       self.action_goal.goal.joint_angles.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00722       _x = self
00723       start = end
00724       end += 17
00725       (_x.action_goal.goal.joint_angles.speed, _x.action_goal.goal.joint_angles.relative, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_fB3I.unpack(str[start:end])
00726       start = end
00727       end += 4
00728       (length,) = _struct_I.unpack(str[start:end])
00729       start = end
00730       end += length
00731       if python3:
00732         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00733       else:
00734         self.action_result.header.frame_id = str[start:end]
00735       _x = self
00736       start = end
00737       end += 8
00738       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00739       start = end
00740       end += 4
00741       (length,) = _struct_I.unpack(str[start:end])
00742       start = end
00743       end += length
00744       if python3:
00745         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00746       else:
00747         self.action_result.status.goal_id.id = str[start:end]
00748       start = end
00749       end += 1
00750       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00751       start = end
00752       end += 4
00753       (length,) = _struct_I.unpack(str[start:end])
00754       start = end
00755       end += length
00756       if python3:
00757         self.action_result.status.text = str[start:end].decode('utf-8')
00758       else:
00759         self.action_result.status.text = str[start:end]
00760       _x = self
00761       start = end
00762       end += 12
00763       (_x.action_result.result.goal_position.header.seq, _x.action_result.result.goal_position.header.stamp.secs, _x.action_result.result.goal_position.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00764       start = end
00765       end += 4
00766       (length,) = _struct_I.unpack(str[start:end])
00767       start = end
00768       end += length
00769       if python3:
00770         self.action_result.result.goal_position.header.frame_id = str[start:end].decode('utf-8')
00771       else:
00772         self.action_result.result.goal_position.header.frame_id = str[start:end]
00773       start = end
00774       end += 4
00775       (length,) = _struct_I.unpack(str[start:end])
00776       self.action_result.result.goal_position.name = []
00777       for i in range(0, length):
00778         start = end
00779         end += 4
00780         (length,) = _struct_I.unpack(str[start:end])
00781         start = end
00782         end += length
00783         if python3:
00784           val1 = str[start:end].decode('utf-8')
00785         else:
00786           val1 = str[start:end]
00787         self.action_result.result.goal_position.name.append(val1)
00788       start = end
00789       end += 4
00790       (length,) = _struct_I.unpack(str[start:end])
00791       pattern = '<%sd'%length
00792       start = end
00793       end += struct.calcsize(pattern)
00794       self.action_result.result.goal_position.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00795       start = end
00796       end += 4
00797       (length,) = _struct_I.unpack(str[start:end])
00798       pattern = '<%sd'%length
00799       start = end
00800       end += struct.calcsize(pattern)
00801       self.action_result.result.goal_position.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00802       start = end
00803       end += 4
00804       (length,) = _struct_I.unpack(str[start:end])
00805       pattern = '<%sd'%length
00806       start = end
00807       end += struct.calcsize(pattern)
00808       self.action_result.result.goal_position.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00809       _x = self
00810       start = end
00811       end += 12
00812       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00813       start = end
00814       end += 4
00815       (length,) = _struct_I.unpack(str[start:end])
00816       start = end
00817       end += length
00818       if python3:
00819         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00820       else:
00821         self.action_feedback.header.frame_id = str[start:end]
00822       _x = self
00823       start = end
00824       end += 8
00825       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00826       start = end
00827       end += 4
00828       (length,) = _struct_I.unpack(str[start:end])
00829       start = end
00830       end += length
00831       if python3:
00832         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00833       else:
00834         self.action_feedback.status.goal_id.id = str[start:end]
00835       start = end
00836       end += 1
00837       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00838       start = end
00839       end += 4
00840       (length,) = _struct_I.unpack(str[start:end])
00841       start = end
00842       end += length
00843       if python3:
00844         self.action_feedback.status.text = str[start:end].decode('utf-8')
00845       else:
00846         self.action_feedback.status.text = str[start:end]
00847       return self
00848     except struct.error as e:
00849       raise genpy.DeserializationError(e) #most likely buffer underfill
00850 
00851 _struct_I = genpy.struct_I
00852 _struct_3I = struct.Struct("<3I")
00853 _struct_B = struct.Struct("<B")
00854 _struct_fB3I = struct.Struct("<fB3I")
00855 _struct_2I = struct.Struct("<2I")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


nao_msgs
Author(s): Armin Hornung, Stefan Osswald, Daniel Maier
autogenerated on Tue Oct 15 2013 10:05:22