$search
00001 """autogenerated by genmsg_py from SetFloatRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class SetFloatRequest(roslib.message.Message): 00008 _md5sum = "1b2e6c76ff0a23e68a43b77651f66f18" 00009 _type = "cob_trajectory_controller/SetFloatRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """std_msgs/Float64 value 00012 00013 ================================================================================ 00014 MSG: std_msgs/Float64 00015 float64 data 00016 """ 00017 __slots__ = ['value'] 00018 _slot_types = ['std_msgs/Float64'] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 value 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(SetFloatRequest, self).__init__(*args, **kwds) 00036 #message fields cannot be None, assign default values for those that are 00037 if self.value is None: 00038 self.value = std_msgs.msg.Float64() 00039 else: 00040 self.value = std_msgs.msg.Float64() 00041 00042 def _get_types(self): 00043 """ 00044 internal API method 00045 """ 00046 return self._slot_types 00047 00048 def serialize(self, buff): 00049 """ 00050 serialize message into buffer 00051 @param buff: buffer 00052 @type buff: StringIO 00053 """ 00054 try: 00055 buff.write(_struct_d.pack(self.value.data)) 00056 except struct.error as se: self._check_types(se) 00057 except TypeError as te: self._check_types(te) 00058 00059 def deserialize(self, str): 00060 """ 00061 unpack serialized message in str into this message instance 00062 @param str: byte array of serialized message 00063 @type str: str 00064 """ 00065 try: 00066 if self.value is None: 00067 self.value = std_msgs.msg.Float64() 00068 end = 0 00069 start = end 00070 end += 8 00071 (self.value.data,) = _struct_d.unpack(str[start:end]) 00072 return self 00073 except struct.error as e: 00074 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00075 00076 00077 def serialize_numpy(self, buff, numpy): 00078 """ 00079 serialize message with numpy array types into buffer 00080 @param buff: buffer 00081 @type buff: StringIO 00082 @param numpy: numpy python module 00083 @type numpy module 00084 """ 00085 try: 00086 buff.write(_struct_d.pack(self.value.data)) 00087 except struct.error as se: self._check_types(se) 00088 except TypeError as te: self._check_types(te) 00089 00090 def deserialize_numpy(self, str, numpy): 00091 """ 00092 unpack serialized message in str into this message instance using numpy for array types 00093 @param str: byte array of serialized message 00094 @type str: str 00095 @param numpy: numpy python module 00096 @type numpy: module 00097 """ 00098 try: 00099 if self.value is None: 00100 self.value = std_msgs.msg.Float64() 00101 end = 0 00102 start = end 00103 end += 8 00104 (self.value.data,) = _struct_d.unpack(str[start:end]) 00105 return self 00106 except struct.error as e: 00107 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00108 00109 _struct_I = roslib.message.struct_I 00110 _struct_d = struct.Struct("<d") 00111 """autogenerated by genmsg_py from SetFloatResponse.msg. Do not edit.""" 00112 import roslib.message 00113 import struct 00114 00115 import std_msgs.msg 00116 00117 class SetFloatResponse(roslib.message.Message): 00118 _md5sum = "5f31cb2e813cfb0e488c574c3b5d9dbe" 00119 _type = "cob_trajectory_controller/SetFloatResponse" 00120 _has_header = False #flag to mark the presence of a Header object 00121 _full_text = """std_msgs/Bool success 00122 00123 ================================================================================ 00124 MSG: std_msgs/Bool 00125 bool data 00126 """ 00127 __slots__ = ['success'] 00128 _slot_types = ['std_msgs/Bool'] 00129 00130 def __init__(self, *args, **kwds): 00131 """ 00132 Constructor. Any message fields that are implicitly/explicitly 00133 set to None will be assigned a default value. The recommend 00134 use is keyword arguments as this is more robust to future message 00135 changes. You cannot mix in-order arguments and keyword arguments. 00136 00137 The available fields are: 00138 success 00139 00140 @param args: complete set of field values, in .msg order 00141 @param kwds: use keyword arguments corresponding to message field names 00142 to set specific fields. 00143 """ 00144 if args or kwds: 00145 super(SetFloatResponse, self).__init__(*args, **kwds) 00146 #message fields cannot be None, assign default values for those that are 00147 if self.success is None: 00148 self.success = std_msgs.msg.Bool() 00149 else: 00150 self.success = std_msgs.msg.Bool() 00151 00152 def _get_types(self): 00153 """ 00154 internal API method 00155 """ 00156 return self._slot_types 00157 00158 def serialize(self, buff): 00159 """ 00160 serialize message into buffer 00161 @param buff: buffer 00162 @type buff: StringIO 00163 """ 00164 try: 00165 buff.write(_struct_B.pack(self.success.data)) 00166 except struct.error as se: self._check_types(se) 00167 except TypeError as te: self._check_types(te) 00168 00169 def deserialize(self, str): 00170 """ 00171 unpack serialized message in str into this message instance 00172 @param str: byte array of serialized message 00173 @type str: str 00174 """ 00175 try: 00176 if self.success is None: 00177 self.success = std_msgs.msg.Bool() 00178 end = 0 00179 start = end 00180 end += 1 00181 (self.success.data,) = _struct_B.unpack(str[start:end]) 00182 self.success.data = bool(self.success.data) 00183 return self 00184 except struct.error as e: 00185 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00186 00187 00188 def serialize_numpy(self, buff, numpy): 00189 """ 00190 serialize message with numpy array types into buffer 00191 @param buff: buffer 00192 @type buff: StringIO 00193 @param numpy: numpy python module 00194 @type numpy module 00195 """ 00196 try: 00197 buff.write(_struct_B.pack(self.success.data)) 00198 except struct.error as se: self._check_types(se) 00199 except TypeError as te: self._check_types(te) 00200 00201 def deserialize_numpy(self, str, numpy): 00202 """ 00203 unpack serialized message in str into this message instance using numpy for array types 00204 @param str: byte array of serialized message 00205 @type str: str 00206 @param numpy: numpy python module 00207 @type numpy: module 00208 """ 00209 try: 00210 if self.success is None: 00211 self.success = std_msgs.msg.Bool() 00212 end = 0 00213 start = end 00214 end += 1 00215 (self.success.data,) = _struct_B.unpack(str[start:end]) 00216 self.success.data = bool(self.success.data) 00217 return self 00218 except struct.error as e: 00219 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00220 00221 _struct_I = roslib.message.struct_I 00222 _struct_B = struct.Struct("<B") 00223 class SetFloat(roslib.message.ServiceDefinition): 00224 _type = 'cob_trajectory_controller/SetFloat' 00225 _md5sum = 'c61d00936862523d63db9428e15b5b6e' 00226 _request_class = SetFloatRequest 00227 _response_class = SetFloatResponse