No data shows on rostopic?
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.
Can you post your code/launch file? Make sure
ROS_MASTER_URI
andROS_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 theecho
node to send data.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 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