Delete sparsity structures from mjData, use the ones in mjModel

PiperOrigin-RevId: 795067950
Change-Id: If4f52e40ac49f7c6986b33ef9c8b534199dfd21a
This commit is contained in:
Yuval Tassa
2025-08-14 09:11:47 -07:00
committed by Copybara-Service
parent 7eb13777f8
commit 977f94e9df
25 changed files with 120 additions and 349 deletions
-15
View File
@@ -337,21 +337,6 @@ struct mjData_ {
mjtNum* qH; // L'*D*L factorization of modified M (nC x 1)
mjtNum* qHDiagInv; // 1/diag(D) of modified M (nv x 1)
// computed by mj_resetData
int* B_rownnz; // body-dof: non-zeros in each row (nbody x 1)
int* B_rowadr; // body-dof: address of each row in B_colind (nbody x 1)
int* B_colind; // body-dof: column indices of non-zeros (nB x 1)
int* M_rownnz; // reduced inertia: non-zeros in each row (nv x 1)
int* M_rowadr; // reduced inertia: address of each row in M_colind (nv x 1)
int* M_colind; // reduced inertia: column indices of non-zeros (nC x 1)
int* mapM2M; // index mapping from qM to M (nC x 1)
int* D_rownnz; // full inertia: non-zeros in each row (nv x 1)
int* D_rowadr; // full inertia: address of each row in D_colind (nv x 1)
int* D_diag; // full inertia: index of diagonal element (nv x 1)
int* D_colind; // full inertia: column indices of non-zeros (nD x 1)
int* mapM2D; // index mapping from qM to D (nD x 1)
int* mapD2M; // index mapping from D to qM (nM x 1)
// computed by mj_implicit/mj_derivative
mjtNum* qDeriv; // d (passive + actuator - bias) / d qvel (nD x 1)
-13
View File
@@ -700,19 +700,6 @@
X ( mjtNum, subtree_angmom, nbody, 3 ) \
XNV ( mjtNum, qH, nC, 1 ) \
X ( mjtNum, qHDiagInv, nv, 1 ) \
XNV ( int, B_rownnz, nbody, 1 ) \
XNV ( int, B_rowadr, nbody, 1 ) \
XNV ( int, B_colind, nB, 1 ) \
XNV ( int, M_rownnz, nv, 1 ) \
XNV ( int, M_rowadr, nv, 1 ) \
XNV ( int, M_colind, nC, 1 ) \
XNV ( int, mapM2M, nC, 1 ) \
XNV ( int, D_rownnz, nv, 1 ) \
XNV ( int, D_rowadr, nv, 1 ) \
XNV ( int, D_diag, nv, 1 ) \
XNV ( int, D_colind, nD, 1 ) \
XNV ( int, mapM2D, nD, 1 ) \
XNV ( int, mapD2M, nM, 1 ) \
XNV ( mjtNum, qDeriv, nD, 1 ) \
XNV ( mjtNum, qLU, nD, 1 ) \
X ( mjtNum, actuator_force, nu, 1 ) \