00001 """autogenerated by genpy from sr_robot_msgs/SetEffortControllerGainsRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class SetEffortControllerGainsRequest(genpy.Message):
00009 _md5sum = "96397d148b84b1d0a8fe84ee1744fece"
00010 _type = "sr_robot_msgs/SetEffortControllerGainsRequest"
00011 _has_header = False
00012 _full_text = """float64 max_force
00013 int32 friction_deadband
00014
00015 """
00016 __slots__ = ['max_force','friction_deadband']
00017 _slot_types = ['float64','int32']
00018
00019 def __init__(self, *args, **kwds):
00020 """
00021 Constructor. Any message fields that are implicitly/explicitly
00022 set to None will be assigned a default value. The recommend
00023 use is keyword arguments as this is more robust to future message
00024 changes. You cannot mix in-order arguments and keyword arguments.
00025
00026 The available fields are:
00027 max_force,friction_deadband
00028
00029 :param args: complete set of field values, in .msg order
00030 :param kwds: use keyword arguments corresponding to message field names
00031 to set specific fields.
00032 """
00033 if args or kwds:
00034 super(SetEffortControllerGainsRequest, self).__init__(*args, **kwds)
00035
00036 if self.max_force is None:
00037 self.max_force = 0.
00038 if self.friction_deadband is None:
00039 self.friction_deadband = 0
00040 else:
00041 self.max_force = 0.
00042 self.friction_deadband = 0
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 _x = self
00057 buff.write(_struct_di.pack(_x.max_force, _x.friction_deadband))
00058 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00059 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00060
00061 def deserialize(self, str):
00062 """
00063 unpack serialized message in str into this message instance
00064 :param str: byte array of serialized message, ``str``
00065 """
00066 try:
00067 end = 0
00068 _x = self
00069 start = end
00070 end += 12
00071 (_x.max_force, _x.friction_deadband,) = _struct_di.unpack(str[start:end])
00072 return self
00073 except struct.error as e:
00074 raise genpy.DeserializationError(e)
00075
00076
00077 def serialize_numpy(self, buff, numpy):
00078 """
00079 serialize message with numpy array types into buffer
00080 :param buff: buffer, ``StringIO``
00081 :param numpy: numpy python module
00082 """
00083 try:
00084 _x = self
00085 buff.write(_struct_di.pack(_x.max_force, _x.friction_deadband))
00086 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00087 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00088
00089 def deserialize_numpy(self, str, numpy):
00090 """
00091 unpack serialized message in str into this message instance using numpy for array types
00092 :param str: byte array of serialized message, ``str``
00093 :param numpy: numpy python module
00094 """
00095 try:
00096 end = 0
00097 _x = self
00098 start = end
00099 end += 12
00100 (_x.max_force, _x.friction_deadband,) = _struct_di.unpack(str[start:end])
00101 return self
00102 except struct.error as e:
00103 raise genpy.DeserializationError(e)
00104
00105 _struct_I = genpy.struct_I
00106 _struct_di = struct.Struct("<di")
00107 """autogenerated by genpy from sr_robot_msgs/SetEffortControllerGainsResponse.msg. Do not edit."""
00108 import sys
00109 python3 = True if sys.hexversion > 0x03000000 else False
00110 import genpy
00111 import struct
00112
00113
00114 class SetEffortControllerGainsResponse(genpy.Message):
00115 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00116 _type = "sr_robot_msgs/SetEffortControllerGainsResponse"
00117 _has_header = False
00118 _full_text = """
00119
00120 """
00121 __slots__ = []
00122 _slot_types = []
00123
00124 def __init__(self, *args, **kwds):
00125 """
00126 Constructor. Any message fields that are implicitly/explicitly
00127 set to None will be assigned a default value. The recommend
00128 use is keyword arguments as this is more robust to future message
00129 changes. You cannot mix in-order arguments and keyword arguments.
00130
00131 The available fields are:
00132
00133
00134 :param args: complete set of field values, in .msg order
00135 :param kwds: use keyword arguments corresponding to message field names
00136 to set specific fields.
00137 """
00138 if args or kwds:
00139 super(SetEffortControllerGainsResponse, self).__init__(*args, **kwds)
00140
00141 def _get_types(self):
00142 """
00143 internal API method
00144 """
00145 return self._slot_types
00146
00147 def serialize(self, buff):
00148 """
00149 serialize message into buffer
00150 :param buff: buffer, ``StringIO``
00151 """
00152 try:
00153 pass
00154 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00155 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00156
00157 def deserialize(self, str):
00158 """
00159 unpack serialized message in str into this message instance
00160 :param str: byte array of serialized message, ``str``
00161 """
00162 try:
00163 end = 0
00164 return self
00165 except struct.error as e:
00166 raise genpy.DeserializationError(e)
00167
00168
00169 def serialize_numpy(self, buff, numpy):
00170 """
00171 serialize message with numpy array types into buffer
00172 :param buff: buffer, ``StringIO``
00173 :param numpy: numpy python module
00174 """
00175 try:
00176 pass
00177 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00178 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00179
00180 def deserialize_numpy(self, str, numpy):
00181 """
00182 unpack serialized message in str into this message instance using numpy for array types
00183 :param str: byte array of serialized message, ``str``
00184 :param numpy: numpy python module
00185 """
00186 try:
00187 end = 0
00188 return self
00189 except struct.error as e:
00190 raise genpy.DeserializationError(e)
00191
00192 _struct_I = genpy.struct_I
00193 class SetEffortControllerGains(object):
00194 _type = 'sr_robot_msgs/SetEffortControllerGains'
00195 _md5sum = '96397d148b84b1d0a8fe84ee1744fece'
00196 _request_class = SetEffortControllerGainsRequest
00197 _response_class = SetEffortControllerGainsResponse