Closed traversaro closed 8 years ago
I fear that
Robot name icubGazeboSim and World Reference Frame set about l_sole
means that the position of the floating base pose is obtained through forward kinematics on the left foot, instead of integrating what comes from the floating base dynamics. In this case, the foot is stuck on the ground, and the dynamics should incorporate also the external wrench acting on the foot for passing the tests. But, I am just speculating. @naveenoid what do you think about it?
It seems that there are two different files forwardDynamicsConsistencyTest.m
in the repo...
https://github.com/robotology/mex-wholebodymodel/blob/master/matlab-src/forwardDynamicsConsistencyTest.m seems the most update one, while https://github.com/robotology/mex-wholebodymodel/blob/master/matlab-src/tests/forwardDynamicsConsistencyTest.m seems to be just an outdated version.. @gabrielenava @naveenoid Am I right?
I will close this issue. It will be directly addressed in the cleanup referenced in the issue above.
The test is still not working. I was able to get it to work for a simple two links floating base model, but it is still failing for full iCub model.
testing in a bit. This is with 0 input torques?
On Thu, Oct 22, 2015 at 5:31 PM, Silvio Traversaro <notifications@github.com
wrote:
Reopened #30 https://github.com/robotology/mex-wholebodymodel/issues/30.
— Reply to this email directly or view it on GitHub https://github.com/robotology/mex-wholebodymodel/issues/30#event-442783741 .
Yes, cleanup test in https://github.com/robotology/mex-wholebodymodel/tree/fixKineticEnergyConservationTest .
To run together with the rest of the test, run ctest -VV
.
To run standalone (for debug) run the test/kinEnergyConservationTestAllModels script.
I am experiencing strange matlab crashes, so I guess there is something going on the C++ part.
7 hours later I solved the crash above mentioned. : D (see https://github.com/robotology/mex-wholebodymodel/issues/46), so I can concentrate on the real issue.
Apparently the test is still not passing:
The base translational acceleration in particular is quite fishy, because it should be 0 , but it is not zero, I will investigate in this direction. In particular a quite nice test (in a sense standalone and indipendent from this) is to check the M\g is equal to a n_J+6 vector, in which the first 3 elements are the elements of opposite of the gravity acceleration.
I finally found the bug, it was due to a rotation matrix not inversed, you can find more info in the relative commit: https://github.com/robotology/mex-wholebodymodel/commit/0223cbc1d9b783ef1d5d6a4d1811717cc4583952 . To avoid problems like this, I also changed the notation in https://github.com/robotology/mex-wholebodymodel/commit/7a0c36257ec457f998f8bca2c3eddab989b03bb1 .
Again, this bug was fixed in other version of the forwardDynamics
function copy and pasted around the repo, so this bug was actually caused by https://github.com/robotology/mex-wholebodymodel/issues/42 , let's try to avoid this kind of patters in the future @gabrielenava @naveenoid .
:+1: :+1:
To be sure everything was working I run the simulation for ~150 seconds, and I got this results (icubGazeboSim
is the usual model with 25 dofs, while icub.urdf
is a locally loaded model with 32dofs):
There is a very small drift in the twoLinks case, but I guess it is due to the integration process, not due to some bug in the dynamics equations.
Ah, there was also a quaternion to rotation conversion performed with the minus
formula, so I guess that also that was contributing to the issue.
Great. Closing?
When the necessary changes will be merged in master.
Ack.
Sorry back on track after a day with no internet. This is a result of a mixup of older versions of the forwardDynamics. I think always this bug is traced down to quaternion ordering and frame in which angular velocity is being expressed for quaternion derivative. Good job anyhow.
On Fri, Oct 23, 2015 at 4:38 PM, Daniele notifications@github.com wrote:
Ack.
— Reply to this email directly or view it on GitHub https://github.com/robotology/mex-wholebodymodel/issues/30#issuecomment-150593294 .
I think this can be safely closed now, no?
Yes.
I wanted to consolidate the tests such that they could be executed in a systematic way, but I tried to run the
forwardDynamicsConsistencyTest
and I get this output: