Messages do not get published [closed]
I have a node A subscribed to some ROS topic B. When I do rosnode info A, I can see topic B. However, when doing rosecho, nothing appears on the topic. Repeating rosecho does not help. This does not happen all the time. Usually, restarting the robot/the computer helps. Still, my question is: why is this happening?
EDIT:
I have simplified the problem to having two terminals, one publishing to a topic, and the other one echoing that topic. It seems like there is a large delay. I start with:
> rostopic echo /cba
WARNING: topic [/cba] does not appear to be published yet
Then I do rostopic pub /cba std_msgs/String "A" which gives:
> rostopic echo /cba
WARNING: topic [/cba] does not appear to be published yet
data: A
---
However, a subsequent rostopic pub /cba std_msgs/String "B" is not seen in the terminal that echos the topic cba.
There are lots of reasons this could be happening. Please provide enough information how to reproduce your problem. For guidelines on asking good questions see: http://wiki.ros.org/Support
atp: I think that your explanation is not really helpful. Please update your question with some screen and output from the console. And try
rostopic list
first of all...If the topic appears in
rosnode info
, should not it also appear inrostopic list
? (I'll update the question when I get the error again. For now, restarting the robot/computer solved it.)Without some code it is not so simple to answer that question. You said: "it doesn't hannpen all the time". Maybe some functions, when called, stop the publishing of the information? Start your robot and let rosecho running until the problem happens
What is publishing to the topic?
A rostopic pub from the terminal. We tried it on a secondary computer and there it works fine.