Skip to content

[parsing] Use DiagnosticPolicy for model directives errors - #24938

Open
castor639 wants to merge 1 commit into
RobotLocomotion:masterfrom
castor639:directives-diagnostic-policy
Open

[parsing] Use DiagnosticPolicy for model directives errors#24938
castor639 wants to merge 1 commit into
RobotLocomotion:masterfrom
castor639:directives-diagnostic-policy

Conversation

@castor639

@castor639 castor639 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Wire model directives loading and parsing to DiagnosticPolicy so errors follow the same non-fatal policy path as URDF and SDFormat. IsValid() schema checks report via the policy, and parser throws are replaced with diagnostic.Error() plus continue/return. Add tests that a non-fatal error policy does not crash the parser.

Fixes #18052


This change is Reviewable

Wire model directives loading and parsing to DiagnosticPolicy so
errors follow the same non-fatal policy path as URDF and SDFormat.
IsValid() schema checks report via the policy, and parser throws are
replaced with diagnostic.Error() plus continue/return. Add tests that
a non-fatal error policy does not crash the parser.

Fixes RobotLocomotion#18052
@ggould-tri ggould-tri added the component: multibody parsing Loading models into MultibodyPlant label Sep 1, 2026

@ggould-tri ggould-tri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+(component: multibody parsing) Assigning +a:@rpoyner-tri as parsers lead. Feel free to re-delegate.

@ggould-tri made 1 comment.
Reviewable status: LGTM missing from assignee rpoyner-tri(platform), needs at least two assigned reviewers, missing label for release notes (waiting on rpoyner-tri).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: multibody parsing Loading models into MultibodyPlant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model directives parsing should use the diagnostic policy mechanism for errors and warnings

3 participants