Can see topic when using ros2 topic list, but can't echo it?
I have two computers(Ubuntu 20.04) in the same network with ROS_DOMAIN_ID=1 and I have a topic called cloud
which is a pointcloud from a lidar sensor. The driver is running on the PC=A and I want to show the clouds on PC=B. Now when I ros2 topic echo /cloud
on PC=A I receive the msgs as normal. When I ros2 topic list on PC=B I see the cloud topic. I only see it after setting the ROS_DOMAIN_ID=1 to make sure no prior topic with that name is available. So far so good, but now when I try to ros2 topic echo /cloud
on PC=B I get nothing. Any idea why this could be? In my understanding the msgs are arriving, as shown by ros2 topic echo /cloud
on PC=A and I can see them on PC=B shown by ros2 topic list
. Funny enough ros2 topic info /cloud
works fine and tells me that the publisher and subscriber count at 1 and 2 respectively. Also running the ros2 run demo_nodes_cpp talker
demo on PC=A and ros2 run demo_nodes_cpp listener
demo on PC=B works as intended. Is it maybe because the sensor is UDP and the demo listener is tcp?
Maybe you should check your QoS in both publisher and subscriber on the computers?
I checked that the QOS are the same by using
ros2 topic echo /cloud --verbose
and setting the once which rviz exposes to the same, namely reliability: RELIABLE, DURABILITY: TRANSIENT_LOCAL,I assume it was the same on the side of the subscriber, it shouldn't prevent anything from working...
Well and here we are. I have yet to try in a network without a firewall, there is a possibility that that is a problem. But I doubt it. But I don't have a router atm so I can't try it