roslibjs subscriber not getting called

asked 2017-09-04 10:14:00 -0600

linusnie gravatar image

updated 2017-09-04 13:32:08 -0600

I want to implement a GUI for my robot in JavaScript with some command/display functionality so I'm looking into how to use roslibjs. But I am having problems running the basic example.

Publishing works fine but when I run rostopic pub /listener std_msgs/String "Hello, World" the callback is not getting called. The message is properly printed if I echo the /listener topic, but it doesn't seem to reach the roslibjs node.

The rosbridge launch terminal also prints [INFO] [WallTime: 1504549773.401212] [Client 0] Subscribed to /listener so the subscription should be set up properly.

Any ideas?

edit retag flag offensive close merge delete


Instead of running rostopic pub /listener std_msgs/String "Hello, World", try rostopic pub /listener std_msgs/String "Hello, World" -r 10

And try to reload the page (on the WebBrowser) only after run the 5 commands described on Running the Example section of the tutorial.

Ruben Alves gravatar image Ruben Alves  ( 2017-10-02 07:00:41 -0600 )edit

I'm currently encountering the same issue. Were you able to solve it?

Hendrik Wiese gravatar image Hendrik Wiese  ( 2019-08-20 01:52:02 -0600 )edit