Proposal
Update Newton RigidObjectCollection path matching so it does not merge specific body paths into a broad wildcard. _build_combined_pattern() should not turn sibling paths such as /World/envs/env_*/Object_A, /World/envs/env_*/Object_B, and /World/envs/env_*/Object_C into /World/envs/env_*/* when that pattern can also match other rigid bodies.
The fix should make the Newton view bind only the configured collection bodies, or raise a clear error when exact matching is not possible.
Motivation
The current wildcard merge can include unrelated rigid bodies in the Newton ArticulationView. This breaks the collection's env/body counts and causes a runtime shape error.
Reproduction:
./isaaclab.sh -p scripts/demos/multi_asset.py --visualizer newton --physics newton_mjwarp --num_envs 1024
The same failure also reproduces with --visualizer none, so the issue is not specific to the Newton GL visualizer.
Observed failure:
RuntimeError: The size of tensor a (1706) must match the size of tensor b (1024) at non-singleton dimension 0
The demo reset expects num_envs == 1024, but Newton reports num_instances == 1706 for the collection:
scene.env_origins: (1024, 3)
root_view.count: 5120
body_link_pose_w: (1024, 5, 7)
default_body_pose: (1706, 3, 7)
collection.num_bodies: 3
collection.num_instances: 1706
Configured collection paths:
/World/envs/env_.*/Object_A
/World/envs/env_.*/Object_B
/World/envs/env_.*/Object_C
Current combined pattern:
That pattern matches five bodies per env:
/World/envs/env_<i>/Robot/base
/World/envs/env_<i>/Object
/World/envs/env_<i>/Object_A
/World/envs/env_<i>/Object_B
/World/envs/env_<i>/Object_C
Only the last three belong to the collection.
Build Info
Checklist
Proposal
Update Newton
RigidObjectCollectionpath matching so it does not merge specific body paths into a broad wildcard._build_combined_pattern()should not turn sibling paths such as/World/envs/env_*/Object_A,/World/envs/env_*/Object_B, and/World/envs/env_*/Object_Cinto/World/envs/env_*/*when that pattern can also match other rigid bodies.The fix should make the Newton view bind only the configured collection bodies, or raise a clear error when exact matching is not possible.
Motivation
The current wildcard merge can include unrelated rigid bodies in the Newton
ArticulationView. This breaks the collection's env/body counts and causes a runtime shape error.Reproduction:
The same failure also reproduces with
--visualizer none, so the issue is not specific to the Newton GL visualizer.Observed failure:
The demo reset expects
num_envs == 1024, but Newton reportsnum_instances == 1706for the collection:Configured collection paths:
Current combined pattern:
That pattern matches five bodies per env:
Only the last three belong to the collection.
Build Info
Checklist