-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 parser] Support parsing models from mujoco menagerie #20444
Comments
Towards RobotLocomotion#20232. These were required to achieve the status reported in RobotLocomotion#20444.
Towards RobotLocomotion#20232. These were required to achieve the status reported in RobotLocomotion#20444.
Towards RobotLocomotion#20232. Related to RobotLocomotion#20444. In RobotLocomotion#20232 we realized that the default eulerseq in MJCF is "xyz", which is NOT the standard eulerseq in urdf/sdf. This PR fixes a bug in which we assumed the wrong eulerseq by default, leading to incorrect kinematics in some parsed models. It also adds support for non-default eulerseq. It also adds a test so that we can readily visualize the parsed kinematics from the dm_control suite which are being used to test the parser.
Mesh defaults can be used to set the scale of the assets globally. "assetdir" is another way to set the "meshdir". Towards RobotLocomotion#20444.
Towards RobotLocomotion#20444. As discussed in https://drakedevelopers.slack.com/archives/C43KX47A9/p1697895553790089 , this PR: - avoids registering collision geometry for geom with contype==conaffinity==0 - avoids registering visual geometry for group > 2.
Towards RobotLocomotion#20232. Related to RobotLocomotion#20444. In RobotLocomotion#20232 we realized that the default eulerseq in MJCF is "xyz", which is NOT the standard eulerseq in urdf/sdf. This PR fixes a bug in which we assumed the wrong eulerseq by default, leading to incorrect kinematics in some parsed models. It also adds support for non-default eulerseq. It also adds a test so that we can readily visualize the parsed kinematics from the dm_control suite which are being used to test the parser.
Towards RobotLocomotion#20444. As discussed in https://drakedevelopers.slack.com/archives/C43KX47A9/p1697895553790089 , this PR: - avoids registering collision geometry for geom with contype==conaffinity==0 - avoids registering visual geometry for group > 2. Also implements, per the mujoco documentation, that zero-radius spheres are the default geometry if no other type/size is mentioned.
Towards RobotLocomotion#20232. Related to RobotLocomotion#20444. In RobotLocomotion#20232 we realized that the default eulerseq in MJCF is "xyz", which is NOT the standard eulerseq in urdf/sdf. This PR fixes a bug in which we assumed the wrong eulerseq by default, leading to incorrect kinematics in some parsed models. It also adds support for non-default eulerseq. It also adds a test so that we can readily visualize the parsed kinematics from the dm_control suite which are being used to test the parser.
Mesh defaults can be used to set the scale of the assets globally. "assetdir" is another way to set the "meshdir". Towards RobotLocomotion#20444.
Towards RobotLocomotion#20232. Related to RobotLocomotion#20444. In RobotLocomotion#20232 we realized that the default eulerseq in MJCF is "xyz", which is NOT the standard eulerseq in urdf/sdf. This PR fixes a bug in which we assumed the wrong eulerseq by default, leading to incorrect kinematics in some parsed models. It also adds support for non-default eulerseq. It also adds a test so that we can readily visualize the parsed kinematics from the dm_control suite which are being used to test the parser.
Mesh defaults can be used to set the scale of the assets globally. "assetdir" is another way to set the "meshdir". Towards RobotLocomotion#20444.
Mesh defaults can be used to set the scale of the assets globally. "assetdir" is another way to set the "meshdir". Towards RobotLocomotion#20444.
Towards #20232. Related to #20444. In #20232 we realized that the default eulerseq in MJCF is "xyz", which is NOT the standard eulerseq in urdf/sdf. This PR fixes a bug in which we assumed the wrong eulerseq by default, leading to incorrect kinematics in some parsed models. It also adds support for non-default eulerseq. It also adds a test so that we can readily visualize the parsed kinematics from the dm_control suite which are being used to test the parser.
Mesh defaults can be used to set the scale of the assets globally. "assetdir" is another way to set the "meshdir". Towards #20444. Co-Authored-By: Rick Poyner <[email protected]>
…20622) Towards #20444. As discussed in https://drakedevelopers.slack.com/archives/C43KX47A9/p1697895553790089 , this PR: - avoids registering collision geometry for geom with contype==conaffinity==0 - avoids registering visual geometry for group > 2. Also implements, per the mujoco documentation, that zero-radius spheres are the default geometry if no other type/size is mentioned.
See this (TRI internal) slack discussion for discussion about the extent to which we want to support "the legacy, non-standard, MuJoCo texture projection". |
And use it for testing the mujoco parser. Towards RobotLocomotion#20444 and RobotLocomotion#21648.
And use it for testing the mujoco parser. Towards RobotLocomotion#20444 and RobotLocomotion#21648.
And use it for testing the mujoco parser. Towards RobotLocomotion#20444 and RobotLocomotion#21648.
#21666 resolves some errors. I've just done a complete sweep through the menagerie and made a detailed list of errors/warnings above. |
The InertiaCalculator is not supposed to throw, but could still throw in debug mode based on how it was constructing an intermediate RotationalInertia. Now we skip the intermediate check and properly catch the error to display a helpful message in the parser. Towards RobotLocomotion#20444.
OK, I've addressed all of the small errors I know about. I've also create A few more things on my list before I close out this issue:
@jwnimmer-tri , @rpoyner-tri -- would appreciate any feedback you have on these. |
One nice tactic for situations like this would be have the parser's message hyperlink to a (new) anchor on https://drake.mit.edu/troubleshooting.html and then have that documentation explain in more detail (and link to work-arounds like that tool). We don't want the parser message to be too brief (it should still be self-contained and directly explain the problem), but IMO explaining work-arounds is best left to the website. Or alternatively, if there is a specific issue filed we can link to the issue instead of the troubleshooting, and the issue OP can contain an explanation of the workarounds, and people can subscribe to the issue to track progress. |
The InertiaCalculator is not supposed to throw, but could still throw in debug mode based on how it was constructing an intermediate RotationalInertia. Now we skip the intermediate check and properly catch the error to display a helpful message in the parser. Towards RobotLocomotion#20444.
The InertiaCalculator is not supposed to throw, but could still throw in debug mode based on how it was constructing an intermediate RotationalInertia. Now we skip the intermediate check and properly catch the error to display a helpful message in the parser. Towards RobotLocomotion#20444.
The InertiaCalculator is not supposed to throw, but could still throw in debug mode based on how it was constructing an intermediate RotationalInertia. Now we skip the intermediate check and properly catch the error to display a helpful message in the parser. Towards #20444.
The multibody parsers, in particular, had a habit of being very noisy, since if an unsupported element or attribute is used once it is likely used many times. This actually made it hard to visually inspect the output to see the unique set of unsupported tags. This change significantly improves the output for examples like in RobotLocomotion#20444.
Towards #20444; as discussed in #20444 (comment)
SGTM
No opinion.
I don't understand enough of the problem to offer an opinion. |
I've added mujoco texture support to |
Previously if a mesh was unsupported, then we only produceed a warning and ignored the associated geometry. Now it is an error. (We can use make_drake_compatible_mesh in the manipulation repo to batch convert stl to obj, etc). Also removes the "if you said stl but I can find a juxtaposed obj, I'll use it" logic. The non-uniform mesh warning was turned to an error (non-uniform meshes already threw an error, but later in the pipeline). All of the errors now reference http://drake.mit.edu/troubleshooting.html which points to make_drake_compatible_model. Resolves #20444. Hoorah!
Previously if a mesh was unsupported, then we only produceed a warning and ignored the associated geometry. Now it is an error. (We can use make_drake_compatible_mesh in the manipulation repo to batch convert stl to obj, etc). Also removes the "if you said stl but I can find a juxtaposed obj, I'll use it" logic. The non-uniform mesh warning was turned to an error (non-uniform meshes already threw an error, but later in the pipeline). All of the errors now reference http://drake.mit.edu/troubleshooting.html which points to make_drake_compatible_model. Resolves #20444. Hoorah!
The MuJoCo XML parser loads and properly displays all of the models in the DeepMind Control Suite (or will after my upcoming set of PRs) except for dog.xml, which is an outlier with tendons and skin, etc. I've opened this issue to keep track of the (sad) state of our current MuJoCo parser in loading the menagerie assets.
All of the models are now parsed in detail_mujoco_parser_examples_test.cc, with a clear demarkation about any remaining errors that prevent the model from loading properly.
A number of models still fail to load properly load the visual textures.
To reproduce, run e.g.
The text was updated successfully, but these errors were encountered: