Robotics StackExchange | Archived questions

Conect from PC to ROS in a server

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 ROSMASTERURI=http://172.17.0.5:11311

export ROS_IP=172.17.0.5

roscore

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

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

export ROSMASTERURI=http://public_server_ip:11311

export ROSIP=mylocalIponvpnnetwork

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

Asked by Giofist on 2021-01-19 13:54:17 UTC

Comments

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

Asked by APettinger on 2021-01-20 09:10:38 UTC

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

Asked by Giofist on 2021-01-23 03:46:22 UTC

Answers