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
--help
mentions that --regex
is applied on top of topic list, but doing so gives "Must specify only one option out of topics, --regex or --all"
#1620
Comments
A workaround is just to include the topic list in the regex, e.g Additionally, since subscribers are only created after messages get published, its possible to miss messages with from volatile QOS durability publishers if there are no subscribers. However, if they are specified normally in the topic list with For example, consider the three cases below:
Case 2: listing topics manually
Case 3: regex with subscriber
|
@Raphtor Thanks for reporting this issue. @Barry-Xu-2018 @fujitatomoya I would appreciate someone's help here with fixing this issue on Humble and Iron. |
I just got back from vacation. I will investigate and fix this issue. |
About this issue, this check is wrong. I will fix it. rosbag2/ros2bag/ros2bag/verb/record.py Lines 171 to 172 in e7f7f59
Besides, I found the current implementation does not match the parameter description. The implement is
But the description of argument
There are two ways to fix it. One is to modify parameter description based on current implementation. The other is to modify the implementation based on parameter description. I would like to hear your opinion. |
👍
IMO that would be useful when |
@fujitatomoya As regards
Could you please clarify a use case when it would be useful when IMO @Barry-Xu-2018 I want to be consistent with the Rolling as much as possible in regards to the behavior. |
i thought the following cases,
and the,
|
@fujitatomoya I would disagree with
Regrex is a regular expression that defines a pattern of what to select by itself, and it really contradicts with |
So what about the |
Ideally |
Yes. I will confirm the behavior of the Rolling version and then modify the code to match its behavior. |
For Rolling, '--all' and '--all-topics' overrides '--regex'. So I will change code to follow this behavior. |
This is not correct. |
i tried with source build ros2/ros2@4d07f58
this is not implemented in rolling? they are exclusive options. root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 bag record -e '\/topic*' --topics /topic1 /topic2
[ERROR] [ros2bag]: Must specify only one option out of --all, --all-topics, --topics, --topic-types or --regex
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 bag record -e '\/topic*' /topic1 /topic2
Warning! Positional "topics" argument deprecated. Please use optional "--topics" argument instead.
[ERROR] [ros2bag]: Must specify only one option out of --all, --all-topics, --topics, --topic-types or --regex
it seems that i think the expected behavior from the discussion is,
what do you think? after all, we need to modify rolling to comply this behavior? |
@fujitatomoya @Barry-Xu-2018 As regards
Sorry for the confusion; it's too much on my plate in recent days.
|
As regards the
The rolling modification already done in the #1633. However, it is still in review. |
Ah 😅 i missed that, thanks! |
@Raphtor As regards
In particular, "Topic should be in topic list and then check if it matches the regex" That is not very user-friendly, and we found it tedious to find a correct We've changed this behavior in the #1480 and #1585. And starting from |
Yes, this is current behavior. As MichaelOrlov said, it will be changed by #1633 which is under review.
For Humble and Iron, it should support that From Jazzy and rolling, TopicFilter::take_topic() has been updated to remove user-unfriendly behavior. But check user input parameter has the issue you mentioned. It will be fixed at #1633. |
|
Description
Doing
ros2 bag record --help
says that-e
is applied on top of topics list:Expected Behavior
The topics recorded include both the topic list AND all topics that match the regex.
Actual Behavior
Doing that gives an error.
Flipping the arguments also gives an error:
To Reproduce
Run
ros2 bag record -e '\/namespace\/.*\/topic' /topic1 /topic2
System (please complete the following information)
ros-humble-ros2bag/jammy,now 0.15.8-1jammy.20231205.205704
The text was updated successfully, but these errors were encountered: