Update Denavit-Hartenberg parameters of left and right iCubArm v2.x #789
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.
Copying it from #758 since I accidentally closed that one.
The aim of this PR is to align the Denavit-Hartenberg parameters of left and right iCubArm v2.x with the values found in the CAD models.
Motivation
While comparing the iKin forward kinematics with the iDynTree one extracted from the .urdf model, a significant misalignment was found in the left and right arm's end effector's position.
The comparison was made with a task-specific application I developed, which instantiates an arm with iKin and iDynTree (which loads the .urdf file), and given a specific joints configuration, it prints out the forward kinematics transformation matrix. See the example below for the left arm.
The difference of the translational component is:
The misalignment was validated in MATLAB with Peter Corke's Robot toolbox
![123049020-5b7d6d80-d3ff-11eb-8431-52aaa7fa4196](https://user-images.githubusercontent.com/38140169/125923531-dcc9dc7b-af78-4023-8bd9-51b274828b4b.png)
and with other joints configurations:
Equivalent results were found for the right arm v2.x.
Contribution
The PR's contribution changes the kinematic parameters of iCubArm v2.x left and right, specifically:
If-else conditions are added to keep the parameters of v1.x and v3.0 unaltered.
Result
The contribution was validated with the red ball test:
demoredball_crop.mp4