Commit d3cc0a0
authored
refactor(tasks): mujoco_playground pick/open_cabinet delta control via _process_action (#798)
PandaPickCube and PandaOpenCabinet overrode step() purely for delta position
control (delta = action*scale; new = last_action+delta; clamp; latch
_last_action). Move that into the sanctioned _process_action hook and drop the
step override.
Behaviour identical: RLTaskEnv.step calls _process_action (delta+clamp, latch
_last_action) then its own clamp + simulate — the same double-clamp the old
override+super().step performed, and _last_action is latched to the same value
(only read on the next step, so the earlier-in-step latch is observably equal).
handover.py is intentionally NOT migrated — its step() also does post-step
reward/episode tracking, so it stays in KNOWN_STEP_OVERRIDES pending a
parity-checked refactor. Allowlist 22->20; 7/7 guardrail checks pass; ruff clean.1 parent 29337a6 commit d3cc0a0
3 files changed
Lines changed: 16 additions & 10 deletions
File tree
- roboverse_pack/tasks/mujoco_playground
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
172 | | - | |
173 | 177 | | |
174 | | - | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
133 | | - | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
| |||
0 commit comments