I can only echo a subset of ROS topics from a remote machine

asked 2022-09-02 15:47:20 -0600

benripka gravatar image

I am running ROS Melodic on Ubuntu 18.04 on both my robot and laptop. While SSH'd into the robot, I can view all nodes and topics, and echo the contents of all the topics no problem.

From my remote laptop however, with ROS_IP=<laptop_ip> and ROS_MASTER_URI=http://<robot_ip>:11311 I can view all topics, and I can echo most (/tf, /pointcloud, /odom, etc.) but some I cannot... For example I cannot echo /map or /scan. It does not say that the topics has not been written too, or that I have not built my messages, but rather just hangs and outputs nothing... It seems very strange to me that only a subset of the topics would fail from the remote machine. I have also configured /etc/hosts on the robot with the appropriate machine names.

Any suggestions would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

1

I'd suggest to set ROS_IP on your robot's PC as well and see whether things work normally just to diagnose what's going on (basically: avoid using hostnames completely).

gvdhoorn gravatar image gvdhoorn  ( 2022-09-06 03:23:58 -0600 )edit

Setting the robots ROS_IP worked for me. Thanks for the tip :)

benripka gravatar image benripka  ( 2022-09-14 11:49:24 -0600 )edit

This was only a diagnostic step. Not the solution.

If setting ROS_IP (where? On which host(s)?) works, that would point to DNS problems.

You mention you "also configured /etc/hosts on the robot". Did you do that just on the robot's PC, or on both PCs?

gvdhoorn gravatar image gvdhoorn  ( 2022-09-14 12:51:49 -0600 )edit