Repository navigation
Conversation
MuJoCo Warp compiles out its missing-mesh broadphase guard when geom_dataid has a single world row, causing unfilled mesh slots (dataid == -1) to collide at the origin when num_envs == 1. Pad a duplicate row onto wp_model.geom_dataid in that case while slicing TorchArray back to nworld so PyTorch and viewer consumers still see shape (1, ngeom). Related to mujocolab#1231
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
num_envs == 1and aVariantEntityCfgleaves mesh geom slots unfilled (geom_dataid == -1) in that world, MuJoCo Warp 4.0.1 compiles out its_mesh_missingbroadphase guard becausewp_model.geom_dataid.shape[0] == 1, causing unfilled slots to collide at the origin as phantom geoms. This PR pads a duplicate second row ontowp_model.geom_dataidonly in that single-world unfilled-slot case so_mesh_missingstays active in Warp kernels while slicing theTorchArraywrapper back to[:nworld]so PyTorch and viewer callers continue to observe shape(1, ngeom).Fixes #1231