From 81ad12b52a5d53db065e8564a1767983171bf1d7 Mon Sep 17 00:00:00 2001 From: YuxuanLiuTier4Desktop <619684051@qq.com> Date: Tue, 22 Oct 2024 13:42:02 +0900 Subject: [PATCH] ignore rviz2 node, ignore hyper-linked files Signed-off-by: YuxuanLiuTier4Desktop <619684051@qq.com> --- .../topic_connection_checker/localize_topic.py | 2 ++ .../topic_connection_checker_node.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/localize_topic.py b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/localize_topic.py index 2dc01f24..f09dbf02 100644 --- a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/localize_topic.py +++ b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/localize_topic.py @@ -37,6 +37,8 @@ def search_topics_in_directory( for file in files: if file.endswith((".cpp", ".hpp", ".h", "launch.py")): file_path = os.path.join(root, file) + if os.path.islink(file_path): + continue file_results = find_topics_in_file(file_path, topics) if file_results: results[file_path] = file_results diff --git a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/topic_connection_checker_node.py b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/topic_connection_checker_node.py index c94ba5e5..f934ce5f 100644 --- a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/topic_connection_checker_node.py +++ b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/topic_connection_checker_node.py @@ -30,6 +30,11 @@ def __init__(self): self.ignore_topics = [ "/rosout", "/parameter_events", + "/diagnostics", + ] + + self.ignore_nodes = [ + "rviz2" ] self.topic_data = {} @@ -167,7 +172,7 @@ def finish_check(self): publishers_info = self.get_publishers_info_by_topic(topic) with self.lock: self.topic_data[topic]["publishers"] = [ - (p.node_name, p.node_namespace) for p in publishers_info + (p.node_name, p.node_namespace) for p in publishers_info if p.node_name not in self.ignore_nodes ] self.check_completed.set()