corrections

This commit is contained in:
Vyankatesh
2024-02-26 12:03:42 +05:30
parent 41e41b538d
commit 063edf5a09
+3 -2
View File
@@ -776,8 +776,7 @@ int mj_jacSum(const mjModel* m, mjData* d, int* chain,
// compute subtree angular momentum matrix // compute subtree angular momentum matrix
void mj_subtreeAngMomMat(const mjModel *m, mjData *d, mjtNum *agm, int body) void mj_subtreeAngMomMat(const mjModel *m, mjData *d, mjtNum *agm, int body) {
{
int nv = m->nv; int nv = m->nv;
mj_markStack(d); mj_markStack(d);
mjtNum* jacp_b = mj_stackAllocNum(d, 3*nv); mjtNum* jacp_b = mj_stackAllocNum(d, 3*nv);
@@ -841,6 +840,8 @@ void mj_subtreeAngMomMat(const mjModel *m, mjData *d, mjtNum *agm, int body)
mju_addTo(agm, term1, 3*nv); mju_addTo(agm, term1, 3*nv);
mju_addTo(agm, term2, 3*nv); mju_addTo(agm, term2, 3*nv);
} }
mj_freeStack(d);
} }