-
Notifications
You must be signed in to change notification settings - Fork 408
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
base: master
Are you sure you want to change the base?
Pinv velocity solver sigma output #359
Conversation
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.
There was a problem hiding this 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.
// 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
adbac13
to
b9f06c5
Compare
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.