Skip to content

Commit

Permalink
Use qLDiagInv instead of qLD in engine_vis_interact.c
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 734399015
Change-Id: I97c80a8b25dbd40e86560c328cc786a0bed6a2d1
  • Loading branch information
yuvaltassa authored and copybara-github committed Mar 7, 2025
1 parent 109a223 commit a816ca6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/engine/engine_vis_interact.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,7 @@ void mjv_initPerturb(const mjModel* m, mjData* d, const mjvScene* scn, mjvPertur

// compute average spatial inertia at selection point
for (int i=0; i < nv; i++) {
int diag = d->M_rowadr[i] + d->M_rownnz[i] - 1;
sqrtInvD[i] = 1 / mju_sqrt(d->qLD[diag]);
sqrtInvD[i] = mju_sqrt(d->qLDiagInv[i]);
}
mj_jac(m, d, jac, NULL, selpos, sel);
mj_solveM2(m, d, jacM2, jac, sqrtInvD, 3);
Expand Down

0 comments on commit a816ca6

Please sign in to comment.