Closed GiulioRomualdi closed 1 year ago
Probably we can just run one of the following command as part of the generation process: https://stackoverflow.com/questions/16090869/how-to-pretty-print-xml-from-the-command-line .
If we want to do that as part of creo2urdf/idyntree, the function used by xmllint --format
is xmlSaveFormatFileEnc
, see https://github.com/GNOME/libxml2/blob/99cba4b37b1a39d477f1b5acf782c6bd2d16d0ee/xmllint.c#L2619C10-L2619C30 .
Checking the urdf what is missing the indentation are the tags related to the gazebo plugins
Looking at the libxml2
doc I found this solution.
See the resulting urdfs:
Task description
It would be nice to automatically indent the urdf file at the end of the generation. This will simplify the manual inspection of the model of the robot from file.
Definition of Done
A procedure to automatically indent the file once generated (or at the end of the generation)
cc @traversaro