Open scpeters-test opened 7 years ago
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
Actually, I would argue it is better to completely remove error messages from readString
. If this function is being used to test if a string is valid SDF or not, the errors are spammy; returning false should be enough feedback for the user.
Original comment by Jordan Lack (Bitbucket: jordanlack).
Currently running into this problem. Not sure what's wrong with my SDF yet(gz sdf -k file.sdf
returns Check Complete
), but the errors I see made me believe it's parsing an URDF.
Original comment by Jordan Lack (Bitbucket: jordanlack).
After build from source and debugging this a bit, I think some more info needs to be put in whatever log msgs are generated from this failure. It helped me a lot by putting in the filename of the file(s) that are generating the error messages. Helped me know where to start looking
Original comment by Addisu Z. Taddese (Bitbucket: azeey, GitHub: azeey).
Another instance of this is just a file with a missing <sdf>
tag.
#!xml
<model name="husky">
<link name="base_link"/>
</model>
Running ign sdf -k
on this prints
Error: Could not find the 'robot' element in the xml file
at line 80 in /build/urdfdom-YMMa9X/urdfdom-1.0.0/urdf_parser/src/model.cpp
Error: SDF parsing the xml failed.
which seems to indicate that a <robot>
element is missing becaues it's trying to parse it as a URDF.
Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
When trying to parse an invalid SDF file, we get two error messages:
These messages are very misleading, because they suggest we're trying to parse an URDF file or a deprecated file, when in reality, it might simply be a malformed SDF file.
What happens is that the readString function first tries to load as an SDF, and if that fails, it silently tries to load the file as URDF.