Cannot connect to ROS master running on mi PC from raspberry pi

11 views (last 30 days)
ERROR: Unable to communicate with master!
I am using Matlab 2019B and I have installed Raspbian GNU/Linux 9 in mi Raspberry Pi 3 board. The thing is that I create a ros master on mi PC and I try to connect to it from my Raspberry pi and it gives mi this error.
PC ip :
Raspberry Pi IP =
To create Matlab master on mi pc I use:
then I open a communication terminal using :
r = raspberrypi('','pi','raspberry');
then trough this terminal I oppened I type:
$ source ~/catkin_ws/devel/setup.bash
$ export ROS_MASTER_URI=
$ rostopic echo /rosout
This las one is to subscribe to the topic /rosout that the matlab master creates when using rosinit.
This is when I get the error.
ERROR: Unable to communicate with master!
I thought it could be a firmware problem but when I ping mi rspberry from mi PC there is no problem and neither the other way.
I apreciated if anyone could help me
thanks in advance.

Answers (1)

Tohru Kikawada
Tohru Kikawada on 2 Jun 2020
Please try to set the following environment variable on your Raspberry Pi as disscussed here.
$ export ROS_HOSTNAME= # Raspberry Pi's IP address. This should be reached from your PC


Find more on Raspberry Pi Hardware in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!