Add constraint island discovery

PiperOrigin-RevId: 557067599
Change-Id: Ic41e1d0efef02b7a79142518afe49cf9d4e74725
This commit is contained in:
Yuval Tassa
2023-08-15 02:29:26 -07:00
committed by Copybara-Service
parent e4dddea42a
commit 3e034e38b2
40 changed files with 1557 additions and 468 deletions
+95 -3
View File
@@ -813,7 +813,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
StructFieldDecl(
name='nbvh',
type=ValueType(name='int'),
doc='number of total bounding volumes in all bodies',
doc='number of bounding volumes in all bodies',
),
StructFieldDecl(
name='njnt',
@@ -1070,6 +1070,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='int'),
doc='number of non-zeros in sparse body-dof matrix',
),
StructFieldDecl(
name='ntree',
type=ValueType(name='int'),
doc='number of kinematic trees under world body',
),
StructFieldDecl(
name='nemax',
type=ValueType(name='int'),
@@ -1103,7 +1108,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
StructFieldDecl(
name='npluginstate',
type=ValueType(name='int'),
doc='number of fields in the plugin state vector',
doc='number of fields in plugin state vector',
),
StructFieldDecl(
name='nbuffer',
@@ -1202,6 +1207,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='start addr of dofs; -1: no dofs (nbody x 1)',
),
StructFieldDecl(
name='body_treeid',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc="id of body's kinematic tree; -1: static (nbody x 1)",
),
StructFieldDecl(
name='body_geomnum',
type=PointerType(
@@ -1482,6 +1494,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc="id of dof's parent; -1: none (nv x 1)",
),
StructFieldDecl(
name='dof_treeid',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc="id of dof's kinematic tree (nv x 1)",
),
StructFieldDecl(
name='dof_Madr',
type=PointerType(
@@ -3578,6 +3597,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='int'),
doc='number of detected contacts',
),
StructFieldDecl(
name='nisland',
type=ValueType(name='int'),
doc='number of detected constraint islands',
),
StructFieldDecl(
name='time',
type=ValueType(name='mjtNum'),
@@ -4291,6 +4315,48 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='inverse constraint mass (nefc x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='island_dofadr',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='address of first dof in island (nisland x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='island_efcadr',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='address of first constraint in island (nisland x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='dof_island',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='island id of this dof; -1: none (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='dof_islandnext',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='address of next dof in island; -1: last or none (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='efc_island',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='island id of this constraint (nefc x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='efc_islandnext',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='address of next constraint in island; -1: last (nefc x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='efc_AR_rownnz',
type=PointerType(
@@ -4808,7 +4874,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
name='flags',
type=ArrayType(
inner_type=ValueType(name='mjtByte'),
extents=(25,),
extents=(26,),
),
doc='visualization flags (indexed by mjtVisFlag)',
),
@@ -6195,6 +6261,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='int'),
doc='',
),
StructFieldDecl(
name='nisland',
type=ValueType(name='int'),
doc='',
),
StructFieldDecl(
name='time',
type=ValueType(name='mjtNum'),
@@ -6375,6 +6446,27 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='',
),
StructFieldDecl(
name='island_dofadr',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='',
),
StructFieldDecl(
name='dof_island',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='',
),
StructFieldDecl(
name='efc_island',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='',
),
StructFieldDecl(
name='contact',
type=PointerType(