Skip to content

Commit

Permalink
fix: topic filter for ROS analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshi-iwanari committed Jul 30, 2022
1 parent e9738a0 commit 1d30634
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dear_ros_node_viewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = '[email protected]'
Expand Down
3 changes: 2 additions & 1 deletion dear_ros_node_viewer/graph_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion dear_ros_node_viewer/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"ignore_topic_list": [
"/topic_name/to_be_ignored/in_regularexpression",
"/tf",
"/tf_static"
"/tf_static",
"/diagnostics"
]
},
"group_setting": {
Expand Down
3 changes: 2 additions & 1 deletion setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"ignore_topic_list": [
"/topic_name/to_be_ignored/in_regularexpression",
"/tf",
"/tf_static"
"/tf_static",
"/diagnostics"
]
},
"group_setting": {
Expand Down

0 comments on commit 1d30634

Please sign in to comment.