Struct SVHHomeSettings

Struct Documentation

struct SVHHomeSettings

data sctructure for home positions

Public Functions

inline SVHHomeSettings()

SVHHomeSettings Default constructor initializing empty homeSettings. This is not usefull and should be filled immediately after.

inline SVHHomeSettings(const int &direction, const float &minimum_offset, const float &maximum_offset, const float &idle_position, const float &range_rad, const float &reset_current_factor)

SVHHomeSettingsn Constructor for the home settings, providing each value individually.

Parameters:
  • direction_ – Reset direction +1 oder -1

  • minimumOffset_ – soft stop minimum value

  • maximumOffset_ – soft stop maximum value

  • idlePosition_ – position to go to after reset

  • rangeRad_ – range of moevement in rad

inline SVHHomeSettings(const std::vector<float> &home_settings)

SVHHomeSettings Convenience constructor to easily construct home settings out of a singe vector. Values are evaluated in order and if the vector is to short, values will be filles with zeros.

Parameters:

home_settings – vector of floats containing the values for the home settings. If the vector is to short the remaining values will be filled with zeros. If it is to long only as much elements as there are values in HomeSettings will be evaluated

Public Members

int direction

Movement direction of the finger +1 or -1 home in positive or negative direction.

float minimum_offset

Minimum reachable tick limit, given as offset from the hard stop (soft limit)

float maximum_offset

Maximum reachable tick limit, given as an offset from the hard stop (soft limit)

float idle_position

Idle position to move the fingers to after initialization

Note

This position should be within the min and max offset positions.

float range_rad

The total angle in [rad] that is used by the finger i.e. the anlge between one (soft) stop and the other This value will be used for calculation of the ticks

Note

Currently we use the HARD STOP to HARD STOP angle but map that to a range of ticks from SOFT STOP to SOFT STOP this might be the wrong approach

Note

as we therefore would get an angle of zero event hough the finger might be standing at 5k ticks. However by using this method we can asure the Range of the

Note

input to be of constant size. This night change to better reflect the real rad value

float reset_current_factor

The resetCurrentFactor indicates how much of the maximum allowed current (of the controller) must be present in order to decide that a hard stop was reached.

Note

Values betweeen 0.0 and 1.0 are allowed