Commit f2e246b
Make sure that
The `physics.step` function in `dm_control` runs `mj_step2` followed by `mj_step1`. This leaves the physics in a state where `mj_fwdPosition` has been called, and therefore the contact frames have been updated, but`mj_fwdConstraint` has not, and therefore the contact forces are stale. This change forces the portion of `mj_step2` that is needed to guarantee correct contact forces to be always be run as part of the `contact_force` function.
Fixes google-deepmind/mujoco#13.
PiperOrigin-RevId: 490922782
Change-Id: I0a3998ff4759aee70321a636c189e44de2f3eca5contact_force always returns the correct values.1 parent e3d4c0a commit f2e246b
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
524 | 530 | | |
525 | 531 | | |
526 | 532 | | |
| |||
0 commit comments