robotology-playground / WBI-Toolbox

Simulink Toolbox for rapid prototyping of Whole Body Robot Controllers
2 stars 2 forks source link

Mass matrix seems to be ill-conditioned #47

Closed DanielePucci closed 9 years ago

DanielePucci commented 9 years ago

It seems to me that the mass matrix associated with

codyco-superbuild/build/install/share/codyco/robots/icubGazeboSim/model.urdf

is not invertible. screenshot from 2014-12-29 23 34 38 screenshot from 2014-12-29 23 35 09

Just to try, I changed all zero-mass links into one-kg mass links, but nothing changed. @traversaro @jeljaik

traversaro commented 9 years ago

Which determinant you get?

On Dec 29, 2014 11:40 PM, "Daniele" notifications@github.com wrote:

It seems to me that the mass matrix associated with

codyco-superbuild/build/install/share/codyco/robots/icubGazeboSim/model.urdf

is not invertible.

Just to try, I changed all zero-mass links into one-kg mass links, but nothing changed. @traversaro @jeljaik

— Reply to this email directly or view it on GitHub.

DanielePucci commented 9 years ago

As shown in the figure I attached, I get something really small, i.e. 3.2e-26. Just for further information and because of the distrust I have for MATLAB algorithms for computing the determinant, the minimum value of the svd is 0.006

traversaro commented 9 years ago

CAN you print the complete vector of the singular values? On Dec 29, 2014 11:57 PM, "Daniele" notifications@github.com wrote:

As shown in the figure I attached, I get something really small, i.e. 3.2e-26. Just for further information and because of the distrust I have for MATLAB algorithms for computing the determinant, the minimum value of the svd is 0.006

— Reply to this email directly or view it on GitHub https://github.com/robotology-playground/WBI-Toolbox/issues/47#issuecomment-68312893 .

DanielePucci commented 9 years ago

Here it is. Eigenvalues are all positive. screenshot from 2014-12-30 00 11 18

@jeljaik The mass matrix block takes as input a 41 element vector, where the first 16 elements represent the rotation and translation of the base frame. In the previous version of the toolbox, when these first 16 elements were zero, the pose of the base was evaluated with some macumba depending on the icub_fixed flag. I'm assuming that this macumba behavior is still the same, but it doesn't seem so by looking at the C++ code. May you help me clarify this?

traversaro commented 9 years ago

The eigenvalues seems reasonable to me... why are you reporting that the matrix is singular?

DanielePucci commented 9 years ago

Both the determinant (3.2e-26) and the eigenvalues (17 out 25 are of the order of 0.01) looked fishy to me, and arose some numerical issues during tests I was carrying on. If that's reasonable, we can close this issue.

traversaro commented 9 years ago

Mh... several aspects have a role here.

DanielePucci commented 9 years ago

I completely agree with what you pointed out, but the main point you made was the last one: I don't actually remember and in order to avoid this in the future, I decided to write it on an official issue.

traversaro commented 9 years ago

It dies not seem not invertible to me.. Which kind of result would you expect? On Dec 30, 2014 12:16 AM, "Daniele" notifications@github.com wrote:

Here it is. Eigenvalues are all positive. [image: screenshot from 2014-12-30 00 11 18] https://cloud.githubusercontent.com/assets/5045846/5574159/70d32a36-8fb8-11e4-8794-03ddaa21bd08.png

@jeljaik https://github.com/jeljaik The mass matrix block takes as input a 41 element vector, where the first 16 elements represent the rotation and translation of the base frame. In the previous version of the toolbox, when these first 16 elements were zero, then the pose of the base was evaluated with some macumba depending on the icub_fixed flag. I'm assuming that this macumba behavior is still the same, but it doesn't seem so by looking at the C++ code. May you help me clarify this?

— Reply to this email directly or view it on GitHub https://github.com/robotology-playground/WBI-Toolbox/issues/47#issuecomment-68314321 .

DanielePucci commented 9 years ago

Since I have no ground truth, I don't expect anything so far.

traversaro commented 9 years ago

Sorry, It was a reply that I send yesterday that arrived only today.