Add options 'deadzone' for endpoints and 'max_calib_koef' for motor#761
Open
konelav wants to merge 3 commits intoodriverobotics:masterfrom
Open
Add options 'deadzone' for endpoints and 'max_calib_koef' for motor#761konelav wants to merge 3 commits intoodriverobotics:masterfrom
konelav wants to merge 3 commits intoodriverobotics:masterfrom
Conversation
…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.
Member
|
Note that this repo is for ODrive v3.x and we're no longer actively working on it. We may be able to take small changes if they provide strong value and are thoroughly tested by the contributor. With that in mind:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.