robotology-playground / WBI-Toolbox

Simulink Toolbox for rapid prototyping of Whole Body Robot Controllers
2 stars 2 forks source link

Error by S-function 'robotState' in Joint Angles: [mdlStart] in robotConfig #4

Closed andreadelprete closed 10 years ago

andreadelprete commented 10 years ago

Hi, when running the simulink model "controllerWithHandControl" located in "torqueBalancing" I get the following error:

Error reported by S-function 'robotState' in 'controllerWithHandControl/Subsystem/Joint Angles/S-Function':
ERROR [mdlStart] in robotConfig.

I'm using Matlab 2013a on Mac OS X 10.9, iCubGazeboSim is running using gazebo3. Any idea what the problem is about?

iron76 commented 10 years ago

Please run matlab on a terminal and send us the output that is printed on the terminal. Francesco


Francesco Nori Robotics Brain Cognitive Science Department Cognitive Humanoids Lab Istituto Italiano di Tecnologia Via Morego, 30 16163 Genova, Italy http://people.liralab.it/iron/ francesco.nori@iit.itmailto:francesco.nori@iit.it

Phone: (+39) 010 71 781 420 Fax: +39 010 71 70 817

On Jun 23, 2014, at 6:39 PM, Andrea Del Prete wrote:

Hi, when running the simulink model "controllerWithHandControl" located in "torqueBalancing" I get the following error:

Error reported by S-function 'robotState' in 'controllerWithHandControl/Subsystem/Joint Angles/S-Function': ERROR [mdlStart] in robotConfig.

I'm using Matlab 2013a on Mac OS X 10.9, iCubGazeboSim is running using gazebo3. Any idea what the problem is about?

— Reply to this email directly or view it on GitHubhttps://github.com/robotology-playground/WBI-Toolbox/issues/4.

andreadelprete commented 10 years ago

After a long skype chat with @jeljaik we managed to solve the problem. It was due to a number of reasons:

After taking care of these issues I managed to execute the controller!

jeljaik commented 10 years ago

Also Andrea did not have an updated version of the WBI Toolbox. Basically in the version he had, he would have had to manually change the path to the URDF file of the robot he wanted to simulate in the corresponding .ini file. This problem however should not appear anymore after a recent update that takes care of finding the corresponding URDF file for the specified robotName, which are additionally. These URDF files are now shipped in ${CODYCO_SUPERBUILD_ROOT}/codyco/WBIToolbox/libraries/wbInterface/conf/wbit. This is however described in the section Using the Simulink Library of the documentation (along with how to set the YARP_DATA_DIRS env. variable). The actual problem here is that there's no README.md for the controllers we know that work. This should be done and I will open the corresponding issue. In such file it should be described that the variables robotName and localName need to be set correctly in the mask of the model along with any other specific instruction on how to run the particular controller with the real platform or the simulator for example. Probably suitable initial gains for each might also be suggested.