-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Unable to run matlab example #681
Comments
This is most probably related to a conflicting library in your |
I had clear windows registry ,and reinstalled matlab, but frozen too. when I clear launcher.m, and try again. after pause, I paste origin launcher.m to matlab window it can run,and some error msg: |
This is indeed a known issue caused by conflicting libraries between Matlab and the e-puck remote-control, however, you can safely ignore these errors they will not prevent you from controlling the robot from Matlab. |
But I can not find a way to ignore these errors, because when I start this simulate ,the matlab is halt and ONLY a black window. What can I do? Thanks |
Have you tried the other Matlab samples which don't have dedicated remote_control plugins, e.g. youbot_matlab? |
I had try youbot_matlab, It's the same. Matlab is still stuck. |
In launcher.m , I had add two lines: Is that a problem? |
Probably not, but it should be easy to remove them for testing. |
INFO: youbot_matlab: Starting controller: "D:\Program Files\MATLAB\R2017b\bin\win64\MATLAB.exe" -nosplash -nodesktop -minimize -r launcher How to solve the Garbled character on the console? I found that the launcher. m file still had a lot of problems. For example: this KUKA youbot, it couldn't find a matlab controller. |
I am still convinced that the problem is because of a conflicting library between matlab and Webots. |
But MATLAB is still stuck.
Thanks |
I had downloaded webots 2019a-rev1 again. Without modifying anything, I tried these samples, I found: kuka-youbot can run, During the running process, the MATLAB window does not display anything. And after stop matlab display : something is wrong. Is there any way to revise it? Thanks |
kuka robot error message: MATLAB crash file:C:\Users\xsun\AppData\Local\Temp\matlab_crash_dump.6548-1:
Configuration: Fault Count: 1 Assertion in void __cdecl `anonymous-namespace'::mwJavaAbort(void) at b:\matlab\src\jmi\jmi\javainit.cpp line 1420: Register State (captured): R8 = 0000db5afa35bbb7 R9 = 00007ffaaa750000 RIP = 000000001085bbaa EFL = 00000202 CS = 0033 FS = 0053 GS = 002b Stack Trace (captured): If this problem is reproducible, please submit a Service Request via: A technical support engineer might contact you with further information. Thank you for your help. |
e-puck error message。 MATLAB crash file:C:\Users\x111sun\AppData\Local\Temp\matlab_crash_dump.13924-1:
Configuration: Fault Count: 1 Assertion in void __cdecl `anonymous-namespace'::mwJavaAbort(void) at b:\matlab\src\jmi\jmi\javainit.cpp line 1420: Register State (captured): R8 = 00000337ce35fc5d R9 = 00007ffaaa750000 RIP = 000000001079bbaa EFL = 00000202 CS = 0033 FS = 0053 GS = 002b Stack Trace (captured): If this problem is reproducible, please submit a Service Request via: A technical support engineer might contact you with further information. Thank you for your help. |
Env: webots 2020a rev2, matlab 2017b,
How can I do? Thanks. |
I have changed /lib/matlab to /lib/controller/matlab
Reason: How can I do? Thanks |
Sorry, we are unable to help you on this until we get a license of MATLAB from the Mathworks. It may happen in the next few weeks. |
At first Thank you very much for your help.
Thanks!!! |
What you did in 1. seems very correct. In 2. there seems to be a typo, it should be |
OK, I will try again. |
I did create a new PR to fix all the path issues you mentioned earlier: https://github.com/cyberbotics/webots/pull/1378/files |
We fixed many issues with Matlab in #1378, we have successfully tested it with the latest version of Matlab (R2019b update 4). |
There is still a problem with webots connecting to Matlab 2017b. I installed them on another computer(GTX 750 Ti). The problem is the same, MATLAB is stuck and black. I also tested your method all and installed nightly build version , but It has no effect. I think it is caused by a library that cannot be called. I hope you install a MATLAN 2017b to test it. Thank you! |
We are fixing an issue with the nightly that was affecting the Matlab interface: #1444 |
Yes, I can reproduce the problem you have with MATLAB 2017b. I have no clue why MATLAB 2017b hangs where MATLAB 2019b works nicely... Unfortunately, fixing support for old versions of MATLAB is not a priority for us. |
I can use matlab 2017b normally. First, the mingw-64 C / C + + compiler must be installed through the addon functions of MATLAB( You must register at first). And then in launcher. m file ,Comment out line28 -32 ,it is : %installed_addons = matlab.addons.installedAddons; So it can be used normally. |
I believe I fixed the problem in #1462. Can you confirm? |
Hi, I experienced the freeze matlab window as well. When I want to try the tutorial 6 (from Webots documentation), I found that the errors occurred. [] Error using calllib In my opinion, the error occurred is due to the 'Parameter cannot be converted to a character vector'. Any expert know the way to solve this error? |
The code provided in the tutorial is actually wrong. Moreover the controller cannot be named TIME_STEP = 64;
ds = [];
ds_names = [ "ds_right", "ds_left" ];
for i = 1:2
ds(i) = wb_robot_get_device(convertStringsToChars(ds_names(i)));
wb_distance_sensor_enable(ds(i), TIME_STEP);
end
wheels = [];
wheels_names = [ "wheel1", "wheel2", "wheel3", "wheel4" ];
for i = 1:4
wheels(i) = wb_robot_get_device(convertStringsToChars(wheels_names(i)));
wb_motor_set_position(wheels(i), inf);
wb_motor_set_velocity(wheels(i), 0.0);
end
avoid_obstacle_counter = 0;
while wb_robot_step(TIME_STEP) ~= -1
left_speed = 1.0;
right_speed = 1.0;
if avoid_obstacle_counter > 0
avoid_obstacle_counter = avoid_obstacle_counter - 1;
left_speed = 1.0;
right_speed = -1.0;
else % read sensors
for i = 1:2
if wb_distance_sensor_get_value(ds(i)) < 950.0
avoid_obstacle_counter = 100;
end
end
end
wb_motor_set_velocity(wheels(1), left_speed);
wb_motor_set_velocity(wheels(2), right_speed);
wb_motor_set_velocity(wheels(3), left_speed);
wb_motor_set_velocity(wheels(4), right_speed);
% if your code plots some graphics, it needs to flushed like this:
drawnow;
end Please let me know if that works for you. |
Thank you, @omichel Now, I know the way to run the MATLAB in form of extern. However, it is possible to run it like the C programming in Webots? (without changing the PATH in Environment Variable. ) |
It is indeed possible to run MATLAB controllers like C controllers. For example I can run the |
No error come out, but the environment didnt start even I clicked the Play button. There is also no command display when Play button clicked. I wonder whether my setting have some issue or not.... That is the reason I use extern to run MATLAB code every time... |
Sometimes, you need to wait a little bit until MATLAB starts. Does it start or not at all? And there is nothing printed in the Webots console? |
nothing happen, nothing in the console as well. The MATLAB didnt open as well. Do I need to change the PATH or anything? |
Describe the Bug
env:Win10,webots 2019b and MATLAB 2017b.
Using webots to open its own matlab example, click to run it , the MATLAB window is blocked, there is frozen, can only be closed by windows' TaskManager . I have set WEBOTS_HOME, WEBOTS_CONTROLLER_NAME and WEBOTS_VERSION parameters .
Later, I came up with a solution: empty the content of launcher. m, then run this example. After pop up the MATLAB window stop by error, I copy the content of launcher. m into the matlab window and run it again. This Webots example can run now, but there are still errors, as if there is some libraries not loaded.
Steps to Reproduce
Expected behavior
Should be the normal operation of the program
Screenshots
If applicable, add screenshots to help explain your problem.
System
The text was updated successfully, but these errors were encountered: