_JointAnglesWithSpeedActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from nao_msgs/JointAnglesWithSpeedActionResult.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 nao_msgs.msg
00008 import sensor_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class JointAnglesWithSpeedActionResult(genpy.Message):
00014   _md5sum = "8863b007f420d5f94fcdaa0f865d1767"
00015   _type = "nao_msgs/JointAnglesWithSpeedActionResult"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalStatus status
00021 JointAnglesWithSpeedResult result
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalStatus
00043 GoalID goal_id
00044 uint8 status
00045 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00046 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00047 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00048                             #   and has since completed its execution (Terminal State)
00049 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00050 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00051                             #    to some failure (Terminal State)
00052 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00053                             #    because the goal was unattainable or invalid (Terminal State)
00054 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00055                             #    and has not yet completed execution
00056 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00057                             #    but the action server has not yet confirmed that the goal is canceled
00058 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00059                             #    and was successfully cancelled (Terminal State)
00060 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00061                             #    sent over the wire by an action server
00062 
00063 #Allow for the user to associate a string with GoalStatus for debugging
00064 string text
00065 
00066 
00067 ================================================================================
00068 MSG: actionlib_msgs/GoalID
00069 # The stamp should store the time at which this goal was requested.
00070 # It is used by an action server when it tries to preempt all
00071 # goals that were requested before a certain time
00072 time stamp
00073 
00074 # The id provides a way to associate feedback and
00075 # result message with specific goal requests. The id
00076 # specified must be unique.
00077 string id
00078 
00079 
00080 ================================================================================
00081 MSG: nao_msgs/JointAnglesWithSpeedResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 # result is the actually reached position
00084 sensor_msgs/JointState goal_position
00085 
00086 ================================================================================
00087 MSG: sensor_msgs/JointState
00088 # This is a message that holds data to describe the state of a set of torque controlled joints. 
00089 #
00090 # The state of each joint (revolute or prismatic) is defined by:
00091 #  * the position of the joint (rad or m),
00092 #  * the velocity of the joint (rad/s or m/s) and 
00093 #  * the effort that is applied in the joint (Nm or N).
00094 #
00095 # Each joint is uniquely identified by its name
00096 # The header specifies the time at which the joint states were recorded. All the joint states
00097 # in one message have to be recorded at the same time.
00098 #
00099 # This message consists of a multiple arrays, one for each part of the joint state. 
00100 # The goal is to make each of the fields optional. When e.g. your joints have no
00101 # effort associated with them, you can leave the effort array empty. 
00102 #
00103 # All arrays in this message should have the same size, or be empty.
00104 # This is the only way to uniquely associate the joint name with the correct
00105 # states.
00106 
00107 
00108 Header header
00109 
00110 string[] name
00111 float64[] position
00112 float64[] velocity
00113 float64[] effort
00114 
00115 """
00116   __slots__ = ['header','status','result']
00117   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','nao_msgs/JointAnglesWithSpeedResult']
00118 
00119   def __init__(self, *args, **kwds):
00120     """
00121     Constructor. Any message fields that are implicitly/explicitly
00122     set to None will be assigned a default value. The recommend
00123     use is keyword arguments as this is more robust to future message
00124     changes.  You cannot mix in-order arguments and keyword arguments.
00125 
00126     The available fields are:
00127        header,status,result
00128 
00129     :param args: complete set of field values, in .msg order
00130     :param kwds: use keyword arguments corresponding to message field names
00131     to set specific fields.
00132     """
00133     if args or kwds:
00134       super(JointAnglesWithSpeedActionResult, self).__init__(*args, **kwds)
00135       #message fields cannot be None, assign default values for those that are
00136       if self.header is None:
00137         self.header = std_msgs.msg.Header()
00138       if self.status is None:
00139         self.status = actionlib_msgs.msg.GoalStatus()
00140       if self.result is None:
00141         self.result = nao_msgs.msg.JointAnglesWithSpeedResult()
00142     else:
00143       self.header = std_msgs.msg.Header()
00144       self.status = actionlib_msgs.msg.GoalStatus()
00145       self.result = nao_msgs.msg.JointAnglesWithSpeedResult()
00146 
00147   def _get_types(self):
00148     """
00149     internal API method
00150     """
00151     return self._slot_types
00152 
00153   def serialize(self, buff):
00154     """
00155     serialize message into buffer
00156     :param buff: buffer, ``StringIO``
00157     """
00158     try:
00159       _x = self
00160       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00161       _x = self.header.frame_id
00162       length = len(_x)
00163       if python3 or type(_x) == unicode:
00164         _x = _x.encode('utf-8')
00165         length = len(_x)
00166       buff.write(struct.pack('<I%ss'%length, length, _x))
00167       _x = self
00168       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00169       _x = self.status.goal_id.id
00170       length = len(_x)
00171       if python3 or type(_x) == unicode:
00172         _x = _x.encode('utf-8')
00173         length = len(_x)
00174       buff.write(struct.pack('<I%ss'%length, length, _x))
00175       buff.write(_struct_B.pack(self.status.status))
00176       _x = self.status.text
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.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs))
00184       _x = self.result.goal_position.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       length = len(self.result.goal_position.name)
00191       buff.write(_struct_I.pack(length))
00192       for val1 in self.result.goal_position.name:
00193         length = len(val1)
00194         if python3 or type(val1) == unicode:
00195           val1 = val1.encode('utf-8')
00196           length = len(val1)
00197         buff.write(struct.pack('<I%ss'%length, length, val1))
00198       length = len(self.result.goal_position.position)
00199       buff.write(_struct_I.pack(length))
00200       pattern = '<%sd'%length
00201       buff.write(struct.pack(pattern, *self.result.goal_position.position))
00202       length = len(self.result.goal_position.velocity)
00203       buff.write(_struct_I.pack(length))
00204       pattern = '<%sd'%length
00205       buff.write(struct.pack(pattern, *self.result.goal_position.velocity))
00206       length = len(self.result.goal_position.effort)
00207       buff.write(_struct_I.pack(length))
00208       pattern = '<%sd'%length
00209       buff.write(struct.pack(pattern, *self.result.goal_position.effort))
00210     except struct.error as se: self._check_types(se)
00211     except TypeError as te: self._check_types(te)
00212 
00213   def deserialize(self, str):
00214     """
00215     unpack serialized message in str into this message instance
00216     :param str: byte array of serialized message, ``str``
00217     """
00218     try:
00219       if self.header is None:
00220         self.header = std_msgs.msg.Header()
00221       if self.status is None:
00222         self.status = actionlib_msgs.msg.GoalStatus()
00223       if self.result is None:
00224         self.result = nao_msgs.msg.JointAnglesWithSpeedResult()
00225       end = 0
00226       _x = self
00227       start = end
00228       end += 12
00229       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00230       start = end
00231       end += 4
00232       (length,) = _struct_I.unpack(str[start:end])
00233       start = end
00234       end += length
00235       if python3:
00236         self.header.frame_id = str[start:end].decode('utf-8')
00237       else:
00238         self.header.frame_id = str[start:end]
00239       _x = self
00240       start = end
00241       end += 8
00242       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00243       start = end
00244       end += 4
00245       (length,) = _struct_I.unpack(str[start:end])
00246       start = end
00247       end += length
00248       if python3:
00249         self.status.goal_id.id = str[start:end].decode('utf-8')
00250       else:
00251         self.status.goal_id.id = str[start:end]
00252       start = end
00253       end += 1
00254       (self.status.status,) = _struct_B.unpack(str[start:end])
00255       start = end
00256       end += 4
00257       (length,) = _struct_I.unpack(str[start:end])
00258       start = end
00259       end += length
00260       if python3:
00261         self.status.text = str[start:end].decode('utf-8')
00262       else:
00263         self.status.text = str[start:end]
00264       _x = self
00265       start = end
00266       end += 12
00267       (_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00268       start = end
00269       end += 4
00270       (length,) = _struct_I.unpack(str[start:end])
00271       start = end
00272       end += length
00273       if python3:
00274         self.result.goal_position.header.frame_id = str[start:end].decode('utf-8')
00275       else:
00276         self.result.goal_position.header.frame_id = str[start:end]
00277       start = end
00278       end += 4
00279       (length,) = _struct_I.unpack(str[start:end])
00280       self.result.goal_position.name = []
00281       for i in range(0, length):
00282         start = end
00283         end += 4
00284         (length,) = _struct_I.unpack(str[start:end])
00285         start = end
00286         end += length
00287         if python3:
00288           val1 = str[start:end].decode('utf-8')
00289         else:
00290           val1 = str[start:end]
00291         self.result.goal_position.name.append(val1)
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       pattern = '<%sd'%length
00296       start = end
00297       end += struct.calcsize(pattern)
00298       self.result.goal_position.position = struct.unpack(pattern, str[start:end])
00299       start = end
00300       end += 4
00301       (length,) = _struct_I.unpack(str[start:end])
00302       pattern = '<%sd'%length
00303       start = end
00304       end += struct.calcsize(pattern)
00305       self.result.goal_position.velocity = struct.unpack(pattern, str[start:end])
00306       start = end
00307       end += 4
00308       (length,) = _struct_I.unpack(str[start:end])
00309       pattern = '<%sd'%length
00310       start = end
00311       end += struct.calcsize(pattern)
00312       self.result.goal_position.effort = struct.unpack(pattern, str[start:end])
00313       return self
00314     except struct.error as e:
00315       raise genpy.DeserializationError(e) #most likely buffer underfill
00316 
00317 
00318   def serialize_numpy(self, buff, numpy):
00319     """
00320     serialize message with numpy array types into buffer
00321     :param buff: buffer, ``StringIO``
00322     :param numpy: numpy python module
00323     """
00324     try:
00325       _x = self
00326       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00327       _x = self.header.frame_id
00328       length = len(_x)
00329       if python3 or type(_x) == unicode:
00330         _x = _x.encode('utf-8')
00331         length = len(_x)
00332       buff.write(struct.pack('<I%ss'%length, length, _x))
00333       _x = self
00334       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00335       _x = self.status.goal_id.id
00336       length = len(_x)
00337       if python3 or type(_x) == unicode:
00338         _x = _x.encode('utf-8')
00339         length = len(_x)
00340       buff.write(struct.pack('<I%ss'%length, length, _x))
00341       buff.write(_struct_B.pack(self.status.status))
00342       _x = self.status.text
00343       length = len(_x)
00344       if python3 or type(_x) == unicode:
00345         _x = _x.encode('utf-8')
00346         length = len(_x)
00347       buff.write(struct.pack('<I%ss'%length, length, _x))
00348       _x = self
00349       buff.write(_struct_3I.pack(_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs))
00350       _x = self.result.goal_position.header.frame_id
00351       length = len(_x)
00352       if python3 or type(_x) == unicode:
00353         _x = _x.encode('utf-8')
00354         length = len(_x)
00355       buff.write(struct.pack('<I%ss'%length, length, _x))
00356       length = len(self.result.goal_position.name)
00357       buff.write(_struct_I.pack(length))
00358       for val1 in self.result.goal_position.name:
00359         length = len(val1)
00360         if python3 or type(val1) == unicode:
00361           val1 = val1.encode('utf-8')
00362           length = len(val1)
00363         buff.write(struct.pack('<I%ss'%length, length, val1))
00364       length = len(self.result.goal_position.position)
00365       buff.write(_struct_I.pack(length))
00366       pattern = '<%sd'%length
00367       buff.write(self.result.goal_position.position.tostring())
00368       length = len(self.result.goal_position.velocity)
00369       buff.write(_struct_I.pack(length))
00370       pattern = '<%sd'%length
00371       buff.write(self.result.goal_position.velocity.tostring())
00372       length = len(self.result.goal_position.effort)
00373       buff.write(_struct_I.pack(length))
00374       pattern = '<%sd'%length
00375       buff.write(self.result.goal_position.effort.tostring())
00376     except struct.error as se: self._check_types(se)
00377     except TypeError as te: self._check_types(te)
00378 
00379   def deserialize_numpy(self, str, numpy):
00380     """
00381     unpack serialized message in str into this message instance using numpy for array types
00382     :param str: byte array of serialized message, ``str``
00383     :param numpy: numpy python module
00384     """
00385     try:
00386       if self.header is None:
00387         self.header = std_msgs.msg.Header()
00388       if self.status is None:
00389         self.status = actionlib_msgs.msg.GoalStatus()
00390       if self.result is None:
00391         self.result = nao_msgs.msg.JointAnglesWithSpeedResult()
00392       end = 0
00393       _x = self
00394       start = end
00395       end += 12
00396       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00397       start = end
00398       end += 4
00399       (length,) = _struct_I.unpack(str[start:end])
00400       start = end
00401       end += length
00402       if python3:
00403         self.header.frame_id = str[start:end].decode('utf-8')
00404       else:
00405         self.header.frame_id = str[start:end]
00406       _x = self
00407       start = end
00408       end += 8
00409       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00410       start = end
00411       end += 4
00412       (length,) = _struct_I.unpack(str[start:end])
00413       start = end
00414       end += length
00415       if python3:
00416         self.status.goal_id.id = str[start:end].decode('utf-8')
00417       else:
00418         self.status.goal_id.id = str[start:end]
00419       start = end
00420       end += 1
00421       (self.status.status,) = _struct_B.unpack(str[start:end])
00422       start = end
00423       end += 4
00424       (length,) = _struct_I.unpack(str[start:end])
00425       start = end
00426       end += length
00427       if python3:
00428         self.status.text = str[start:end].decode('utf-8')
00429       else:
00430         self.status.text = str[start:end]
00431       _x = self
00432       start = end
00433       end += 12
00434       (_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00435       start = end
00436       end += 4
00437       (length,) = _struct_I.unpack(str[start:end])
00438       start = end
00439       end += length
00440       if python3:
00441         self.result.goal_position.header.frame_id = str[start:end].decode('utf-8')
00442       else:
00443         self.result.goal_position.header.frame_id = str[start:end]
00444       start = end
00445       end += 4
00446       (length,) = _struct_I.unpack(str[start:end])
00447       self.result.goal_position.name = []
00448       for i in range(0, length):
00449         start = end
00450         end += 4
00451         (length,) = _struct_I.unpack(str[start:end])
00452         start = end
00453         end += length
00454         if python3:
00455           val1 = str[start:end].decode('utf-8')
00456         else:
00457           val1 = str[start:end]
00458         self.result.goal_position.name.append(val1)
00459       start = end
00460       end += 4
00461       (length,) = _struct_I.unpack(str[start:end])
00462       pattern = '<%sd'%length
00463       start = end
00464       end += struct.calcsize(pattern)
00465       self.result.goal_position.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00466       start = end
00467       end += 4
00468       (length,) = _struct_I.unpack(str[start:end])
00469       pattern = '<%sd'%length
00470       start = end
00471       end += struct.calcsize(pattern)
00472       self.result.goal_position.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00473       start = end
00474       end += 4
00475       (length,) = _struct_I.unpack(str[start:end])
00476       pattern = '<%sd'%length
00477       start = end
00478       end += struct.calcsize(pattern)
00479       self.result.goal_position.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00480       return self
00481     except struct.error as e:
00482       raise genpy.DeserializationError(e) #most likely buffer underfill
00483 
00484 _struct_I = genpy.struct_I
00485 _struct_3I = struct.Struct("<3I")
00486 _struct_B = struct.Struct("<B")
00487 _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