AMC V1.13 with improved wrist Mk2 direct kinematics solver #469
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.
Build here: robotology/icub-firmware-build#139
I have improved the gradient descent in the direct kinematics solver (motor angles -> yaw, pitch, roll), so that now it never reaches singularity even if brutalised with a cycle of +/- 75 degrees in pitch and roll targets, at high speed, with large overshootings.
Important
The inverse kinematics algebraic solver prevents generating motor targets mechanically unreachable.
Now the solver tries to solve for the new ypr configuration starting from the configuration of the previous control cycle, but if it leads to invalid solution it performs backtracking and reduces the step of the gradient descent. If it still fails, the initial position is resetted to (0,0,0). In this way, the average number of required steps is 4.
It is likely that all the parking procedures (startup and emergency) will result unneccessary after some time of use of the robot, and we'll be able to remove them.