diff --git a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py index a0228b1a..f713bfe8 100644 --- a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py +++ b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py @@ -36,7 +36,9 @@ def __init__(self): Debug.log("Grid Edge Size: %d" % self.grid_edge_size, DebugMessageType.INFO) # Create copy of osm file - shutil.copy(self.input_lanelet2_map_path, self.input_lanelet2_map_path.replace(".osm", "_temp.osm")) + shutil.copy( + self.input_lanelet2_map_path, self.input_lanelet2_map_path.replace(".osm", "_temp.osm") + ) self.input_lanelet2_map_path = self.input_lanelet2_map_path.replace(".osm", "_temp.osm") # Complete if missing "version" element in lanelet2_map.osm @@ -64,7 +66,7 @@ def __init__(self): xml_tool.complete_missing_elements( self.input_lanelet2_map_path, os.path.join(self.output_folder_path, "lanelet2_map.osm") ) - + # Remove temp osm file os.remove(self.input_lanelet2_map_path) diff --git a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py index b80d1d7b..cb469e32 100644 --- a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py +++ b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py @@ -149,7 +149,7 @@ def complete_missing_version_tag(input_osm_file_path: str): if root_element != "version": add_version = True break - + if add_version: element.set("version", "1")