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