Skip to content

Commit

Permalink
Fix missing close of file
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Dec 15, 2023
1 parent afac512 commit e60db39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/adam/model/std_factories/std_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def __init__(self, path: str, math: SpatialMath):
# to have a useless and noisy warning, let's remove before hands all the sensor elements,
# that anyhow are not parser by urdf_parser_py or adam
# See https://github.com/ami-iit/ADAM/issues/59
xml_string = open(path, 'r').read()
xml_file = open(path, 'r')
xml_string = xml_file.read()
xml_file.close()
xml_string_without_sensors_tags = urdf_remove_sensors_tags(xml_string)
self.urdf_desc = urdf_parser_py.urdf.URDF.from_xml_string(xml_string_without_sensors_tags)
self.name = self.urdf_desc.name
Expand Down

0 comments on commit e60db39

Please sign in to comment.