Conect from PC to ROS in a server

asked 2021-01-19 12:54:17 -0500

Giofist gravatar image

Hi, i'm having this issue. I have a particular setup where i can run programs on a remote server only inside docker container, now the server does not have any gui so i would like to use ros network to connect to my pc in order to use rviz and other graphical tools. I have installed a vpn and i was able to link in some way the two machines: on the master that runs on the server inside the docker with port mapping enabled -p 11311:11311 i've run:


export ROS_IP=


on another shell i've run a simple publisher node called /counter

on my local pc connected via vpn to teh server network:

export ROS_MASTER_URI=http://public_server_ip:11311

export ROS_IP=my_local_Ip_on_vpn_network

Then typing:

rostopic list

i can normally see all the topics running on the server but using

rostopic echo /counter

nothing shows. My question is, I'm doing something wrong? Is even possible to make it work? It seems that ros has a uni directional communication from master to client but when it comes to map serverIP->dockerIP something goes bad.

Thanks in advance, Giorgio

edit retag flag offensive close merge delete



We had this exact problem but between 2 PCs: where we could see the topics but not echo them. We solved it by messing with the ufw firewall (by allowing from the IPs between the computers). The exact line is sudo ufw allow from <IP>. Are you running a firewall? sudo ufw status should show you all its rules and status

APettinger gravatar image APettinger  ( 2021-01-20 08:10:38 -0500 )edit

Thanks for the reply, i've checked and on both machines added the two rules but anyway uft was inactive on them.

Giofist gravatar image Giofist  ( 2021-01-23 02:46:22 -0500 )edit