Put sparsity structures in mjModel, don't use them yet.
PiperOrigin-RevId: 795032051 Change-Id: I75c69e881980ff9c308acf00bb3a65f4b2ef12f5
This commit is contained in:
committed by
Copybara-Service
parent
f077fd00a9
commit
7eb13777f8
@@ -883,6 +883,26 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=ValueType(name='int'),
|
||||
doc='number of joints',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nM',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse inertia matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nB',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse body-dof matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nC',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse reduced dof-dof matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nD',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse dof-dof matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='ngeom',
|
||||
type=ValueType(name='int'),
|
||||
@@ -1188,26 +1208,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=ValueType(name='int'),
|
||||
doc='number of slots in the names hash map',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nM',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse inertia matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nB',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse body-dof matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nC',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse reduced dof-dof matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nD',
|
||||
type=ValueType(name='int'),
|
||||
doc='number of non-zeros in sparse dof-dof matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nJmom',
|
||||
type=ValueType(name='int'),
|
||||
@@ -4605,6 +4605,110 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
doc='paths to assets, 0-terminated',
|
||||
array_extent=('npaths',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='B_rownnz',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='body-dof: non-zeros in each row',
|
||||
array_extent=('nbody',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='B_rowadr',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='body-dof: row addresses',
|
||||
array_extent=('nbody',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='B_colind',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='body-dof: column indices',
|
||||
array_extent=('nB',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='M_rownnz',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='reduced inertia: non-zeros in each row',
|
||||
array_extent=('nv',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='M_rowadr',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='reduced inertia: row addresses',
|
||||
array_extent=('nv',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='M_colind',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='reduced inertia: column indices',
|
||||
array_extent=('nC',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='mapM2M',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='index mapping from qM to M',
|
||||
array_extent=('nC',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='D_rownnz',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='full inertia: non-zeros in each row',
|
||||
array_extent=('nv',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='D_rowadr',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='full inertia: row addresses',
|
||||
array_extent=('nv',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='D_diag',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='full inertia: index of diagonal element',
|
||||
array_extent=('nv',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='D_colind',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='full inertia: column indices',
|
||||
array_extent=('nD',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='mapM2D',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='index mapping from qM to D',
|
||||
array_extent=('nD',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='mapD2M',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='index mapping from D to qM',
|
||||
array_extent=('nM',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='signature',
|
||||
type=ValueType(name='uint64_t'),
|
||||
|
||||
Reference in New Issue
Block a user