Error creating global node using rosinit
4 次查看(过去 30 天)
显示 更早的评论
Hello I am trying to ron Ros Noetic with Matlab 2022a on Ubuntu 20.04. After some other fixed errors I get the following error when trying to run rosinit and I don't find the solution anywhere.
>> rosinit
The value of the ROS_MASTER_URI environment variable, http://localhost:11311, will be used to connect to the ROS master.
Launching ROS Core...
Adding required Python packages to virtual environment..Done.
Error using ROSException
Expected identifier to be nonempty.
Error in ros.internal.ROSException (line 55)
validateattributes(varargin{1}, {'char'}, {'nonempty'}, ...
Error in ros.internal.ROSException.fromException (line 206)
rosex = ros.internal.ROSException(ex.identifier, ex.message);
Error in rosinit (line 103)
rosex = ros.internal.ROSException.fromException(ex);
>>
Maybe someone has a idea where the error is coming from and can help me.
Thanks in advance and cheers,
Lukas
8 个评论
Cam Salzberger
2022-5-19
That is certainly odd to see - that it would finish the build with apparent success, but not allow you to use the custom messages. You could take a look at (and attach) the build log that gets generated (should be linked in the output), but I suspect it won't be entirely helpful.
I've asked my colleague with more experience i the custom message area to take a look at this issue.
-Cam
回答(1 个)
Juan Andres
2022-10-11
Hello Lukas, I wanted to know if you could solve the problem. Right now I am new to ubuntu and ROS, and I am having exactly the same issue you had. I was able to reach to the point where you get the error report by:
disp(ex)
getReport(ex)
Then you continue to mention you had to install the -dev package, but I can't seem to find this package. How should I install this in order to solve the problem? Thank you very much.
2 个评论
Cameron
2022-10-11
编辑:Cameron
2022-10-11
Hey so I had the exact problem too, and installing the -dev package didn't solve the problem for me. What my problem was is that it was calling the wrong version of python for virtual environments. I installed the correct version of python that it was expecting by using the command
pyenv('Version', '/bin/python3.9')
before running rosinit. I also had to delete everything in the ~/.matlab/R2022a/ros1/glnxa64/venv directory and run the program again to get it to be happy. I hope this helps.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!