-
Notifications
You must be signed in to change notification settings - Fork 38
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
Using custom yaml loader for topological map file #186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the absolute topic names are a problem
@@ -94,8 +94,8 @@ def __init__(self, name='test_node'): | |||
|
|||
def initialize(self): | |||
self.topmap_sub = self.create_subscription(String, '/topological_map_2', self.topmap_sub_callback, 1) | |||
self.closest_node_sub = self.create_subscription(String, 'closest_node', self.closest_node_callback, 1) | |||
self.current_node_sub = self.create_subscription(String, 'current_node', self.current_node_callback, 1) | |||
self.closest_node_sub = self.create_subscription(String, '/closest_node', self.closest_node_callback, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see below, no absolute topic URI please change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it back to relative topic URIs.
@@ -151,7 +168,7 @@ def init_map(self, name="new_map", metric_map="map_2d", pointset="new_map", tran | |||
self.loaded = False | |||
self.load = load | |||
if self.load: | |||
self.load_map(self.filename) | |||
self.load_map(self.filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spurious space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for this.
|
||
return mapping | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks fine
What type of PR is this? (check all applicable)
Description
This PR fixes #185 with custom yaml loader.
Additionally, the same custom loader class can be extended to check for missing fields or check node attributes before loading the map instead. See here