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


sr_robot_msgs
Author(s): Ugo Cupcic/ugo@shadowrobot.com
autogenerated on Mon Oct 6 2014 07:40:06