TECHNOLOGY

MuJoCo collision masks: check both directions and explicit contact pairs

In this article
THE QUICK TAKE

Dynamic contact filtering accepts either compatible mask direction, while explicit pair selection can bypass that filter; record how the pair was admitted.

A one-sided edit may leave a compatible direction

A model developer changes one geom’s contype and still observes a contact with another geom. The contact is labeled an engine bug because the edited mask appears disabled. First reconstruct the complete pair rule. Contact compatibility is not a single attribute of one object. Both geom records contribute, and a separately authored contact pair can follow a different admission path. Inspect those inputs before deleting geometry or disabling collision computation globally.

Read the rule as either direction

The collision-filtering reference accepts dynamically generated pairs when either geom’s contype shares a bit with the other geom’s conaffinity. It is an OR between the directional intersections, not a requirement that both pass. Clearing one participating field may leave the reverse intersection nonempty. The XML reference defines these as masks rather than ordinal category labels. Comparing category numbers for equality therefore does not reproduce the documented compatibility rule.

Inspect predefined pairs separately

The collision pipeline also allows explicitly named geom pairs. The inspected documentation distinguishes their treatment from pairs selected through dynamic body-pair generation and says the compatibility filter is bypassed for explicit pairs. Thus making the dynamic mask test fail does not alone demonstrate complete exclusion of a named pair. Retain the contact definition and other selection settings. Do not extend this observation into a claim that every collision filter or unsupported geometry combination can be bypassed.

Propose a pair-admission matrix

A proposed fixture should use a simple geometrically intersecting pair and independently vary the two directional mask intersections. Include neither direction compatible, only one direction compatible and both compatible. Then add an explicit pair while keeping the dynamic-mask rejection case. Inspect pair identity and detection results at the same declared state. This isolates admission from geometry changes or contact-force activation. No collision test or performance measurement was executed for this article.

Require an explainable inclusion path

Acceptance evidence should retain geom names, both masks, explicit pair inventory and the versioned collision configuration. A visual group, hidden mesh or transparent material is not sufficient evidence about contact admission. Conversely, contact absence should be diagnosed through geometry, supported collider and the relevant selection path rather than attributed automatically to masks. The useful report identifies which exact rule admitted or excluded the intended pair under the tested model configuration.

Separate selection from model completeness

Admitted contacts still depend on the collision representation and force model. The PartNet loading guide addresses geometry completeness, while software reproducibility supports preserving selection settings. Here the specific result is correct interpretation of the mask predicate and explicit-pair scope. It does not prove physical clearance, a calibrated contact response or that every intended object was present in the loaded twin.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles