From 605fb2743d1ce85404103155eb3f0855e998c5ab Mon Sep 17 00:00:00 2001 From: ll7 Date: Thu, 28 Mar 2024 07:50:53 +0100 Subject: [PATCH] Add method to create MapDefinition object from path and rectangle information --- robot_sf/nav/svg_map_parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robot_sf/nav/svg_map_parser.py b/robot_sf/nav/svg_map_parser.py index 449e46e..c390aac 100644 --- a/robot_sf/nav/svg_map_parser.py +++ b/robot_sf/nav/svg_map_parser.py @@ -141,7 +141,9 @@ def _get_svg_info(self): self.rect_info = rect_info def _info_to_mapdefintion(self) -> MapDefinition: - + """ + Create a MapDefinition object from the path and rectangle information. + """ width: float = float(self.svg_root.attrib.get('width')) height: float = float(self.svg_root.attrib.get('height')) obstacles: List[Obstacle] = []