Unable to receive data from ROS Master using Matlab
I would like to connect to ROS network using Matlab and plot the laser scanner data
- The ROS framework runs on a rover with IP address:
160.80.97.150.
The rover is publishing laserscanner data on the /scan topic - Matlab runs on another computer with IP:
160.80.97.241
The port 11311 on the rover is opened:
heavylab@HeavyLab:~$ nmap 160.80.97.150 -p 11311
Starting Nmap 6.40 ( http://nmap.org ) at 2016-04-01 14:30 CEST
Nmap scan report for 160.80.97.150
Host is up (0.000030s latency).
PORT STATE SERVICE
11311/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
The Problem
I am able to see the published topics from matlab but they seems empty. The receive command returns an error.
% Connect to a remote ROS instance on port 11311
rosinit('http://160.80.97.150:11311', 'NodeHost', '160.80.97.241')
% Check for topics
rostopic list
/scan
% Echo for /scan topic
laser = rossubscriber('/scan')
laser =
Subscriber with properties:
TopicName: '/scan'
MessageType: 'sensor_msgs/LaserScan'
LatestMessage: [0x1 LaserScan]
BufferSize: 1
NewMessageFcn: []
% Receive Scan data
scandata = receive(laser,10)
Error using robotics.ros.Subscriber/receive
(line 291)
The function did not receive any data and timed
out.
Do have any advice?
EDIT
Here is the output of the rosnode ping from Matlab:
rosnode ping /rosout
Pinging the /rosout node with a timeout of 3 seconds.
Received no ping response.
Are these both Linux machines? Do you have a working DNS server that can resolve both hostnames to their IPs? What is the output of
rosnode ping <nodename>
?Yes, they are both linux machines. No I don't have any DNS. I added the output of the command in the question
I'm getting the exact same issue. Any progress on an answer?
No Nothing
I meet the same problem too. And there is no answer to the issue on the Internet.