34 #ifndef SVHCURRENTSETTINGS_H 35 #define SVHCURRENTSETTINGS_H 70 return (wmn == other.
wmn && wmx == other.
wmx && ky == other.
ky && dt == other.
dt &&
71 imn == other.
imn && imx == other.
imx && kp == other.
kp && ki == other.
ki &&
72 umn == other.
umn && umx == other.
umx);
82 size_t size = cur_settings.size();
85 wmn = (size > 0) ? cur_settings[0] : 0.0f;
86 wmx = (size > 1) ? cur_settings[1] : 0.0f;
87 ky = (size > 2) ? cur_settings[2] : 0.0f;
88 dt = (size > 3) ? cur_settings[3] : 0.0f;
89 imn = (size > 4) ? cur_settings[4] : 0.0f;
90 imx = (size > 5) ? cur_settings[5] : 0.0f;
91 kp = (size > 6) ? cur_settings[6] : 0.0f;
92 ki = (size > 7) ? cur_settings[7] : 0.0f;
93 umn = (size > 8) ? cur_settings[8] : 0.0f;
94 umx = (size > 9) ? cur_settings[9] : 0.0f;
157 ab >> data.
wmn >> data.
wmx >> data.
ky >> data.
dt >> data.
imn >> data.
imx >> data.
kp >> data.
ki >>
167 o <<
"wmn " << cs.
wmn <<
" " 168 <<
"wmx " << cs.
wmx <<
" " 169 <<
"ky " << cs.
ky <<
" " 170 <<
"dt " << cs.
dt <<
" " 171 <<
"imn " << cs.
imn <<
" " 172 <<
"imx " << cs.
imx <<
" " 173 <<
"kp " << cs.
kp <<
" " 174 <<
"ki " << cs.
ki <<
" " 175 <<
"umn " << cs.
umn <<
" " 176 <<
"umx " << cs.
umx <<
" " << std::endl;
182 #endif // SVHCURRENTSETTINGS_H float wmn
Reference signal minimum value.
SVHCurrentSettings(const float &wmn, const float &wmx, const float &ky, const float &dt, const float &imn, const float &imx, const float &kp, const float &ki, const float &umn, const float &umx)
SVHCurrentSettings Constructs a new current settings object to configure the current controller of a ...
float umn
Output limiter min.
SVHCurrentSettings(const std::vector< float > &cur_settings)
SVHCurrentSettings Construct current settings from a plain vector if the Vector is smaler than 10 val...
float umx
Output limiter max.
The SVHCurrentSettings save the current controller paramters for a single motor.
SVHCurrentSettings()
SVHCurrentSettings Default constructor, initalizes everything to zero.
float imn
Integral windup minimum value.
driver_svh::ArrayBuilder & operator<<(driver_svh::ArrayBuilder &ab, const SVHControlCommand &data)
bool operator==(const SVHCurrentSettings &other) const
Compares two SVHCurrentSettings objects.
float wmx
Reference signal maximum value.
float ky
measurement scaling
driver_svh::ArrayBuilder & operator>>(driver_svh::ArrayBuilder &ab, SVHControlCommand &data)
overload stream operator to easily deserialize control commands for one channel
float dt
time base of controller
float kp
Proportional gain.
float imx
Integral windup maximum value.