Skip to content

Conversation

@konelav
Copy link

@konelav konelav commented Dec 20, 2025

The option 'deadzone' consists of three new attributes of ODrive.Endpoint: deadzone_min, deadzone_max, deadzone_value.
It is useful when PWM/ADC signal is used for e.g. set velocity, and can't be set precisely to get motor stopped (usually exactly middle of full range). In this case, one can add attribute values for corresponding endpoint as deadzone_min=0.4, deadzone_max=0.6, deadzone_value=0.0, so when input signal (fraction) is between 0.4 and 0.6, then output to endpoint will be exactly zero.

The option 'max_dc_calib_koef' make configurable (now hardcoded) value 0.1f -- a threshold for current measurements to be accounted as correct. It can be useful in rare cases of bad quality and/or compatibility of hardware parts, in which cases slight extending of threshold can be helpful. Or, maybe one might want to decrease threshold to have more failure-awared configuration.

…ble via motor.config.max_dc_calib_koef (default value 0.1f)
New attributes for ODrive.Endpoint: deadzone_min, deadzone_max, deadzone_value.
Wors for `fractions' from 0.0 to 1.0 as follows:
  - when deadzone_min >= deadzone_max (default), result is linear interpolation between (0.0, min) and (1.0, max) (old behaviour);
  - when fraction < deadzone_min, result is linear interpolation between (0.0, min) and (deadzone_min, deadzone_value);
  - when fraction > deadzone_max, result is linear interpolation between (deadzone_max, deadzone_value) and (1.0, max);
  - otherwise, result is deadzone_value.
@CLAassistant
Copy link

CLAassistant commented Dec 20, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants