Messages do not get published [closed]

asked 2015-04-24 16:43:58 -0600

atp gravatar image

updated 2015-04-28 14:52:31 -0600

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.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-06-21 02:15:16.622972

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

tfoote gravatar imagetfoote ( 2015-04-24 22:39:51 -0600 )edit

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

Andromeda gravatar imageAndromeda ( 2015-04-25 12:05:41 -0600 )edit

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

atp gravatar imageatp ( 2015-04-25 12:32:55 -0600 )edit

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

Andromeda gravatar imageAndromeda ( 2015-04-25 12:51:35 -0600 )edit

What is publishing to the topic?

dornhege gravatar imagedornhege ( 2015-04-29 02:37:02 -0600 )edit

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

atp gravatar imageatp ( 2015-04-29 07:50:40 -0600 )edit