Repository navigation
Commit fdf1412
Report gravity in accelerometer and framelinacc on static and mocap bodies
`mj_objectAcceleration` returned zero for dof-less (static and mocap) bodies, dropping the gravitational proper acceleration that `mj_rnePostConstraint` already stores in `cacc` for every body. Sensors on such bodies now read like a dynamic body at rest, matching MJX and MuJoCo Warp, which already did this.
- `mj_objectAcceleration`: always transform `cacc`, only skip the Coriolis term for dof-less bodies (zero velocity).
- Test accelerometer, framelinacc and frameangacc on world, static and mocap bodies, with the sleep filter active.
- Changelog entry.
PiperOrigin-RevId: 1012012486
Change-Id: I1b8b1574c5c53f45c7a7802439bfad24478470c91 parent 10ba77b commit fdf1412
3 files changed
Lines changed: 63 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | | - | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
1276 | 1279 | | |
1277 | | - | |
1278 | 1280 | | |
1279 | 1281 | | |
1280 | 1282 | | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | 1283 | | |
1285 | 1284 | | |
1286 | 1285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2046 | 2046 | | |
2047 | 2047 | | |
2048 | 2048 | | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
2049 | 2105 | | |
2050 | 2106 | | |
2051 | 2107 | | |
| |||
0 commit comments