Skip to content

Commit 658e170

Browse files
authored
Merge pull request #390 from YilingQiao/yiling/241229_contact_island_bug
[BUG FIX] Fix contact island bug
2 parents 19ab4c9 + 172f6ed commit 658e170

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

genesis/engine/solvers/rigid/contact_island.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def __init__(self, collider):
2525
dtype=gs.ti_int, shape=self.solver._batch_shape((self.collider._max_contact_pairs))
2626
)
2727

28-
self.constraint_id = ti.field(dtype=gs.ti_int, shape=self.solver._batch_shape((self.solver.n_entities)))
28+
self.constraint_id = ti.field(
29+
dtype=gs.ti_int, shape=self.solver._batch_shape((self.collider._max_contact_pairs * 2))
30+
)
2931

3032
self.entity_edge = struct_agg_list.field(
3133
shape=self.solver._batch_shape(self.solver.n_entities), needs_grad=False, layout=ti.Layout.SOA

0 commit comments

Comments
 (0)