Open mmoerdijk opened 4 years ago
Hm, yeah, that's a problem. @sloretz it looks like we have a systems type problem here in that xacro and urdf_parser_py are no longer working together nicely. I don't have a great way to solve this; should we think about reverting 22f3a60ae683a24a1372368dbcc739c01eb41b64 ?
I noticed that the xacro command under melodic adds the encoding attribute to the xml tag of the generated urdf file. This gives problems with the underlying lxml parser. That complaints about:
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
Here by a minimal example to reproduce this error under ros melodic:
The version without the encoding attribute works correctly
I noticed this when using the
URDF.from_parameter_server()
command that now no longer works (It still works with ros kinetic)A simple solution would be to remove the encoding tag from the parameter string before passing it to the parser. But im not sure if this is the way to go. If you agree with this solution i can open a PR to fix this.