Scalars or lists for motor constants, gear ratios and max currents #21
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.
Description
Right now, motor constants, gear ratios and max currents are scalars in the yaml configuration file for ODRI control interface. For instance, for Solo-12 it could be:
Internally, these quantities are already handled as vectors, the scalar value simply fills the whole vector.
With this PR, the motor constants, gear ratios and max currents can be specified per motor, which makes possible the use of robots with more complex designs, like having a different gear ratio for the knee joints compared the HAA and HFE.
You could have for instance:
The detection of the data type is automatic, so the behavior remains the same for people that do not use this new feature.
How I Tested
I compiled the code and launched it several times on our Solo-12 with debug outputs in the code to check that the data in the configuration file was properly detected and loaded.
I fulfilled the following requirements
For the
.clang-format
file, I am not sure which one is used for the style of this repository. I tried to keep the same style than the existing code.