ros-tooling / topic_tools

Tools for directing, throttling, selecting, and otherwise manipulating ROS 2 topics at a meta-level.
Apache License 2.0
80 stars 34 forks source link

Fix mux #51

Closed martimorta-at-work closed 1 year ago

martimorta-at-work commented 1 year ago

Hi, mux wasn't changing the topic when /mux/select was called.

The issue is that the subscription is created once and doesn't check if inputtopic changes.

My fix is a check of inputtopic and the current sub topic name, if they are different then sub is reset and created again with the new topic name in the next iteration.

Cheers, Marti