robotology-legacy / mex-wholebodymodel

Matlab MEX interface to the iWholeBodyModel interface.
11 stars 9 forks source link

Unused initial g in both test scripts #34

Closed Ganimed closed 8 years ago

Ganimed commented 8 years ago

Hi all,

in both testing scripts "forwardDynamicsConsistencyTest.m" and "integrateForwardDynamics.m" there is an initial gravity vector created for the control torques with,

gInit = wbm_generalisedBiasForces(R_b,p_b,params.qjInit,zeros(25,1),zeros(6,1));

but will never used. For the time-dependent parameter tau it will be used the zeros-function instead of gInit. Is zeros in this case just an initial dummy? I've found this also in the forwardDynamics function at line 54. Internally g will be calculated but afterwards it will never used or returned. Can somebody explain me what was the intention, the thought, to calculate there at these places "g" and "gInit"? Thanks.

traversaro commented 8 years ago

I guess @naveenoid is the author of the script, so he is the right person to reply!

Ganimed commented 8 years ago

Ok, I will do that. Thanks.

traversaro commented 8 years ago

Feel free to update this issue, so everybody can get this info!

Ganimed commented 8 years ago

I will do that when I've got the information.

By the way, in the folder matlab-src there is the folder "worker_functions" where inside are some nice functions for general purposes. In my opinion it is more meaningful if the folder "worker_functions" is renamed into "toolbox". Then everybody understand what is inside.

traversaro commented 8 years ago

"toolbox" is a bit overloaded in matlab context. I would personally prefer something like "utils".

Ganimed commented 8 years ago

I understand. "utils" is also a good option. We will see ...

Ganimed commented 8 years ago

"utilities" or just "tools" is also an option ...

naveenoid commented 8 years ago

Is this still a problem? I thought it was discussed in detail in person? The gInit was used in one of the simulations to set the torque compensating gravity. Im closing this issue for now since we have an overload of others.

Ganimed commented 8 years ago

It was still confusing me, but now I understand. So you used it just temporarily for another simulation. Thanks for the info.

traversaro commented 8 years ago

For the kinematic testing cleanup that I am doing for solving https://github.com/robotology/mex-wholebodymodel/issues/30 , I remove the unused vector gInit.