_JointMusclePositionControllerState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from sr_robot_msgs/JointMusclePositionControllerState.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 JointMusclePositionControllerState(genpy.Message):
00010   _md5sum = "5a9f3e4da940842d5d2d35e00e1cd647"
00011   _type = "sr_robot_msgs/JointMusclePositionControllerState"
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 pseudo_command
00020 int8 valve_muscle_0
00021 int8 valve_muscle_1
00022 float64 packed_valve
00023 uint16 muscle_pressure_0
00024 uint16 muscle_pressure_1
00025 float64 p
00026 float64 i
00027 float64 d
00028 float64 i_clamp
00029 
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   __slots__ = ['header','set_point','process_value','process_value_dot','error','time_step','pseudo_command','valve_muscle_0','valve_muscle_1','packed_valve','muscle_pressure_0','muscle_pressure_1','p','i','d','i_clamp']
00051   _slot_types = ['std_msgs/Header','float64','float64','float64','float64','float64','float64','int8','int8','float64','uint16','uint16','float64','float64','float64','float64']
00052 
00053   def __init__(self, *args, **kwds):
00054     """
00055     Constructor. Any message fields that are implicitly/explicitly
00056     set to None will be assigned a default value. The recommend
00057     use is keyword arguments as this is more robust to future message
00058     changes.  You cannot mix in-order arguments and keyword arguments.
00059 
00060     The available fields are:
00061        header,set_point,process_value,process_value_dot,error,time_step,pseudo_command,valve_muscle_0,valve_muscle_1,packed_valve,muscle_pressure_0,muscle_pressure_1,p,i,d,i_clamp
00062 
00063     :param args: complete set of field values, in .msg order
00064     :param kwds: use keyword arguments corresponding to message field names
00065     to set specific fields.
00066     """
00067     if args or kwds:
00068       super(JointMusclePositionControllerState, self).__init__(*args, **kwds)
00069       #message fields cannot be None, assign default values for those that are
00070       if self.header is None:
00071         self.header = std_msgs.msg.Header()
00072       if self.set_point is None:
00073         self.set_point = 0.
00074       if self.process_value is None:
00075         self.process_value = 0.
00076       if self.process_value_dot is None:
00077         self.process_value_dot = 0.
00078       if self.error is None:
00079         self.error = 0.
00080       if self.time_step is None:
00081         self.time_step = 0.
00082       if self.pseudo_command is None:
00083         self.pseudo_command = 0.
00084       if self.valve_muscle_0 is None:
00085         self.valve_muscle_0 = 0
00086       if self.valve_muscle_1 is None:
00087         self.valve_muscle_1 = 0
00088       if self.packed_valve is None:
00089         self.packed_valve = 0.
00090       if self.muscle_pressure_0 is None:
00091         self.muscle_pressure_0 = 0
00092       if self.muscle_pressure_1 is None:
00093         self.muscle_pressure_1 = 0
00094       if self.p is None:
00095         self.p = 0.
00096       if self.i is None:
00097         self.i = 0.
00098       if self.d is None:
00099         self.d = 0.
00100       if self.i_clamp is None:
00101         self.i_clamp = 0.
00102     else:
00103       self.header = std_msgs.msg.Header()
00104       self.set_point = 0.
00105       self.process_value = 0.
00106       self.process_value_dot = 0.
00107       self.error = 0.
00108       self.time_step = 0.
00109       self.pseudo_command = 0.
00110       self.valve_muscle_0 = 0
00111       self.valve_muscle_1 = 0
00112       self.packed_valve = 0.
00113       self.muscle_pressure_0 = 0
00114       self.muscle_pressure_1 = 0
00115       self.p = 0.
00116       self.i = 0.
00117       self.d = 0.
00118       self.i_clamp = 0.
00119 
00120   def _get_types(self):
00121     """
00122     internal API method
00123     """
00124     return self._slot_types
00125 
00126   def serialize(self, buff):
00127     """
00128     serialize message into buffer
00129     :param buff: buffer, ``StringIO``
00130     """
00131     try:
00132       _x = self
00133       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00134       _x = self.header.frame_id
00135       length = len(_x)
00136       if python3 or type(_x) == unicode:
00137         _x = _x.encode('utf-8')
00138         length = len(_x)
00139       buff.write(struct.pack('<I%ss'%length, length, _x))
00140       _x = self
00141       buff.write(_struct_6d2bd2H4d.pack(_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.pseudo_command, _x.valve_muscle_0, _x.valve_muscle_1, _x.packed_valve, _x.muscle_pressure_0, _x.muscle_pressure_1, _x.p, _x.i, _x.d, _x.i_clamp))
00142     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00143     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00144 
00145   def deserialize(self, str):
00146     """
00147     unpack serialized message in str into this message instance
00148     :param str: byte array of serialized message, ``str``
00149     """
00150     try:
00151       if self.header is None:
00152         self.header = std_msgs.msg.Header()
00153       end = 0
00154       _x = self
00155       start = end
00156       end += 12
00157       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00158       start = end
00159       end += 4
00160       (length,) = _struct_I.unpack(str[start:end])
00161       start = end
00162       end += length
00163       if python3:
00164         self.header.frame_id = str[start:end].decode('utf-8')
00165       else:
00166         self.header.frame_id = str[start:end]
00167       _x = self
00168       start = end
00169       end += 94
00170       (_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.pseudo_command, _x.valve_muscle_0, _x.valve_muscle_1, _x.packed_valve, _x.muscle_pressure_0, _x.muscle_pressure_1, _x.p, _x.i, _x.d, _x.i_clamp,) = _struct_6d2bd2H4d.unpack(str[start:end])
00171       return self
00172     except struct.error as e:
00173       raise genpy.DeserializationError(e) #most likely buffer underfill
00174 
00175 
00176   def serialize_numpy(self, buff, numpy):
00177     """
00178     serialize message with numpy array types into buffer
00179     :param buff: buffer, ``StringIO``
00180     :param numpy: numpy python module
00181     """
00182     try:
00183       _x = self
00184       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00185       _x = self.header.frame_id
00186       length = len(_x)
00187       if python3 or type(_x) == unicode:
00188         _x = _x.encode('utf-8')
00189         length = len(_x)
00190       buff.write(struct.pack('<I%ss'%length, length, _x))
00191       _x = self
00192       buff.write(_struct_6d2bd2H4d.pack(_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.pseudo_command, _x.valve_muscle_0, _x.valve_muscle_1, _x.packed_valve, _x.muscle_pressure_0, _x.muscle_pressure_1, _x.p, _x.i, _x.d, _x.i_clamp))
00193     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00194     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00195 
00196   def deserialize_numpy(self, str, numpy):
00197     """
00198     unpack serialized message in str into this message instance using numpy for array types
00199     :param str: byte array of serialized message, ``str``
00200     :param numpy: numpy python module
00201     """
00202     try:
00203       if self.header is None:
00204         self.header = std_msgs.msg.Header()
00205       end = 0
00206       _x = self
00207       start = end
00208       end += 12
00209       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00210       start = end
00211       end += 4
00212       (length,) = _struct_I.unpack(str[start:end])
00213       start = end
00214       end += length
00215       if python3:
00216         self.header.frame_id = str[start:end].decode('utf-8')
00217       else:
00218         self.header.frame_id = str[start:end]
00219       _x = self
00220       start = end
00221       end += 94
00222       (_x.set_point, _x.process_value, _x.process_value_dot, _x.error, _x.time_step, _x.pseudo_command, _x.valve_muscle_0, _x.valve_muscle_1, _x.packed_valve, _x.muscle_pressure_0, _x.muscle_pressure_1, _x.p, _x.i, _x.d, _x.i_clamp,) = _struct_6d2bd2H4d.unpack(str[start:end])
00223       return self
00224     except struct.error as e:
00225       raise genpy.DeserializationError(e) #most likely buffer underfill
00226 
00227 _struct_I = genpy.struct_I
00228 _struct_3I = struct.Struct("<3I")
00229 _struct_6d2bd2H4d = struct.Struct("<6d2bd2H4d")


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