robotology-legacy / mex-wholebodymodel

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

wholeBodyModel does not initialize when switching initialization from icub to icubGazeboSim and viceversa without restarting MATLAB. #9

Closed jeljaik closed 8 years ago

jeljaik commented 9 years ago

To be more clear, suppose you initialize wholeBodyModel as: wholeBodyModel('model-initialise', 'icub') but you're not connected to the robot, then you wanna switch initialization (without restarting Matlab) to wholeBodyModel('model-initialize', 'icubGazeboSim') what you get is the default error message for unexisting component.

naveenoid commented 9 years ago

Functionality exists but obvious bug. Further testing needed.

jeljaik commented 9 years ago

In the new branch of yarpWholeBodyModel this problem might disappear if the 'destructor' or 'terminate' of your mex is called before initializing the interface.

iron76 commented 9 years ago

If you initialise the model with the following call:

wholeBodyModel('model-initialise', 'new_model');

the new_model is used in the computations but apparently the data storage dimensions (number of degrees of freedom) is kept as it was in the first initialisation.

traversaro commented 8 years ago

The bug mentioned in the last issue was solved in https://github.com/robotology/mex-wholebodymodel/commit/9255ca6bc0326ee3fc0cb61e86e46b4487eba6b4 . For loading/unloading different models, we have now a working test validating that this is working (see https://github.com/robotology/mex-wholebodymodel/blob/master/tests/initialiseTest.m ), so I guess we can close the issue.