From 0e21593961fd2943ffbb11f2ca461d6b5af1ea49 Mon Sep 17 00:00:00 2001 From: giulero Date: Wed, 12 Jun 2024 12:01:32 +0200 Subject: [PATCH] Insert back comment on urdf_parser_py fix --- src/adam/model/std_factories/std_model.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/adam/model/std_factories/std_model.py b/src/adam/model/std_factories/std_model.py index 7bb7f83d..d61bc6d2 100644 --- a/src/adam/model/std_factories/std_model.py +++ b/src/adam/model/std_factories/std_model.py @@ -37,6 +37,13 @@ def __init__(self, path: str, math: SpatialMath): if not path.exists(): raise FileExistsError(path) + # Read URDF, but before passing it to urdf_parser_py get rid of all sensor tags + # sensor tags are valid elements of URDF (see ), + # but they are ignored by urdf_parser_py, that complains every time it sees one. + # As there is nothing to be fixed in the used models, and it is not useful + # 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 with open(path, "r") as xml_file: xml_string = xml_file.read() xml_string_without_sensors_tags = urdf_remove_sensors_tags(xml_string)