Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parser #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<exec_depend>controller_manager_msgs</exec_depend>
<exec_depend>diagnostic_msgs</exec_depend>
<exec_depend>ros_graph_parser</exec_depend>
<exec_depend>rospkg</exec_depend>
<exec_depend>python-rospkg</exec_depend>

<export>
</export>
Expand Down
8 changes: 4 additions & 4 deletions src/rosgraph_monitor/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ def __init__(self, model, isFile=True):
_action_servers = Keyword("RosActionServers").suppress()
_action_server = Keyword("RosActionServer").suppress(
) | Keyword("RosServer").suppress()
_ref_server = Keyword("RefServer").suppress()
_ref_server = Keyword("RefServer").suppress() | Keyword("RefActionServer").suppress()

# Actio Clients Def
_action_clients = Keyword("RosActionClients").suppress()
_action_client = Keyword("RosActionClient").suppress(
) | Keyword("RosClient").suppress()
_ref_action_client = Keyword("RefClient").suppress()
_ref_action_client = Keyword("RefClient").suppress() | Keyword("RefActionClient").suppress()

# Topic Connections Def
_topic_connections = Keyword("TopicConnections").suppress()
Expand Down Expand Up @@ -196,8 +196,8 @@ def parse(self):
self._parse_from_file()
else:
self._parse_from_string()
except Exception as e:
print(e.args) # Should set a default 'result'?
except ParseException as e:
print(ParseException.explain(e, depth=0)) # Should set a default 'result'?
return self._result


Expand Down