Closed traversaro closed 8 years ago
cc @naveenoid @gabrielenava @Ganimed comments ?
Tests are not actually passing... wait until test to properly pass to merge.
Test infrastructure actually working now. Test fails because apparently the size of the vectors is not reset after an initialization, working on it.
Bug of number of dofs not updated fixed in https://github.com/robotology/mex-wholebodymodel/commit/9255ca6bc0326ee3fc0cb61e86e46b4487eba6b4 , now all the test should be successful.
Im going to merge. I tested and seems ok.
A lot of trailing whitespace have been removed in this PR. To see a diff without whitespace changes (much clearer) check https://github.com/robotology/mex-wholebodymodel/pull/44/files?w= .
Fix https://github.com/robotology/mex-wholebodymodel/issues/32 by adding a setEnvironment call to set the YARP_ROBOT_NAME to the desired value. Not my favourite solution, but see https://github.com/robotology/yarp/issues/593 .
Fix https://github.com/robotology/mex-wholebodymodel/issues/33 by adding a new function (wbm_modelInitialiseFromURDF) that loads the model directly a urdf file. For now passing the list of dofs to consider is not implemented, and all the dofs in the URDF are passed to the interface (in the order in which they appear in the URDF). The only ugly hack is that given the current structure, the constructor of the ModelState object needs to be able to distinguish between the classical initialiser and the URDF one just by the name. The current approach is to analyze if the string passed has the structure of a file. If it seems a file, it is consired a URDF file, otherwise a YARP_ROBOT_NAME .
Added a test for the new wbm_modelInitialiseFromURDF initialiser (initialiseFromURDFTest.m) .
Fix a lot of trailing whitespaces, sorry for the noise.
Fix a lot of code commented out to improve the readability of the repo.
Set the ModelState::fixedLinkComputation flag to false by default: this is necessary because if ModelState::fixedLinkComputation is set to true, it needs a referenceLink to be defined, and it set it (by default) to "l_sole". On model that don't have a "l_sole" link, this can crash the interface.