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