You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Newton currently handles the special case where both values are zero by assigning collision_group=0, but other contype / conaffinity combinations are flattened into Newton's existing collision-group representation. This can introduce unintended contacts or remove required selective self-collisions.
Explicit MJCF <contact><pair> entries are a separate selection path: they intentionally bypass the automatic mask and parent-child filters, can retain otherwise zero-mask geoms, and can override contact parameters. Their import, selection, and parameter precedence must remain separate from automatic mask filtering.
The goal of this epic is to preserve MJCF collision behavior across Newton collision pipelines and SolverMuJoCo without regressing the existing collision-group API or replicated-model scalability.
Preserve the existing unbounded collision-group behavior; do not lower every existing group into a fixed 32-bit allocation without a compatible fallback.
Define mixed-model behavior when MJCF masks interact with Newton-authored shapes, global shapes, multiple imported assets, and existing collision groups.
Apply the mask predicate only to automatically generated pairs; explicit included pairs must retain MuJoCo's bypass semantics.
Export exact authored masks through SolverMuJoCo where possible, while retaining graph-coloring or another equivalent path for Newton-native collision groups.
2. Explicit contact pairs
Resolve <pair> default classes before collecting endpoints or parameters.
Apply pair-specific condim, friction, margin/gap, solref, solreffriction, and solimp to Newton-generated contacts.
Force explicit MuJoCo pairs into Newton's collision pipeline even when automatic collision groups, masks, parent-child filters, or sparse exclusions reject them.
Avoid duplicate candidate generation and preserve pair-specific precedence across multiple worlds.
3. Correctness coverage
Add semantic pair-matrix comparisons against compiled MuJoCo for:
asymmetric mask acceptance, including the floor/two-sphere reproduction;
multiple mask bits and zero-mask geoms;
selective self-collision within one articulation;
same-body, parent-child, fixed/world-parent, and welded-body cases;
<exclude> and explicit <pair> precedence;
explicit-pair default inheritance and zero-mask endpoints;
Explicit, NxN, and SAP broad phases;
native MuJoCo contacts and Newton-generated contacts;
multiple worlds and replicated models;
Newton models using more than 32 collision groups.
Fix the menagerie comparison path so unordered geom fields can be checked when appropriate, and compare effective pair eligibility when raw mask values are intentionally regenerated.
4. Performance and storage
Benchmark sparse and dense MJCF mask patterns at representative geom and world counts.
Measure import time, finalization time, collision-pipeline construction, filter-pair counts, and peak host memory.
If masks are compiled into sparse exclusions, provide a compact representation and prove that dense incompatibility matrices do not recreate the filter-pair memory failure addressed by Only emit collision filters between colliding shapes #3574.
Finish removal of unreachable filters involving non-colliding USD shapes so all importer paths follow the same storage invariants.
Summary
Newton does not yet preserve the full collision-selection semantics of MJCF models.
For automatically generated contacts, MuJoCo accepts a geom pair when:
Newton currently handles the special case where both values are zero by assigning
collision_group=0, but othercontype/conaffinitycombinations are flattened into Newton's existing collision-group representation. This can introduce unintended contacts or remove required selective self-collisions.Explicit MJCF
<contact><pair>entries are a separate selection path: they intentionally bypass the automatic mask and parent-child filters, can retain otherwise zero-mask geoms, and can override contact parameters. Their import, selection, and parameter precedence must remain separate from automatic mask filtering.The goal of this epic is to preserve MJCF collision behavior across Newton collision pipelines and
SolverMuJoCowithout regressing the existing collision-group API or replicated-model scalability.Goals
contype/conaffinitymasks.<pair>inclusion and contact-parameter overrides, including default-class inheritance.<exclude>, same-body, parent-child, world-parent, and articulation self-collision semantics.collision_group, mask filtering, andshape_collision_filter_pairs.SolverMuJoComask export and round-trip behavior.geom_contype/geom_conaffinityarray equality.Workstreams
1. Automatic mask filtering
mainafter the newer importer, broad-phase, filter-storage, and explicit-pair changes.SolverMuJoCowhere possible, while retaining graph-coloring or another equivalent path for Newton-native collision groups.2. Explicit contact pairs
<pair>default classes before collecting endpoints or parameters.condim, friction, margin/gap,solref,solreffriction, andsolimpto Newton-generated contacts.3. Correctness coverage
Add semantic pair-matrix comparisons against compiled MuJoCo for:
<exclude>and explicit<pair>precedence;Fix the menagerie comparison path so unordered geom fields can be checked when appropriate, and compare effective pair eligibility when raw mask values are intentionally regenerated.
4. Performance and storage
Active issues
contype/conaffinityfiltering is not implemented.Active pull requests
Landed groundwork
Completion criteria
SolverMuJoCocontact-generation paths agree on selection and precedence.