Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinv velocity solver sigma output #359

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

craigirobot
Copy link

@craigirobot craigirobot commented Sep 28, 2021

The main purpose of this request is to add member functions to retrieve the singular values from the pseudoinverse velocity solver. These can be used to generate manipulability feedback to the user similar to that already present in the wdls velocity solver.
A function was also added to sort the singular values in descending order in order to retrieve the minimum singular value. Functions were also added for setting/getting the number of iterations and singularity threshold.

ccarigna added 3 commits September 28, 2021 14:36
Add functions to set the input parameters (maxiter, eps) which can be done from the controller.  Also add functions to retrieve the singular values and current value of eps.
The singular value decomposition in SVD_HH does not sort the singular values in descending order.  So a sort function was added to do this based on the same code used in SVD_eigen_HH.  The sorted version of S called Smaxtomin is then used to find the minimum of the six largest singular values and is also what is returned by the get Sigma function used to calculate the manipulability.
This adds a solver test for the new functions in the pseudoinverse velocity solver which include the set/get functions and the singular value sorter and retrieval functions.
Copy link
Collaborator

@MatthijsBurgh MatthijsBurgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly styling changes, afterwards I will review more on the actual code.

orocos_kdl/tests/solvertest.cpp Outdated Show resolved Hide resolved
orocos_kdl/tests/solvertest.cpp Outdated Show resolved Hide resolved
orocos_kdl/tests/solvertest.cpp Outdated Show resolved Hide resolved
orocos_kdl/tests/solvertest.cpp Outdated Show resolved Hide resolved
orocos_kdl/tests/solvertest.cpp Outdated Show resolved Hide resolved
orocos_kdl/src/chainiksolvervel_pinv.cpp Outdated Show resolved Hide resolved
orocos_kdl/src/chainiksolvervel_pinv.cpp Outdated Show resolved Hide resolved
orocos_kdl/src/chainiksolvervel_pinv.cpp Outdated Show resolved Hide resolved
// copied from svd_eigen_HH.cpp
Smaxtomin = S;
SortJntArrayMaxToMin(Smaxtomin);
// Minimum of six largest singular values of J is S(5) if number of joints >=6 and 0 for <6
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this behaviour comming from? As there should be the same number of singular values as the number of joints, correct?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the number of singular values is the same as the number of joints. However, any singular values beyond the sixth which is S(5) will be zero (assuming SVs are ordered from high to low). We are interested in whether the sixth singular value is zero because that is when the determinant of J*J^T is zero and a Cartesian degree of freedom is lost. Then the condition corresponding to fabs(S(i))<eps (line 140) must be applied in order to compute the pseudoinverse.

orocos_kdl/src/chainiksolvervel_pinv.cpp Outdated Show resolved Hide resolved
@craigirobot craigirobot force-pushed the pinv-velocity-solver-sigma-output branch from adbac13 to b9f06c5 Compare October 23, 2024 21:32
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