[ros-users] Publish/Subscriber loosing first message

Axelrod, Benjamin baxelrod at irobot.com
Wed May 11 13:14:19 UTC 2011

See also this thread on answers.ros.org:

-----Original Message-----
From: ros-users-bounces at code.ros.org
[mailto:ros-users-bounces at code.ros.org] On Behalf Of Sebastian Schneider
Sent: Wednesday, May 11, 2011 7:04 AM
To: ros-users at code.ros.org
Subject: Re: [ros-users] Publish/Subscriber loosing first message

Thank you for the link to the ticket. According to the third comment the

behaviour seems to be expected, or better said: One should not rely on a

"one-shot" publisher to work.

But read for yourself:

Personally, I agree, that in a publish/subscriber communication one can 
never guarantee that each subscriber will get each message. Since one 
never nows how many subscribers are listening this would be a hard job 
anyway. But, if the circumstances are that the subscriber is already 
listening and there are no connection problems (e.g. both parties 
running on the same host) then I don't see why a published message 
should not be received by the subscriber.


Am 11.05.2011 12:19, schrieb Ugo Cupcic:
> Hi,
> You can have a look at this:
> https://code.ros.org/trac/ros/ticket/3450#comment:2
> <https://code.ros.org/trac/ros/ticket/3450#comment:2>Could you ask the
> question again on ros-answer? This way we can put this answer here.
> Cheers,
> Ugo
> On Wed, May 11, 2011 at 11:14 AM, Sebastian Schneider
> <s.schneider at unibw.de <mailto:s.schneider at unibw.de>> wrote:
>     Hello,
>     I'm currently trying out the Tutorials from the ROS Wiki and I
have a
>     question to the part "Examining the Simple Publisher and
(http://www.ros.org/wiki/ROS/Tutorials/ExaminingPublisherSubscriber). So
>     far, my programs are working as expected, but I wonder why the
>     message from the publisher "Hello there! This is message [0]" does
>     reach the subscriber. The first message the subscriber receives is
>     "Hello there! This is message [1]".
>     This also happens, if I start the subscriber before I start the
>     publisher.
>     Any ideas?
>     Sebastian Schneider
>     _______________________________________________
>     ros-users mailing list
>     ros-users at code.ros.org <mailto:ros-users at code.ros.org>
>     https://code.ros.org/mailman/listinfo/ros-users
> --
> Ugo Cupcic | Shadow Robot Company | ugo at shadowrobot.com
> <mailto:ugo at shadowrobot.com>
> Software Engineer | 251 Liverpool Road |
> need a Hand? | London N1 1LX | +44 20 7700 2487
> http://www.shadowrobot.com/hand/ @shadowrobot
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
ros-users mailing list
ros-users at code.ros.org

More information about the ros-users mailing list