Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Fixed
^^^^^

* Fixed :class:`~isaaclab_newton.physics.NewtonManager` sizing its contact buffer from the
collision pipeline alone when ``use_mujoco_contacts=False``, which raised
``MuJoCo naconmax (25600) exceeds contacts.rigid_contact_max (3840)`` at reset whenever the
MuJoCo Warp solver's ``nconmax`` demanded more contacts than the pipeline estimate. The
buffer now grows to the solver's maximum contact count, matching the
``use_mujoco_contacts=True`` path.
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,22 @@ def _initialize_contacts(cls) -> None:
NewtonManager._collision_pipeline = CollisionPipeline(cls._model, broad_phase="explicit")
if cls._contacts is None:
NewtonManager._contacts = cls._collision_pipeline.contacts()
# Grow the collision-pipeline contact buffer to the solver's max when the
# solver (e.g. MuJoCo/mujoco_warp) requires more contacts than the pipeline
# auto-estimate. Without this, the RSL-RL sensor path (use_mujoco_contacts=
# False) sizes _contacts from the pipeline alone and solver.update_contacts()
# raises when naconmax (nconmax * num_envs) exceeds rigid_contact_max.
# Mirrors the mjwarp_manager.py override for the use_mujoco_contacts=True path.
_solver = cls._solver
if _solver is not None and hasattr(_solver, "get_max_contact_count"):
_need = _solver.get_max_contact_count()
if _need > NewtonManager._contacts.rigid_contact_max:
NewtonManager._contacts = Contacts(
rigid_contact_max=_need,
soft_contact_max=0,
device=PhysicsManager._device,
requested_attributes=cls._model.get_requested_contact_attributes(),
)

# ----- Solver construction (subclass contract) ------------------------

Expand Down
Loading