# MATLAB ROS Communication Issue: The following nodes should be connected but aren't

I have both MATLAB and ROS installed on a SINGLE Linux machine. I am trying to publish data from MATLAB over a rostopic and echoing it in the terminal to view it. No matter, however, I play with URIs IPs /etc/hosts etc., I can't get to echo data in the linux terminal. I have tried setting MATLAB both as a master and as a node.

However, if I open multiple MATLAB Command Windows, I can echo the data inside it.

roswtf yields the following Found 1 warning(s). Warnings are things that may be just fine, but are sometimes at fault

WARNING Node [/vector_field] is not connected to anything

Found 1 error(s).

ERROR The following nodes should be connected but aren't:
/vector_field->/rostopic_1990_1521823771596 (/target_pose_hong_kong)


It seems like linux terminal and matlab commandline reside in different zones, and are just unable to communicate with each other.

• I asked it on Matlab Answers forum few days back. But didn't get any answers. So posted here for larger community – Abdullah Nazir Mar 27 '18 at 17:58
• I have dropped to configure matlab with ROS for now. Instead writing the data from matlab in a text file and reading/publishing it within ROS – Abdullah Nazir Mar 27 '18 at 18:01
• is it possible that you are unable to connect because of differing data type? ... for example, text on one side and numeric on the other side – jsotola Mar 28 '18 at 21:09
• have you read this? .... mathworks.com/help/robotics/ref/rosdevice.html – jsotola Mar 28 '18 at 21:15
• I haven't. Thanks for sharing it. I was using rosinit directly without setting up any device. I will try this and see if this resolves my issue. – Abdullah Nazir Mar 29 '18 at 15:51