Skip to content

Commit af84a6b

Browse files
YilingQiaoACMLCZH
authored andcommitted
[Migration] forawrd dynamics (Genesis-Embodied-AI#1406)
1 parent 0f0f6d2 commit af84a6b

File tree

4 files changed

+2111
-1103
lines changed

4 files changed

+2111
-1103
lines changed

genesis/engine/solvers/rigid/array_class.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ def __init__(self, solver, n_dofs: int, n_entities: int, n_geoms: int, _B: int,
4343
# =========================================== Collider ===========================================
4444

4545

46+
@ti.data_oriented
47+
class ConstraintState:
48+
"""
49+
Class to store the mutable constraint data, all of which type is [ti.fields].
50+
"""
51+
52+
def __init__(self, solver):
53+
f_batch = solver._batch_shape
54+
self.n_constraints = ti.field(dtype=gs.ti_int, shape=f_batch())
55+
56+
4657
@ti.data_oriented
4758
class ColliderState:
4859
"""

0 commit comments

Comments
 (0)