In mj_sensorAcc, flip condition for triggering call to mj_rnePostConstraint to enumerate sensors that require the call rather than eliminating those that do not.

PiperOrigin-RevId: 579804886
Change-Id: I1093fcfa66e637015cd702d7e59ec3bcddc670ef
This commit is contained in:
Yuval Tassa
2023-11-06 04:51:10 -08:00
committed by Copybara-Service
parent 19de607ec8
commit a6687885a5
+6 -6
View File
@@ -688,12 +688,12 @@ void mj_sensorAcc(const mjModel* m, mjData* d) {
adr = m->sensor_adr[i];
// call mj_rnePostConstraint when first relevant sensor is encountered
if (rnePost == 0 &&
type != mjSENS_TOUCH &&
type != mjSENS_ACTUATORFRC &&
type != mjSENS_JOINTACTFRC &&
type != mjSENS_JOINTLIMITFRC &&
type != mjSENS_TENDONLIMITFRC) {
if (rnePost == 0 && (type == mjSENS_ACCELEROMETER ||
type == mjSENS_FORCE ||
type == mjSENS_TORQUE ||
type == mjSENS_FRAMELINACC ||
type == mjSENS_FRAMEANGACC ||
type == mjSENS_USER)) {
// compute cacc, cfrc_int, cfrc_ext
mj_rnePostConstraint(m, d);