robotology-playground / WBI-Toolbox

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

LinkFwdKin block unable to read urdf #109

Closed jeljaik closed 8 years ago

jeljaik commented 8 years ago

... as soon as it's placed in the model.

screen shot 2015-11-10 at 4 27 23 pm
jeljaik commented 8 years ago

Problem Description and Solution

this line of code is causing the problem. The filename variable passed to the Matlab command xmlread should be a full path to the urdf model name. It's fixed by setting the environmental variable $CODYCO_SUPERBUILD_DIR which can be done in the startup.m of your Matlab configuration if you launch Matlab clicking on its icon. If instead you prefer to launch Matlab from command line then Matlab will use your system env vars. Same has been done for the blocks:

Commit happening anytime soon ...

jeljaik commented 8 years ago

Two things must be taken into account when using these parametric blocks:

  1. Variables $YARP_ROBOT_NAME and $CODYCO_SUPERBUILD_DIR must be defined in Matlab's workspace if it is not launched from terminal.
  2. Before placing any of these blocks the model must be initialized so that the environmental variables are also loaded in Simulink.
jeljaik commented 8 years ago

Fixed in https://github.com/robotology-playground/WBI-Toolbox/commit/bc6e72f021ba45e866a3204692374f1a7a34a9ff