Skip to content

Commit

Permalink
Added feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Mar 27, 2024
1 parent 6009815 commit 8f8a48b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions rosbag2_py/rosbag2_py/_transport.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class RecordOptions:
compression_threads: int
exclude_regex: str
exclude_service_events: List[str]
exclude_topic_types: List[str]
exclude_topics: List[str]
ignore_leaf_topics: bool
include_hidden_topics: bool
Expand Down
3 changes: 1 addition & 2 deletions rosbag2_transport/src/rosbag2_transport/topic_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ bool TopicFilter::take_topic(
}
}

if (!record_options_.exclude_topic_types.empty() &&
topic_type_in_list(topic_type, record_options_.exclude_topic_types))
if (topic_type_in_list(topic_type, record_options_.exclude_topic_types))
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ TEST_F(TestTopicFilter, all_topics_and_exclude_type_topics)
{
EXPECT_TRUE(filtered_topics.find(topic) != filtered_topics.end()) << "Expected topic:" << topic;
}

EXPECT_TRUE(filtered_topics.find("/localization") == filtered_topics.end());
EXPECT_TRUE(filtered_topics.find("/status") == filtered_topics.end());
}

TEST_F(TestTopicFilter, all_services_and_exclude_regex)
Expand Down

0 comments on commit 8f8a48b

Please sign in to comment.