Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.

roscpp: roscpp topic unsubscribe callbacks not called if no messages published (ros ticket #3403) #158

@tfoote

Description

@tfoote

I've noticed that the unsubscribe callbacks in roscpp, set up with advertise options, don't get called if the publisher doesn't publish any messages before the disconnection.

Specifically:

  • Set up publisher with subscribe/unsubscribe callbacks
  • Subscribe to topic, subscribe callback gets called
  • Don't publish messages
  • Unsubscribe to topic, unsubscribe callback doesn't get called

Attached is a modified version of talker.cpp to test this problem. To verify:

  • Run modified talker.cpp
    • It won't publish
  • Run "rostopic echo chatter", then ctrl-C a few times
  • Run "rostopic info chatter" to make sure topic not subscribed to
  • Unsubscribe callback never gets hit.

trac data:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions