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

Using custom yaml loader for topological map file #186

Merged
merged 6 commits into from
Jul 17, 2024

Conversation

arsh09
Copy link
Contributor

@arsh09 arsh09 commented Jul 12, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

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

Copy link
Member

@marc-hanheide marc-hanheide left a 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

topological_navigation/test/test_navigationcore.py Outdated Show resolved Hide resolved
@@ -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)
Copy link
Member

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

Copy link
Contributor Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spurious space

Copy link
Contributor Author

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


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Contributor

@ibrahimhroob ibrahimhroob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks fine

@ibrahimhroob ibrahimhroob self-requested a review July 16, 2024 10:45
@marc-hanheide marc-hanheide merged commit d2bfc7d into LCAS:humble-dev Jul 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Yaml load with extended safe loader for topological map files
3 participants