New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MATLAB R2019b is not detected by Webots on Windows 10 #1336
Comments
Maybe link with #681 |
Thank you @DavidMansolino for your response. Could you at least try it using a trial version? Thanks |
We are currently in discussion with the Mathworks on this topic. We will keep you informed here. |
Thanks Oliver. |
This question is different from #681
error launcher (line 126) Reason: I thought It's probably the problem with loadlibrary |
We fixed many issues with Matlab in #1378, we have successfully tested it with the latest version of Matlab (R2019b update 4). |
Hello @DavidMansolino Environment variables is configured correctly I also verified that MinGW-w64 Compiler is installed and working I even made a new world to test it based on first tutorials: Edit: Invalid function name '2020_c7fd26b7264e6de1de1cde03a7784967f9f8d7cf'. I couldn't find where this function is created, but I believe it is a naming error as it started with number, not character. So I believe the launcher stucks at loading libraries. Edit: However, MATLAB returned that this is an unrecognized function. I don't know the mechanism for naming this function. I guess it is from matlab and webots version but have no idea how it is turned into a function so MATLAB could recognize it |
I checked this and I can run the nightly build (6/3/2020) of Webots R2020a-rev2 together with MATLAB R2019b without any problem. The only difference I have with your setup is that my path only include |
I will walk you through what I did so maybe a hidden bug is there in the release.
I think the problem is in the protofile name as I don't think backslash is allowed I don'y know how it runs on your machine. For some reason, MATLAB splits the name after month and that's why it shows that this function is unknown. |
Maybe you not set Environment variables :WEBOTS_CONTROLLER_NAME? |
This patch, to be included in the next nightly build, should fix the protofile issue. But normally, this code shouldn't be executed if you define properly |
I tested with MATLAB R2017b and for some reason, it doesn't work. MATLAB R2017b hangs at start-up. However, MATLAB R2019b works nicely. |
I tried nao_matlab example by setting MATLAB as external controller. All variables were set as in document . The launcher script is still broken until it is fixed. When I tried to run the MATLAB controller from MATLAB, it reported that libraries are not found. Is there any additional setting I should make? Libraries are not found as I believe launcher is supposed to load it in temp directory (or perhaps not) It would be great if there is a video setting for MATLAB as it might br a missing configuration that was skipped in documentation. |
Hi @omichel |
Even in external mode, the protofile is still broken and maybe that's why the controller script is unable to load controller library files |
I don't think that the folder naming change to Ployspace is a problem. |
By the way, you should probably set the environment variables from MATLAB as shown here. |
Thanks @omichel The library path needed to be added (MATLAB detected it). However, after I run it, I got the
|
Was the version written correctly or should add nightly build? |
The version is correct (it should not include nightly build). |
Does |
|
I don't think the header file is needed. |
Thanks @omichel |
I tested only MATLAB 2017b and 2019b and it turns out that 2017b doesn't work for me while 2019b works well. I didn't test other versions. |
Thanks @omichel |
Sorry, but we do not plan to fix it. I would recommend you to upgrade to a more recent version of MATLAB. |
OK. Thanks |
Hi, |
So disappointed, I installed matlab '9.7.0.119022 (r2019b)' . But MATLAB R2019b is not detected by Webots on Windows 10 too. There was an error, just like wbadry's. WARNING: To run Matlab controllers, you need to install Matlab 64-bit and ensure it is available from the DOS CMD.EXE console. webots :2020b nightly build 13/3/2020 SYSTEM: PATH: D:\Program Files\Polyspace\R2019b\bin; WEBOTS_HOME=D:\Program Files\Webots mex -setup How can I do? Thanks |
only set e-puck controller= extern |
@sxbug This is fantastic work! Actually, in an easier way, you can run launcher directly from MATLAB. The issue is I was trying to run the nao_matlab script directly from MATLAB which fails. Using launcher as mentioned is a great solution. Still to be noted that Webots can not directly run MATLAB scripts like python and C files. To make this thread useful. Let's summarize how to run MATLAB scripted Webots on Windows. Example folder:
3.1 path settings 3.2 variables settings
If MATLAB doesn't recognize launcher, you may need to add
You should see a message showing the protofile script generated. And NAO robot should start walking while MATLAB plots feet pressure, accelerometer, camera feedback, and edge detection |
Thanks, @omichel for being patient with me. Hopefully, we can identify the issue and solve it somehow in the next releases. I would be happy to participate if needed. Thanks to you and @DavidMansolino for being active and responsive to all issues even though it is free. |
If 'mex - setup' checked is OK , it doesn't matter if the warning msg 'mingw-w64 C / C + + compiler addon is not installed' is displayed during simulation. Matlab Simulation is available. |
@wbadry: thank you for this detailed report. Can you now launch the MATLAB examples from Webots? To do so, you should remove the following environment variables: |
Unfortunately, it is still not working. |
@wbadry Matlab 2019 can't be started directly from webots, or it can only be started in extra mode and from CMD (input : matlab .... -r launcher). But now I can start matlab 2017b directly, just comment out lines 28-32 in launcher. m. |
It's very convenient to use, but there is still a library that hasn't been loaded successfully. What's the problem? [matlab] (dynamic library) |
I can not upload any PICs |
You can ignore this e-puck_bluetooth library. It is used only for remote-control of an e-puck robot. It shows up probably because of a DLL conflict in your PATH. I don't have it on my system. |
The DLL file is in this directory ‘D:/Program Files/Webots/projects/robots/gctronic/e-puck/plugins/remote_controls/e-puck_bluetooth/’. I checked it. That is OK |
Describe the Bug
MATLAB R2019b is not detected by Webots on Windows 10
Steps to Reproduce
run cmd or PowerShell
type matlab, it should open up MATLAB.
Open C:\Program Files\Webots\projects\languages\matlab\worlds\e-puck_matlab.wbt
See error
WARNING: To run Matlab controllers, you need to install Matlab 64-bit and ensure it is available from the DOS CMD.EXE console.
Expected behavior
MATLAB controller script is running normally
System
The text was updated successfully, but these errors were encountered: