Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed regex and standard topics do not work together #1805

Open
balbok0 opened this issue Sep 11, 2024 · 1 comment
Open

Mixed regex and standard topics do not work together #1805

balbok0 opened this issue Sep 11, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed humble Humble Hawksbill

Comments

@balbok0
Copy link

balbok0 commented Sep 11, 2024

Description

When passing -e <regex> <normal-topic> (or vice-versa) nothing gets subscribed to.

Expected Behavior

I expect subscription to all available topics matching regex AND available topics matching normal topics to start, and logging into mcap to happen.

Actual Behavior

ros2 bag record -s mcap -o test-together /rosout -e .*foo.*
[INFO] [1726090334.863074764] [rosbag2_recorder]: Press SPACE for pausing/resuming
[INFO] [1726090334.865025588] [rosbag2_recorder]: Listening for topics...
[INFO] [1726090334.865312077] [rosbag2_recorder]: Event publisher thread: Starting
[INFO] [1726090334.865351501] [rosbag2_recorder]: Recording...

MCAP is empty w/ 0 messages.

To Reproduce

  1. Start dummy publisher for topics "/a/foos", "/b/foo" which also log to rosout (or replace topics/regex above)
  2. Run ros2 bag record -s mcap -o test /rosout -e .*foo.*

System (please complete the following information)

  • OS: Ubuntu 22.04 LTS
  • ROS 2 Distro: Humble
  • Install Method: humble docker container
  • Version: [release, branch, commit hash, patch release number]
@balbok0 balbok0 added the bug Something isn't working label Sep 11, 2024
@MichaelOrlov MichaelOrlov added help wanted Extra attention is needed humble Humble Hawksbill labels Sep 12, 2024
@MichaelOrlov
Copy link
Contributor

@balbok0 The situation is that yes this is sort of behaviour which is not expected according to the hint from the help section for -e <--regex> CLI option.
However, the behavior is according to the design of the TopicFilter class on Humble.

We have made significant overhaul in the TopicFilter class and CLI options for recorder and it is avilable since Jazzy release.
The issue you mentioned has been fixed since Jazzy. However, backporting it to the Humble branch is not straightforward because the code base became very different.

Also, need to pay special attention to the run-time optimizations in the TopicFilter - because adding one suboptimal extra check can significantly increase CPU load when Recorder runing topic discovery thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed humble Humble Hawksbill
Projects
None yet
Development

No branches or pull requests

2 participants