Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error handling in material parsing #122

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Feb 8, 2019

We should consider the return value of parseMaterial() to react to plain parsing errors.
Redefining the same material again should be accepted though. This often occurs when composing URDFs via xacro.

@rhaschke
Copy link
Contributor Author

rhaschke commented Feb 8, 2019

@clalancette I just noticed that you also worked on more restrictive material parsing in #104.
I will rebase my change onto your cleanup branch.

@rhaschke
Copy link
Contributor Author

rhaschke commented Feb 8, 2019

@scpeters Would be great to get #104 and this extension merged (and released).

@rhaschke
Copy link
Contributor Author

Ping

@rhaschke
Copy link
Contributor Author

@scpeters, @clalancette, @sloretz
I remember that we discussed at some ROSCon, years ago, whether to still improve urdfdom. While at that time urdfdom was claimed to be dead and should be replaced with some alternative, e.g. Gazebo's file format, it turns out that the package has seen lots of releases in past years (both into ROS1 and ROS2) and is still very alive.
Would be great to see the list of pending PRs like this getting merged (or at least discussed).

clalancette and others added 5 commits September 22, 2022 14:36
There are 2 main things done here:

1.  Check the return value from parseMaterial, parseLink, and
    parseJoint.  While these can throw a ParseError exception,
    most often they return false when they fail to parse.
2.  Revamp the error checking around those calls so that the
    code is indented a lot less.  It is much easier to read this way.

Signed-off-by: Chris Lalancette <[email protected]>
Just make the code flow easier to understand.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
We should consider the return value of parseMaterial().
Redefining the same material again, should be accepted.
This often occurs when composing URDFs via xacro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants