0
$\begingroup$

I create a bipedal robot and I would like to use MATLAB to control two rotational motors. The code for controller is simple but some warning just shows up.

Does anyone know how to solve this?

WARNING: Unable to find the 'matlab' executable in the current PATH. Please check your matlab installation. It should be possible to launch matlab from a terminal by typing 'matlab'. It may be necessary to add the matlab bin directory to your PATH environment variable. More information about the matlab installation is available in Webots' User guide.

I am using Webots R2019a on Windows 11.

Thanks

$\endgroup$
4
  • $\begingroup$ Welcome to Robotics, huiduan. What steps have you taken to resolve the issue? The warning seems pretty clear - It should be possible to launch matlab from a terminal by typing 'matlab'. Can you launch Matlab from a terminal? It may be necessary to add the matlab bin directory to your PATH environment variable. Have you done this step? More information about the matlab installation is available in Webots' User guide. Did you follow those steps? $\endgroup$
    – Chuck
    Nov 29, 2022 at 19:04
  • $\begingroup$ Can you please also specify on which platform you are try to make this work? Is it Linux, Windows or macOS? Which versions of Webots and MATLAB are you using? $\endgroup$ Nov 30, 2022 at 7:51
  • $\begingroup$ Hi Olivier, my laptop platform is Windows 11 and webots version is 2019a. I also notice the 2023a version has been released. I changed the version to 2023a but I cannot import my wbo. file in the new world. $\endgroup$
    – huiduan
    Dec 1, 2022 at 10:49
  • $\begingroup$ WBO files are not supported anymore by Webots since R2022b. You should import PROTO files instead. See this tutorial about the supervisor for more information. $\endgroup$ Dec 8, 2022 at 9:37

1 Answer 1

0
$\begingroup$

Before the R2022b version of Webots, MATLAB was simply started with the command line 'matlab'. For this to be possible, it is necessary that the Webots installation folder is in the PATH.

This way of starting MATLAB has been modified with R2022b, because there was a bug on macOS which uses different PATHs depending on if Webots was started from a terminal or from the graphical interface.

As indicated in the Webots documentation (Using MATLAB) and in the console error message, MATLAB is now started from its executable file. By default, if no version is specified in the preferences (Tools > Preferences > General), Webots looks for the most recent MATLAB version in the default installation folder, depending on the OS:

  • Windows: C:\Program Files\MATLAB\R20XXx\bin\win64\MATLAB.exe
  • Linux: /usr/local/MATLAB/R20XXx/bin/matlab
  • MacOS: /Applications/MATLAB_R20XXx.app

In order to specify a particular version of MATLAB to start, the absolute path to the executable can be specified in the Webots preferences, as shown above.

$\endgroup$
1
  • $\begingroup$ Hi Yannick Goumaz, please read the meta answer robotics.meta.stackexchange.com/a/1485/37 and the question associated with it. You have been flagged as a member of a possible voting ring, and we would like to help avoid that in the future. $\endgroup$
    – Mark Booth
    Dec 12, 2022 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.