Re: [ros-users] re-subscription

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Gerkey
Date:  
To: ros-users
Subject: Re: [ros-users] re-subscription
On Thu, Mar 4, 2010 at 3:51 AM, Klaus Petersen
<> wrote:
> I have a very basic problem: First, I establish a connection between a
> publisher node and a subscriber node. At this point I can receive
> messages from the publisher with the subscriber node. But when I
> re-start my publisher node (quit and run again) the subscriber does not
> automatically resubscribe to the message. I have to restart the
> subscriber as well to be able to receive again. Is this the normal
> behavior with ros or am I doing something wrong? I have quite a big
> robot control program tied to one of the nodes, so restarting along the
> way (the initialization of the robot takes ages) is very troublesome.


hi Klaus,

Something's going wrong there. When your publisher is restarted, it
should re-advertise with the master, which should send the new
publisher list to your subscriber, which should then re-connect to
your publisher.

You can test this behavior with roscpp_tutorials/talker and
roscpp_tutorials/listener; no matter in what order they're
(re)started, listener will always connect to talker.

Can you tell us something about your publisher and subscriber? Is
there anything unusual about your subscriber?

    brian.