Skip to content

Commit

Permalink
ignore rviz2 node, ignore hyper-linked files
Browse files Browse the repository at this point in the history
Signed-off-by: YuxuanLiuTier4Desktop <[email protected]>
  • Loading branch information
Owen-Liuyuxuan committed Oct 22, 2024
1 parent 9571e05 commit 81ad12b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ def __init__(self):
self.ignore_topics = [
"/rosout",
"/parameter_events",
"/diagnostics",
]

self.ignore_nodes = [
"rviz2"
]

self.topic_data = {}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 81ad12b

Please sign in to comment.