-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove robot not found error when parsing fails (#1290)
When a file fails to be parsed as SDF the parser.cc tries to parse it as URDF generating the following error: ``` Error: Could not find the 'robot' element in the xml file at line 109 in ./urdf_parser/src/model.cpp ``` This becomes confusing the file could just be a malformed SDF. This PR adds a check for the robot tag before attempting the parse in order to avoid the misleading error. It also adds an error in case it's not found indicating that the file could not be identified as SDF nor URDF. --------- Signed-off-by: Marco A. Gutierrez <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
- Loading branch information
Showing
2 changed files
with
129 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters