29 #ifndef SVHHOMESETTINGS_H 30 #define SVHHOMESETTINGS_H 62 resetCurrentFactor(0.5)
73 SVHHomeSettings(
const int &direction_,
const float &minimumOffset_,
const float &maximumOffset_,
const float &idlePosition_,
const float &rangeRad_,
const float &resetCurrentFactor_):
74 minimumOffset(minimumOffset_),
75 maximumOffset(maximumOffset_),
76 idlePosition(idlePosition_),
78 resetCurrentFactor(resetCurrentFactor_)
81 direction = direction_ < 0 ? -1 : +1;
83 resetCurrentFactor = std::max(std::min(resetCurrentFactor,1.0
f),0.0
f);
94 size_t size = home_settings.size();
95 float temp_direction = 0.0;
97 temp_direction = (size > 0) ? home_settings[0] : 0.0;
98 direction = temp_direction < 0.0 ? -1 : +1;
100 minimumOffset = (size > 1) ? home_settings[1] : 0.0;
101 maximumOffset = (size > 2) ? home_settings[2] : 0.0;
102 idlePosition = (size > 3) ? home_settings[3] : 0.0;
103 rangeRad = (size > 4) ? home_settings[4] : 0.0;
104 resetCurrentFactor = (size >5) ? home_settings[5] : 0.5;
107 resetCurrentFactor = std::max(std::min(resetCurrentFactor,1.0
f),0.0
f);
120 <<
"Range Rad " << hs.
rangeRad <<
" " 130 #endif // SVHHOMESETTINGS_H
float minimumOffset
Minimum reachable tick limit, given as offset from the hard stop (soft limit)
SVHHomeSettings(const std::vector< float > &home_settings)
SVHHomeSettings Convenience constructor to easily construct home settings out of a singe vector...
int direction
Movement direction of the finger +1 or -1 home in positive or negative direction. ...
float idlePosition
Idle position to move the fingers to after initialization.
float resetCurrentFactor
The resetCurrentFactor indicates how much of the maximum allowed current (of the controller) must be ...
SVHHomeSettings(const int &direction_, const float &minimumOffset_, const float &maximumOffset_, const float &idlePosition_, const float &rangeRad_, const float &resetCurrentFactor_)
SVHHomeSettingsn Constructor for the home settings, providing each value individually.
icl_comm::ArrayBuilder & operator<<(icl_comm::ArrayBuilder &ab, const SVHControlCommand &data)
SVHHomeSettings()
SVHHomeSettings Default constructor initializing empty homeSettings. This is not usefull and should b...
float maximumOffset
Maximum reachable tick limt, given as an offset from the hard stop (soft limit)
data sctructure for home positions