Robotics StackExchange | Archived questions

Messages do not get published

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.

Asked by atp on 2015-04-24 16:43:58 UTC

Comments

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

Asked by tfoote on 2015-04-24 22:39:51 UTC

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...

Asked by Andromeda on 2015-04-25 12:05:41 UTC

If the topic appears in rosnode info, should not it also appear in rostopic list? (I'll update the question when I get the error again. For now, restarting the robot/computer solved it.)

Asked by atp on 2015-04-25 12:32:55 UTC

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

Asked by Andromeda on 2015-04-25 12:51:35 UTC

What is publishing to the topic?

Asked by dornhege on 2015-04-29 02:37:02 UTC

A rostopic pub from the terminal. We tried it on a secondary computer and there it works fine.

Asked by atp on 2015-04-29 07:50:40 UTC

Answers