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 ROS_MASTER_URI=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 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
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 issudo ufw allow from <IP>
. Are you running a firewall?sudo ufw status
should show you all its rules and statusThanks for the reply, i've checked and on both machines added the two rules but anyway uft was inactive on them.