Skip to content

Commit

Permalink
Fix SpotGraphNav.list_graph() implementation. (#123)
Browse files Browse the repository at this point in the history
Waypoint name may not be an integer.

Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
mhidalgo-bdai authored Jul 1, 2024
1 parent 1ad6a99 commit 961c368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spot_wrapper/spot_graph_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def list_graph(self) -> typing.List[str]:
"""
ids, eds = self._list_graph_waypoint_and_edge_ids()

return [v for k, v in sorted(ids.items(), key=lambda id: int(id[0].replace("waypoint_", "")))]
return [v for _, v in sorted(ids.items(), key=lambda item: item[0])]

def navigate_initial_localization(
self,
Expand Down

0 comments on commit 961c368

Please sign in to comment.