_JointControllerState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_controllers_msgs/JointControllerState.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 std_msgs.msg
00008 
00009 class JointControllerState(genpy.Message):
00010   _md5sum = "c0d034a7bf20aeb1c37f3eccb7992b69"
00011   _type = "pr2_controllers_msgs/JointControllerState"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """Header header
00014 float64 set_point
00015 float64 process_value
00016 float64 process_value_dot
00017 float64 error
00018 float64 time_step
00019 float64 command
00020 float64 p
00021 float64 i
00022 float64 d
00023 float64 i_clamp
00024 
00025 
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data 
00030 # in a particular coordinate frame.
00031 # 
00032 # sequence ID: consecutively increasing ID 
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043 
00044 """
00045   __slots__ = ['header','set_point','process_value','process_value_dot','error','time_step','command','p','i','d','i_clamp']
00046   _slot_types = ['std_msgs/Header','float64','float64','float64','float64','float64','float64','float64','float64','float64','float64']
00047 
00048   def __init__(self, *args, **kwds):
00049     """
00050     Constructor. Any message fields that are implicitly/explicitly
00051     set to None will be assigned a default value. The recommend
00052     use is keyword arguments as this is more robust to future message
00053     changes.  You cannot mix in-order arguments and keyword arguments.
00054 
00055     The available fields are:
00056        header,set_point,process_value,process_value_dot,error,time_step,command,p,i,d,i_clamp
00057 
00058     :param args: complete set of field values, in .msg order
00059     :param kwds: use keyword arguments corresponding to message field names
00060     to set specific fields.
00061     """
00062     if args or kwds:
00063       super(JointControllerState, self).__init__(*args, **kwds)
00064       #message fields cannot be None, assign default values for those that are
00065       if self.header is None:
00066         self.header = std_msgs.msg.Header()
00067       if self.set_point is None:
00068         self.set_point = 0.
00069       if self.process_value is None:
00070         self.process_value = 0.
00071       if self.process_value_dot is None:
00072         self.process_value_dot = 0.
00073       if self.error is None:
00074         self.error = 0.
00075       if self.time_step is None:
00076         self.time_step = 0.
00077       if self.command is None:
00078         self.command = 0.
00079       if self.p is None:
00080         self.p = 0.
00081       if self.i is None:
00082         self.i = 0.
00083       if self.d is None:
00084         self.d = 0.
00085       if self.i_clamp is None:
00086         self.i_clamp = 0.
00087     else:
00088       self.header = std_msgs.msg.Header()
00089       self.set_point = 0.
00090       self.process_value = 0.
00091       self.process_value_dot = 0.
00092       self.error = 0.
00093       self.time_step = 0.
00094       self.command = 0.
00095       self.p = 0.
00096       self.i = 0.
00097       self.d = 0.
00098       self.i_clamp = 0.
00099 
00100   def _get_types(self):
00101     """
00102     internal API method
00103     """
00104     return self._slot_types
00105 
00106   def serialize(self, buff):
00107     """
00108     serialize message into buffer
00109     :param buff: buffer, ``StringIO``
00110     """
00111     try:
00112       _x = self
00113       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00114       _x = self.header.frame_id
00115       length = len(_x)
00116       if python3 or type(_x) == unicode:
00117         _x = _x.encode('utf-8')
00118         length = len(_x)
00119       buff.write(struct.pack('<I%ss'%length, length, _x))
00120       _x = self
00121       buff.write(_struct_10d.pack(_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.command, _x.p, _x.i, _x.d, _x.i_clamp))
00122     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00123     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00124 
00125   def deserialize(self, str):
00126     """
00127     unpack serialized message in str into this message instance
00128     :param str: byte array of serialized message, ``str``
00129     """
00130     try:
00131       if self.header is None:
00132         self.header = std_msgs.msg.Header()
00133       end = 0
00134       _x = self
00135       start = end
00136       end += 12
00137       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00138       start = end
00139       end += 4
00140       (length,) = _struct_I.unpack(str[start:end])
00141       start = end
00142       end += length
00143       if python3:
00144         self.header.frame_id = str[start:end].decode('utf-8')
00145       else:
00146         self.header.frame_id = str[start:end]
00147       _x = self
00148       start = end
00149       end += 80
00150       (_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.command, _x.p, _x.i, _x.d, _x.i_clamp,) = _struct_10d.unpack(str[start:end])
00151       return self
00152     except struct.error as e:
00153       raise genpy.DeserializationError(e) #most likely buffer underfill
00154 
00155 
00156   def serialize_numpy(self, buff, numpy):
00157     """
00158     serialize message with numpy array types into buffer
00159     :param buff: buffer, ``StringIO``
00160     :param numpy: numpy python module
00161     """
00162     try:
00163       _x = self
00164       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00165       _x = self.header.frame_id
00166       length = len(_x)
00167       if python3 or type(_x) == unicode:
00168         _x = _x.encode('utf-8')
00169         length = len(_x)
00170       buff.write(struct.pack('<I%ss'%length, length, _x))
00171       _x = self
00172       buff.write(_struct_10d.pack(_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.command, _x.p, _x.i, _x.d, _x.i_clamp))
00173     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00174     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00175 
00176   def deserialize_numpy(self, str, numpy):
00177     """
00178     unpack serialized message in str into this message instance using numpy for array types
00179     :param str: byte array of serialized message, ``str``
00180     :param numpy: numpy python module
00181     """
00182     try:
00183       if self.header is None:
00184         self.header = std_msgs.msg.Header()
00185       end = 0
00186       _x = self
00187       start = end
00188       end += 12
00189       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00190       start = end
00191       end += 4
00192       (length,) = _struct_I.unpack(str[start:end])
00193       start = end
00194       end += length
00195       if python3:
00196         self.header.frame_id = str[start:end].decode('utf-8')
00197       else:
00198         self.header.frame_id = str[start:end]
00199       _x = self
00200       start = end
00201       end += 80
00202       (_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.command, _x.p, _x.i, _x.d, _x.i_clamp,) = _struct_10d.unpack(str[start:end])
00203       return self
00204     except struct.error as e:
00205       raise genpy.DeserializationError(e) #most likely buffer underfill
00206 
00207 _struct_I = genpy.struct_I
00208 _struct_3I = struct.Struct("<3I")
00209 _struct_10d = struct.Struct("<10d")


pr2_controllers_msgs
Author(s): Stuart Glaser
autogenerated on Thu Apr 24 2014 15:44:12