Merge pull request #3250 from gholmes829:fix/accumulate-inertia-com-frame-order

PiperOrigin-RevId: 951758696
Change-Id: I99f3502b15b84e2fffc58f4b608844148479ca3e
This commit is contained in:
Copybara-Service
2026-07-21 16:21:08 -07:00
2 changed files with 34 additions and 3 deletions
+3 -3
View File
@@ -2543,9 +2543,9 @@ void mjCBody::AccumulateInertia(const mjsBody* other, mjsBody* result) {
// body_ipose = body_pose * body_ipose
double other_ipos[3];
double other_iquat[4];
mjuu_copyvec(other_ipos, other->ipos, 3);
mjuu_copyvec(other_iquat, other->iquat, 4);
mjuu_frameaccum(other_ipos, other_iquat, other->pos, other->quat);
mjuu_copyvec(other_ipos, other->pos, 3);
mjuu_copyvec(other_iquat, other->quat, 4);
mjuu_frameaccum(other_ipos, other_iquat, other->ipos, other->iquat);
// organize data
double mass[2] = {