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