Error occurs when executing 'rosinit'
4 ビュー (過去 30 日間)
古いコメントを表示
Hi, I ran 'rosinit' command on R2022b with Ubuntu 20.04.5 LTS and got the error shown in the image below.
The cause of this error appears to be a timeout. However, I do not know how to resolve it.
Also, I had a problem with the python path before, so maybe there is still a problem with the python path.
I set the python path as shown in the image below.
I also tried to run 'rosinit' on a different port, but it did not work.
Thank you for your help.
0 件のコメント
回答 (1 件)
Josh Chen
2023 年 1 月 30 日
Hello Ryo,
Before running "rosinit", have you used "ROS Toolbox Preference" to setup the environment? In there, if there is any conflict or incompatibility regarding environment, you can see more information. You can open "ROS Toolbox Preference" by navigating to "HOME tab>Environment>Preferences>ROS Toolbox>Open ROS Toolbox Preferences"
Another thing to quickly check is the version of python. As an issue in R2022b, please use python 3.9.13.
Hope this helps,
Josh
4 件のコメント
Josh Chen
2023 年 2 月 2 日
Hi Ryo,
This issue looks pretty strange. "roscore" is only required by ROS, however, in the error message, it points to something inside ros2_humble (i.e. ROS 2). Based on this error message, I assume you have both ROS and ROS 2 installed?
I am suspecting some environment variables setup got messed up between ROS and ROS 2 on this device. Which could also be the reason why you are not able to launch ros core through MATLAB.
Note that MATLAB does not require you to have ROS installed on your device. You may consider to either dig deeper to see which enviorment variables are causing this issue, delete both ROS and ROS 2, or do a clean reinstallation for ROS.
Best,
Josh
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!