Deprecate mju_rotVecMat and mju_rotVecMatT in favor of mju_mulMatVec3 and mju_mulMatTVec3.
These functions names and argument ordering are more consistent with the rest of the API. PiperOrigin-RevId: 643788290 Change-Id: I783eda8021b80b82098e23ed95669b102bb82508
This commit is contained in:
committed by
Copybara-Service
parent
739512a0e4
commit
6067048537
@@ -328,12 +328,12 @@ void mj_sensorPos(const mjModel* m, mjData* d) {
|
||||
get_xpos_xmat(d, reftype, refid, i, &xpos_ref, &xmat_ref);
|
||||
if (type == mjSENS_FRAMEPOS) {
|
||||
mju_sub3(rvec, xpos, xpos_ref);
|
||||
mju_rotVecMatT(d->sensordata+adr, rvec, xmat_ref);
|
||||
mju_mulMatTVec3(d->sensordata+adr, xmat_ref, rvec);
|
||||
} else {
|
||||
// offset = (0 or 1 or 2) for (x or y or z)-axis sensors, respectively
|
||||
int offset = type - mjSENS_FRAMEXAXIS;
|
||||
mjtNum axis[3] = {xmat[offset], xmat[offset+3], xmat[offset+6]};
|
||||
mju_rotVecMatT(d->sensordata+adr, axis, xmat_ref);
|
||||
mju_mulMatTVec3(d->sensordata+adr, xmat_ref, axis);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -616,8 +616,8 @@ void mj_sensorVel(const mjModel* m, mjData* d) {
|
||||
mju_addTo3(rel_vel+3, cross);
|
||||
|
||||
// project into reference frame
|
||||
mju_rotVecMatT(xvel, rel_vel, xmat_ref);
|
||||
mju_rotVecMatT(xvel+3, rel_vel+3, xmat_ref);
|
||||
mju_mulMatTVec3(xvel, xmat_ref, rel_vel);
|
||||
mju_mulMatTVec3(xvel+3, xmat_ref, rel_vel+3);
|
||||
}
|
||||
|
||||
// copy linear or angular component
|
||||
|
||||
Reference in New Issue
Block a user