From 1d30634c9b6d915ee9720a00d58f14eec5e1d78a Mon Sep 17 00:00:00 2001 From: "takeshi.iwanari" Date: Sat, 30 Jul 2022 22:05:00 +0900 Subject: [PATCH] fix: topic filter for ROS analysis --- dear_ros_node_viewer/__init__.py | 2 +- dear_ros_node_viewer/graph_manager.py | 3 ++- dear_ros_node_viewer/setting.json | 3 ++- setting.json | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dear_ros_node_viewer/__init__.py b/dear_ros_node_viewer/__init__.py index c975bc0..1b0afa8 100644 --- a/dear_ros_node_viewer/__init__.py +++ b/dear_ros_node_viewer/__init__.py @@ -26,7 +26,7 @@ __copyright__ = 'Copyright 2022 Tier IV, Inc.' -__version__ = '0.1.2' +__version__ = '0.1.3' __license__ = 'Apache License 2.0' __author__ = 'takeshi-iwanari' __author_email__ = 'takeshi.iwanari@tier4.jp' diff --git a/dear_ros_node_viewer/graph_manager.py b/dear_ros_node_viewer/graph_manager.py index fb8a9b7..f59740b 100644 --- a/dear_ros_node_viewer/graph_manager.py +++ b/dear_ros_node_viewer/graph_manager.py @@ -66,7 +66,7 @@ def load_graph_postprocess(self, filename): """ Common process after loading graph """ self.dir = os.path.dirname(filename) + '/' if os.path.dirname(filename) != '' else './' self.clear_caret_path_dict() - self.filter_topic() # delete topic before node + self.filter_topic() # delete topic before node self.filter_node() if len(self.graph.nodes): self.graph = place_node_by_group(self.graph, self.group_setting) @@ -89,6 +89,7 @@ def filter_topic(self): remove_edge_list = [] for edge in self.graph.edges: topic_name = self.graph.edges[edge]['label'] + topic_name = topic_name.strip('"') for pattern in self.app_setting['ignore_topic_list']: if re.fullmatch(pattern, topic_name): remove_edge_list.append(edge) diff --git a/dear_ros_node_viewer/setting.json b/dear_ros_node_viewer/setting.json index 4aa4eb4..cdd5416 100644 --- a/dear_ros_node_viewer/setting.json +++ b/dear_ros_node_viewer/setting.json @@ -10,7 +10,8 @@ "ignore_topic_list": [ "/topic_name/to_be_ignored/in_regularexpression", "/tf", - "/tf_static" + "/tf_static", + "/diagnostics" ] }, "group_setting": { diff --git a/setting.json b/setting.json index 4aa4eb4..cdd5416 100644 --- a/setting.json +++ b/setting.json @@ -10,7 +10,8 @@ "ignore_topic_list": [ "/topic_name/to_be_ignored/in_regularexpression", "/tf", - "/tf_static" + "/tf_static", + "/diagnostics" ] }, "group_setting": {