-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Enable launching MATLAB desktop from the extern launcher #6366
Conversation
It looks very good to me. Remain to address the documentation. |
- Rename section - Add links to how to use <extern> - Remove suggestions to call keyboard/desktop - Rewrite the section on debugging to fit the new workflow
Add printout for interactive mode
9a44085
to
f601d2c
Compare
@matl-hsk could you please help testing on macOS?
webots-controller --interactive ~/webots/projects/robots/mir/mir100/controllers/keyboard_matlab/keyboard_matlab.m
|
sorry for the delay. I've tested your branch but it does not open Matlab, neither with the interactive option nor without. I can however
|
Can you provide the output from the terminal? Have you tried using |
unfortunately it does not give any hint on the error. I looked at the code but could not find an issue quickly.
|
Note that it takes a while to start Matlab. The launcher is written to wait until the instance closes. After calling the externlauncher, is control ever returned to you, or dou need to Ctrl-C?
What do you get if you run without the interactive flag?
Have you tried providing the matlab path, perhaps it cannot find it?
Mvh
…________________________________
From: matl-hsk ***@***.***>
Sent: Friday, September 8, 2023 8:49:49 AM
To: cyberbotics/webots ***@***.***>
Cc: nilsjor ***@***.***>; Assign ***@***.***>
Subject: Re: [cyberbotics/webots] Enable launching MATLAB desktop from the extern launcher (PR #6366)
unfortunately it does not give any hint on the error. I looked at the code but could not find an issue quickly.
The started controller targets a local instance (ipc protocol) of Webots with port number 1234.
Targeting the only robot waiting for an extern controller.
Running MATLAB in interactive mode...
—
Reply to this email directly, view it on GitHub<#6366 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKAL6TW2XCPYVDCZJP4TLJ3XZK5Y3ANCNFSM6AAAAAA4BVLQOE>.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
This was it! From webots itself it can find Matlab and from the terminal I can start it as well. Suggestion: Instead of "Running Matlab ..." it should rather print an error when it cannot find Matlab. Two more issues
|
This is a great observation! But the solution lies outside the scope for this PR. As you saw, this bug appears also for non-interactive use... If you you could, please open another Issue; "No error generated when webots-controller is unable to find executable" or similar ;) For the future, I believe the underlying reason has to do with the configuration of your MSYS. You could check the PATH variables, it is likely that you are missing something.
That's interesting. Perhaps it is already the default behaviour on unix that the MATLAB window is blocking... Could you test that for me? Just run
This is also a separate Issue, feel free to report it if you want. It could also have to do with your MSYS installation, it would have to be reproduced by someone else. Finally—regarding the features of this PR—did you get the interactive debugging to work? Were you able to reproduce these 6 steps?
|
Print details only if valid matlab installation is found
On topic:
Off topic:
|
Great, thanks! As a last touch, I moved the printout so it will only appear if a valid installation is found. I also removed Out of curiosity, I had a look at why it does not warn, and I found this webots/src/controller/launcher/webots_controller.c Lines 187 to 192 in 58d1b50
It seems that the error is suppressed only on macOS. I could not tell you why... Please include this in your Issue, if you open one. |
Hello again. What else is needed to go ahead with this? I see it is still pending reviewers. I have left some explanations on the important files:
Other than that, it's just the documentation and removed references to |
I did a first review a while ago, but my requests for change were not yet taken into account or answered. |
Co-authored-by: Olivier Michel <[email protected]>
Sorry for the late reply - I was too busy with other stuff. Thanks for the reminder. Code looks good to me but that does not work as intended:
I just tried without specifying the Matlab path and it still prints "starting matlab" although it cannot find it. Until a proper solution is available, I'd suggest to change the phrase to give a hint that if nothing happens one should try to specify the path to matlab. (Hope that fits into the PR.) |
Thanks again for the feedback! I am still of the opinion that this is outside the scope of this PR. It seems to me that the problem lies somewhere in the function To summarize, could you confirm the following:
It appears that the launcher skips the following lines, even though the function should return webots/src/controller/launcher/webots_controller.c Lines 899 to 901 in 58d1b50
The expected behavior here is that the launcher exits and you get: webots/src/controller/launcher/webots_controller.c Lines 207 to 208 in 58d1b50
Could you please create a new issue, call it "macOS: No error generated when webots-controller cannot find executable". There, please list the steps needed to reproduce it on the webots R2023b release (i.e., without this PR), including the path to your installed version of MATLAB, macOS, etc. Also describe if the launcher exits or if you need to Ctrl+C to return control. Thanks! |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both.
Description
This will add features as described in #6362 (comment)
Related Issues
This pull-request fixes issue #6362
Tasks
Add the list of tasks of this PR.
--interactive
option to the webots-controller which will launch MATLAB in interactive (debug) mode.Documentation
The following pages have been changed: