Could not retrieve the system state of the ROS master - error

조회 수: 19 (최근 30일)
Anthony Schenck
Anthony Schenck 2020년 12월 4일
댓글: Mohan 2022년 11월 8일
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
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:
  1. You've said that the Master is running on the same machine as MATLAB, but not within MATLAB?
  2. Is this machine is Ubuntu or some other Linux distribution?
  3. What ROS release is being used to run the Master (e.g. Indigo, Kinetic, Melodic, Noetic)?
  4. 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)?
-Cam
Anthony Schenck
Anthony Schenck 2020년 12월 6일
편집: Anthony Schenck 2020년 12월 7일
1&2:The machine, an nVidia drive, is running Ubuntu indeed. The ROS master is started from the console. We initially tested the matlab script while a couple of different ros-nodes were running. When this failed we tested with just the rosmaster running from console ($roscore) which resulted in the same error.
3&4: Unsure at this moment, will check tomorrow.
(I initially tested the script at home, with a ROS master running ubuntu 18.04 and ros kinetic and the matlab script running on a linux mint 20.04 machine, and this worked without issues. )
*Edit: The machine in not an nVidia drive, it's a desktop pc with an i7 6700 processor running Ubuntu 18.04
3: ROS Kinetic
4: This works fine, the subscriber and the publisher get created without the error
I also tested with the rosbag we use on my home setup and this worked without any issues too.
Any other debugging strategies would be welcome!

댓글을 달려면 로그인하십시오.

채택된 답변

Anthony Schenck
Anthony Schenck 2020년 12월 14일
Apparently the issue was caused by a beta driver of Ouster, v1.14. We reverted to v1.12 and everything is working now.
  댓글 수: 2
Mohan
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
Anthony Schenck
Anthony Schenck 2022년 11월 8일
Hi, I haven't done it myself either so I can't help you directly. I'm sure the ouster manual has a section on firmware updates though. Good luck.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

ahmad aqel
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
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 CenterFile Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by