Open ihs-systems opened 4 years ago
Have you added this feature somewhere? I am interested in it too.
Just added the feature here in a PR here https://github.com/ros-teleop/twist_mux/pull/20
Our generalized mux package has this ability: https://github.com/ctu-vras/ros-utils/blob/master/cras_topic_tools/include/cras_topic_tools/priority_mux.h . It should be released with next Noetic sync (there was an older version of priority_mux that is released now, but it was broken).
The package is "backwards compatible" with twist_mux - it can be configured with the exact same YAML files (but it adds more features like multiple output topics or working with any message types).
You can run it with rosrun cras_topic_tools priority_mux
. The selected topic will be published on ~/selected/cmd_vel
(if you publish to cmd_vel
). You can also read the active priority level on ~/active_priority
.
(In my case) it would be handy to have information which input topic is selected for current output, similar to
mux/selected
topic in topic_tools/mux package.Have you been thinking of this functionality? Perhaps I can provide PR when i start digging into it.