Commit a0ad877
authored
fix(humanoid): apply standing-env zeroing in resample_commands (#777)
The standing-command zeroing wrote `cfg.value[env_ids][final_env_ids, :] = 0.0`,
but `cfg.value[env_ids]` is advanced indexing (a copy), so the write was
discarded — the rel_standing_envs fraction never had its velocity command
zeroed. Three locomotion configs set rel_standing_envs=0.02, so they were
silently not getting standing envs (the default 0 masked it).
Index by absolute env id: `cfg.value[env_ids[final_env_ids], :] = 0.0`. This
matches the known-good mjlab reference (tasks/mjlab/mdp/commands.py:104-112,
`stand_ids = env_ids[standing_mask]; self._command[stand_ids] = 0.0`).
Adds a backend-free regression test driving the real resample_commands with
rel_standing_envs=1.0 (all resampled envs must end zero). Red on pre-fix.1 parent 548ed49 commit a0ad877
2 files changed
Lines changed: 60 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
0 commit comments