Add mjData.nA the number of non-zeros in the constraint inverse inertia matrix.
PiperOrigin-RevId: 714076988 Change-Id: I4c323a6e81dfb23f7972b662719bbcb688bacf4a
This commit is contained in:
committed by
Copybara-Service
parent
ca6162e6d0
commit
2409a6e537
@@ -1943,7 +1943,7 @@ static int mj_nc(const mjModel* m, mjData* d, int* nnz) {
|
||||
// driver: call all functions above
|
||||
void mj_makeConstraint(const mjModel* m, mjData* d) {
|
||||
// clear sizes
|
||||
d->ne = d->nf = d->nl = d->nefc = d->nJ = 0;
|
||||
d->ne = d->nf = d->nl = d->nefc = d->nJ = d->nA = 0;
|
||||
|
||||
// disabled or Jacobian not allocated: return
|
||||
if (mjDISABLED(mjDSBL_CONSTRAINT)) {
|
||||
@@ -1960,6 +1960,7 @@ void mj_makeConstraint(const mjModel* m, mjData* d) {
|
||||
d->nJ = nefc_allocated * m->nv;
|
||||
}
|
||||
d->nefc = nefc_allocated;
|
||||
d->nA = d->nefc * d->nefc;
|
||||
|
||||
// allocate efc arrays on arena
|
||||
if (!arenaAllocEfc(m, d)) {
|
||||
|
||||
@@ -1893,6 +1893,7 @@ static void _resetData(const mjModel* m, mjData* d, unsigned char debug_value) {
|
||||
d->nl = 0;
|
||||
d->nefc = 0;
|
||||
d->nJ = 0;
|
||||
d->nA = 0;
|
||||
d->nisland = 0;
|
||||
|
||||
// clear global properties
|
||||
|
||||
Reference in New Issue
Block a user