Open nunoguedelha opened 3 years ago
It doesn't seem to be related to whole-body-controllers repo.
@DanielePucci experienced the same problem following the one-line installation, for him the error was:
Warning: Unsupported robot model. Supported models are listed below:
- iCubGazeboV2_5 [2 similar]
kinDynListDimensions =
15×1 cell array
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
Error evaluating 'InitFcn' callback of SubSystem block (mask) 'torqueControlBalancingWithSimu/Robot Simulator/RobotDynWithContacts'.
Callback string is '%% initialize the simulation
mwbs.RobotDynamicsWithContacts.initRobotDynamicsWithContactsCB;'
Caused by:
Invalid MEX-file '/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64': dlopen(/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64, 6): Library not loaded: @rpath/libpng16.16.dylib
Referenced from: /Users/danielepucci/src/matlab/robotology-matlab/lib/libYARP_sig.3.4.5.dylib
Reason: Incompatible library version: libYARP_sig.3.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 52.0.0
Component:Simulink | Category:Model error
Error evaluating 'InitFcn' callback of mwbs.Visualizers.robotVisualizer.RobotVisualizer block (mask) 'torqueControlBalancingWithSimu/Robot Visualizer/RobotVisualizer'.
Callback string is 'mwbs.Visualizers.robotVisualizer.initRobotVisualizer'
Caused by:
Invalid MEX-file '/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64': dlopen(/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64, 6): Library not loaded: @rpath/libpng16.16.dylib
Referenced from: /Users/danielepucci/src/matlab/robotology-matlab/lib/libYARP_sig.3.4.5.dylib
Reason: Incompatible library version: libYARP_sig.3.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 52.0.0
Component:Simulink | Category:Model error
@DanielePucci I did not remember that @nunoguedelha had found a workaround, if you like you can test it.
I tried the workaround, and what follows is what I did
floatingBaseBalancingTorqueControlWithSimulator
and the output was
Unable to resolve the name floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu.
robotology_setup
and there was no outputfloatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu
that now worked and opened the modeltorqueControlBalancingWithSimu
Simulation 1 2 2
10:58 AM Elapsed: 7 sec
Warning: Unsupported robot model. Supported models are listed below:
- iCubGazeboV2_5 [2 similar]
kinDynListDimensions =
15×1 cell array
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
{1×2 double}
Error evaluating 'InitFcn' callback of SubSystem block (mask) 'torqueControlBalancingWithSimu/Robot Simulator/RobotDynWithContacts'.
Callback string is '%% initialize the simulation
mwbs.RobotDynamicsWithContacts.initRobotDynamicsWithContactsCB;'
Caused by:
Invalid MEX-file '/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64': dlopen(/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64, 6): Library not loaded: @rpath/libpng16.16.dylib
Referenced from: /Users/danielepucci/src/matlab/robotology-matlab/lib/libYARP_sig.3.4.5.dylib
Reason: Incompatible library version: libYARP_sig.3.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 52.0.0
Component:Simulink | Category:Model error
Error evaluating 'InitFcn' callback of mwbs.Visualizers.robotVisualizer.RobotVisualizer block (mask) 'torqueControlBalancingWithSimu/Robot Visualizer/RobotVisualizer'.
Callback string is 'mwbs.Visualizers.robotVisualizer.initRobotVisualizer'
Caused by:
Invalid MEX-file '/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64': dlopen(/Users/danielepucci/src/matlab/robotology-matlab/mex/yarpMEX.mexmaci64, 6): Library not loaded: @rpath/libpng16.16.dylib
Referenced from: /Users/danielepucci/src/matlab/robotology-matlab/lib/libYARP_sig.3.4.5.dylib
Reason: Incompatible library version: libYARP_sig.3.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 52.0.0
Component:Simulink | Category:Model error
>> clear all
>> path(pathdef)
6.3 Then I opened the model again re-launching floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu
but I got the output
Unable to resolve the name floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu.
6.4 So, I launched again robotology_setup
and then floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu
. No it worked
The fact that clear all
makes the problem goes aways may indicate that there is some shared library that was loaded by MATLAB and that is unloaded when your run clear all
.
Things that it would be nice to check (eventually remainder for myself):
clear mex
inmem('-completenames')
in the situation after the compilation of the model failed, and after the compilation of the model was successfulHi @DanielePucci , thanks again for your feedback. Thanks @traversaro for the great support. I'm answering here to some of Dani's observations during his tests..
- I launched the command
floatingBaseBalancingTorqueControlWithSimulator
and the output wasUnable to resolve the name floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu.
Most probably, you already know by now why this wasn't working, but just to be sure, I try to explain here:
If I understood correctly, this is a new MATLAB session, so the MATLAB Path has been reset to the default value and unless you saved the MATLAB path to a pathdef.m
file, the default value does not contain the paths:
<robotology_install_prefix>/mex
<robotology_install_prefix>/mex/+wbc/simulink
<robotology_install_prefix>/mex/+wbc/examples
<robotology_install_prefix>/share/WBToolbox
<robotology_install_prefix>/share/WBToolbox/images
where <robotology_install_prefix>/mex/+wbc/examples
would be the path containing the model to test. That's why MATLAB couldn't resolve the model name.
6.3 Then I opened the model again re-launching
floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu
but I got the outputUnable to resolve the name floatingBaseBalancingTorqueControlWithSimulator.torqueControlBalancingWithSimu.
This is due to similar reasons. At startup, or when you run path(pathdef)
, the MATLAB path is initialized from a pathdef.m
if it exists, and the environment variable MATLABPATH
. This variable is not set in script robotology_setup
as we add the paths directly through the addpath
command. For that reason you have to run robotology_setup
again after running path(pathdef)
.
Note: When following the Binary Installation from the Conda Robotology Channel or the Source Installation, the environment variable MATLABPATH
is set then applied at MATLAB startup.
Probably, if we have to send this demo to someone, it would be better to fix a simulation time and show the percentage of the demo.
good point, will do it ASAP.
Short description
The Simulink whole-body-controllers models compilation is failing after installing the robotology-superbuild based on conda-forge:
Platform environment
Hardware: MacBook Pro OS: MacOS Catalina 10.15.7 robotolgy-superbuild: commit 8c45dd3aea5a4f1f79c043111cf84ee140e0ebb7, source installation + dependencies installed with conda-forge (https://github.com/robotology/robotology-superbuild/blob/master/doc/conda-forge.md#source-installation) MATLAB/Simulink: R2020b/10.2 Simulink model: floating-base-balancing-torque-control
Procedure to reproduce the issue
Procedure to reproduce the issue running the example model floating-base-balancing-torque-control:
~/Documents/MATLAB
.[getenv('ROBOTOLOGY_SUPERBUILD_SOURCE_DIR'),'/src/whole-body-controllers/controllers/floating-base-balancing-torque-control']
.torqueControlBalancing.mdl
Workaround
Before compiling: