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

Mujoco bad inertia test case #22414

Merged

Conversation

rpoyner-tri
Copy link
Contributor

@rpoyner-tri rpoyner-tri commented Jan 7, 2025

This change is Reviewable

Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

+(status: do not merge) +(status: do not review)
This is a follow-up (or maybe cherry-pick in-) to #22401.
FYI @RussTedrake @ggould-tri

Reviewable status: needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @rpoyner-tri)

Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

This contains a copy of #22401, so I've added the blocking labels until we figure out the workflow.

Reviewable status: needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @rpoyner-tri)

Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

Rebased onto newer master. -(status: do not merge) -(status: do not review) +(release notes: none)
+@RussTedrake for feature review.

Reviewable status: LGTM missing from assignee RussTedrake(platform), needs at least two assigned reviewers, labeled "do not merge" (waiting on @rpoyner-tri)

Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: LGTM missing from assignee RussTedrake(platform), needs at least two assigned reviewers

Copy link
Contributor

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee RussTedrake(platform), needs at least two assigned reviewers


multibody/parsing/test/detail_mujoco_parser_test.cc line 805 at r1 (raw file):

  DRAKE_EXPECT_THROWS_MESSAGE(
      AddModelFromString(xml, "test"),
      ".*\n.*\n.*\n.*\n.*CouldBePhysicallyValid.*");

Wait. I thought that I fixed this in #22401... no?

Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee RussTedrake(platform), needs at least two assigned reviewers


multibody/parsing/test/detail_mujoco_parser_test.cc line 805 at r1 (raw file):

Previously, RussTedrake (Russ Tedrake) wrote…

Wait. I thought that I fixed this in #22401... no?

You'd think, but this is a rather more evil mesh. I'll try to do some debug tracing to see why some uses miss this and other hit. Ultimately, the whole debug-only-throw regime is going to be an endless headache. Hence, issue #22415.

This tests the error path in the parser when even falling back to convex hull
can't save us.

Fix one control flow path bug in the parser found by this new test.
@rpoyner-tri rpoyner-tri force-pushed the mujoco-bad-inertia-test-case branch from 2c50572 to c95d4e9 Compare January 7, 2025 23:41
Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee RussTedrake(platform), needs at least two assigned reviewers


multibody/parsing/test/detail_mujoco_parser_test.cc line 805 at r1 (raw file):

Previously, rpoyner-tri (Rick Poyner (rico)) wrote…

You'd think, but this is a rather more evil mesh. I'll try to do some debug tracing to see why some uses miss this and other hit. Ultimately, the whole debug-only-throw regime is going to be an endless headache. Hence, issue #22415.

You'll see an added return statement in the parser in r2. This is the sort of thing that doesn't matter (yet) in production, because the public API doesn't allow any action for Error() other than throw. It does matter in tests. I've maintained things this way on purpose, to allow future us to do something different on Error().

Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

I'll still claim this is "release notes: none", since the one fix to actual parser code is (currently) only exercised in tests.

Reviewable status: 1 unresolved discussion, LGTM missing from assignee RussTedrake(platform), needs at least two assigned reviewers

Copy link
Contributor

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: 1 unresolved discussion, needs at least two assigned reviewers


multibody/parsing/test/detail_mujoco_parser_test.cc line 805 at r1 (raw file):

Previously, rpoyner-tri (Rick Poyner (rico)) wrote…

You'll see an added return statement in the parser in r2. This is the sort of thing that doesn't matter (yet) in production, because the public API doesn't allow any action for Error() other than throw. It does matter in tests. I've maintained things this way on purpose, to allow future us to do something different on Error().

Awesome. Thanks for catching and fixing that.

Copy link
Contributor

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

+xuchenhan-tri for platform review, please.

Reviewable status: 1 unresolved discussion, needs at least two assigned reviewers

Copy link
Contributor

@xuchenhan-tri xuchenhan-tri left a comment

Choose a reason for hiding this comment

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

:lgtm: Platform.

With r2, this is no longer a case a test bifurcation. Is that still a real issue? Do we want an example in this PR to help frame https://reviewable.io/reviews/RobotLocomotion/drake/22414?

Reviewed 1 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: 1 unresolved discussion

Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees RussTedrake(platform),xuchenhan-tri(platform)

Copy link
Contributor Author

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

Having seen the resolution here, I may rephrase #22415 somehow. We are so far able to work around it, but it still lurks, a monster in the deep.

Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees RussTedrake(platform),xuchenhan-tri(platform)

@rpoyner-tri rpoyner-tri merged commit 9639247 into RobotLocomotion:master Jan 8, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: none This pull request should not be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants