Closed jeljaik closed 8 years ago
Functionality exists but obvious bug. Further testing needed.
In the new branch of yarpWholeBodyModel
this problem might disappear if the 'destructor' or 'terminate' of your mex is called before initializing the interface.
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.
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.
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) towholeBodyModel('model-initialize', 'icubGazeboSim')
what you get is the default error message for unexisting component.