Skip to content

Commit fa54639

Browse files
committed
Clarify deterministic sort buffer rebuild
Name the collision pipeline sort-key allocation invariant that requires rebuilding the pipeline when contact capacity grows.
1 parent 5e10d3c commit fa54639

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,8 +1889,9 @@ def _initialize_contacts(cls) -> None:
18891889
_need = _solver.get_max_contact_count()
18901890
if _need > NewtonManager._contacts.rigid_contact_max:
18911891
if cls._deterministic_mode != wp.DeterministicMode.NOT_GUARANTEED:
1892-
# The deterministic pipeline sizes its internal contact sort-key array at construction,
1893-
# so rebuild it when the solver requires more contacts instead of replacing Contacts alone.
1892+
# In deterministic mode, CollisionPipeline sizes _sort_key_array from rigid_contact_max at
1893+
# construction. Rebuild so the sort and contact buffers retain matching capacity; replacing
1894+
# Contacts alone would leave the sorting buffer undersized.
18941895
pipeline_args["rigid_contact_max"] = _need
18951896
NewtonManager._collision_pipeline = CollisionPipeline(cls._model, **pipeline_args)
18961897
NewtonManager._contacts = cls._collision_pipeline.contacts()

0 commit comments

Comments
 (0)