- You've said that the Master is running on the same machine as MATLAB, but not within MATLAB?
- Is this machine is Ubuntu or some other Linux distribution?
- What ROS release is being used to run the Master (e.g. Indigo, Kinetic, Melodic, Noetic)?
- Does this also occur if you start the ROS Master on MATLAB (rosinit with no input arguments, and no ROS_MASTER_URI environment variable being set)?
Could not retrieve the system state of the ROS master - error
8 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm getting the error in the title when I'm trying to create a publisher or subscriber. The ROS master and the Matlab script run on the same machine.
Matlab can connect to the ROS master and the matlab node is visible when running 'rosnode list'.
rosMaster = "http://192.168.3.10:11311/";
rosinit(rosMaster)
lidarTopic = "/os_cloud_node/points";
segmentedLidarTopic = "/segmentedImages";
sub = rossubscriber(lidarTopic);
pubLidar = rospublisher(segmentedLidarTopic, 'sensor_msgs/Image');
The error happens on both of the last 2 lines of code. I wasn't able to find any information on how to approach this error message.
If anyone can help it would be much appreciated!
2 个评论
Cam Salzberger
2020-12-4
That particular error message comes from a portion of code that is trying to determine the state of the network (what topics are being published, what message types do those topics use, etc.). Unfortunately, it doesn't really narrow down further past that.
To approach this from another angle:
-Cam
采纳的回答
Anthony Schenck
2020-12-14
2 个评论
Mohan
2021-2-16
Hello Anthony,
How does one revert to Ouster V1.12 from V1.14? I have never done something like that before so would appreciate some help. Thanks!
Mohan
更多回答(1 个)
ahmad aqel
2022-11-8
rostopic list
Could not retrieve the system state of the ROS master.
>> robot = rospublisher("/cmd_vel","DataFormat","struct");
Could not retrieve the system state of the ROS master
i get this error, i try to use MACBOOK with M1 pro chip with turtlebot3 and matlab r2022a. i do all the steps on this two pages ( https://www.mathworks.com/help/ros/ug/get-started-with-a-real-turtlebot.html ) ( https://www.mathworks.com/help/ros/ug/communicate-with-the-turtlebot.html ).
1 个评论
Mohan
2022-11-8
Ahmad - I got the same error this past summer. The solution was somewhat complicated and involved a file swap of a MATLAB system file and more. I suggest you contact Mathworks Technical Support and they will resolve it for you, since it has happened before.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Publishers and Subscribers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!