Skip to content

Commit

Permalink
In mj_sensorAcc, flip condition for triggering call to `mj_rnePostC…
Browse files Browse the repository at this point in the history
…onstraint` to enumerate sensors that require the call rather than eliminating those that do not.

PiperOrigin-RevId: 579804886
Change-Id: I1093fcfa66e637015cd702d7e59ec3bcddc670ef
  • Loading branch information
yuvaltassa authored and copybara-github committed Nov 6, 2023
1 parent 19de607 commit a668788
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/engine/engine_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a668788

Please sign in to comment.