Search code examples
matlabwebots

problem using MATLAB(R2019b) controller in Webots R2020a revision 1


OS: both of Windows 10, Ubuntu (64bit)

MATLAB: R2019a, R2019b

Webots: R2020a revision 1

World file: webots/projects/languages/matlab/worlds/e-puck_matlab.wbt

Problem: Can not run MATLAB example

[matlab] Could not find file allincludes.h.
[matlab] Error in loadlibrary
[matlab] Error in launcher (line 74)
[matlab]       loadlibrary( ...

Both OS show the same message "loadlibrary". How can I fix it?


Solution

  • I had the same problem in Ubuntu 18.04.3. Webots 2020a-rev1 was installed with .deb file.

    For me, WEBOTS_HOME = '/usr/local/webots/'

    The problem is that all paths (in include files ...) are defined with matlab for webots directly in WEBOTS_HOME/lib. And in 2020a it seems that there is a new directory which is WEBOTS_HOME/lib/controller. So all paths are wrong.

    The solution is this one:

    cd /usr/local/webots/lib

    sudo cp -r controller/matlab/ .

    Hope this helps.

    Goupil