No data shows on rostopic?

asked 2021-02-13 06:16:09 -0500

kjitender469 gravatar image

I am publishing image data on topic "/camera/image" on machine 1 (ubuntu 16.04 with ROS Kinetic) and when I run command rostopic echo /camera/image or rostopic hz /camera/image I got the data and the frequency at which it publishes but when I run these rotopic command on machine 2 (ubuntu 16.04 with ROS Kinetic) then I am not able to get any data. When I run rostopic list command on machine 2 it shows me all the topics so I think my network setting is ok. I don't understand why I am not able to get data on machine 2.

edit retag flag offensive close merge delete

Comments

Can you post your code/launch file? Make sure ROS_MASTER_URI and ROS_HOSTNAME are set properly (wiki). It may be that the nodes can find the master (topics register fine), but the nodes can't connect with the echo node to send data.

tryan gravatar image tryan  ( 2021-02-13 20:17:57 -0500 )edit

Kindly ensure that the "export ROS_IP" for machine 1 was configure correctly. The fact that the topic exist without any message in it is mostly because of configuration problem. I experience once and it was because my ROS_IP was set wrongly. Another thing is firewall, it may block any unknown incoming messages.

loguna gravatar image loguna  ( 2021-02-18 21:52:13 -0500 )edit

@loguna You are right its because of configuration problem in my case as well. Actually I have not export ROS_MASTER_URI for a perticular terminal so its not resolving ros master correctly but when I agin export ROS_MASTER_URI and ROS_IP correctly for that specific process it starts working. Thank you for the response @loguna@tryan

kjitender469 gravatar image kjitender469  ( 2021-02-20 02:36:04 -0500 )edit