SjohnU commited on
Commit
54ff45f
·
verified ·
1 Parent(s): 54805bd

Add r16_latency_g200 (report-16 one-change-at-a-time, measured gait in physical units)

Browse files
r16_latency_g200/README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # r16_latency_g200 — Report 16 one-change-at-a-time walker
2
+
3
+ **Measured: the gains are free.:0.342 m/s — ✅ walks (= arm A)**
4
+
5
+ A.2 — control + ~65 ms latency + leg gains 180/5→200/10. Paired with arm A, it isolates the gain change from the latency
6
+
7
+ | | |
8
+ |---|---|
9
+ | Task | `ETHRC-humanoidv1-walk-r16-latency-g200-psu-v0` |
10
+ | Branch | `test/SjohnU_remodel_actuators` @ `8f9f058` |
11
+ | Checkpoint | `model_9999.pt` (10,000 iters, completed) |
12
+ | Envs / seed | 4096 / 42 |
13
+ | rsl-rl | 5.0.1 (native actor/critic state_dict) |
14
+ | Actions | 26 @ 50 Hz |
15
+ | wandb | [`k28tg52k`](https://wandb.ai/sjohnu-eth-z-rich/rc_humanoid_rl/runs/k28tg52k) |
16
+ | Hardware | AWS us-east-2, 1x L40S (g6e.xlarge) |
17
+ ## Report 16: one-change-at-a-time, measured in physical units
18
+
19
+ All arms = `u4_walk_crouch_real` + the r16 shared layer (25% standing envs, `track_lin_vel_xy`
20
+ 1.5 -> 2.2) + **exactly one** further change. 10k iters, 4096 envs, seed 42, branch
21
+ `test/SjohnU_remodel_actuators` @ `8f9f058`.
22
+
23
+ Measured with `scripts/rsl_rl/measure_gait.py` (1000 steps x 64 envs, forward command forced).
24
+ **Physical units only.** Reward-term values are NOT comparable across configs with different
25
+ weight/std, and they actively mislead here: `r16_footlift` posts the best curves of the entire
26
+ set (tvel 1.194, mean_reward 11.79) while moving **0.001 m/s**.
27
+
28
+ | policy | change | cmd | **fwd m/s** | cadence | lean | walks? |
29
+ |---|---|---|---|---|---|---|
30
+ | `r16_upright` @0.8 | upright price + spawn-tilt DR | 0.8 | **0.634** | 3.30/s | 1.5° | ✅ best |
31
+ | `crouch_nogait` | (ref) | 0.5 | 0.572 | 8.14/s | 5.3° | ✅ |
32
+ | `r16_upright` @0.5 | upright price + spawn-tilt DR | 0.5 | 0.406 | 3.37/s | 0.7° | ✅ |
33
+ | `u4_walk_crouch_real` | (ref, 22k) | 0.5 | 0.397 | 3.48/s | 9.9° | ✅ |
34
+ | **`r16_latency`** | +~65 ms delay | 0.5 | **0.347** | 3.39/s | 13.3° | ✅ |
35
+ | **`r16_latency_g200`** | +~65 ms + legs 200/10 | 0.5 | **0.342** | 3.47/s | 10.7° | ✅ |
36
+ | **`r16_control`** | — (baseline) | 0.5 | **0.026** | 0.24/s | 9.2° | ❌ |
37
+ | `u4_walk_bigstep_v1` | (ref, 4 changes, 25k) | 0.5 | 0.009 | 1.71/s | 20.9° | ❌ |
38
+ | **`r16_footlift`** | clearance 1.0@0.15 -> 2.4@0.17 | 0.5 | **0.001** | 0.28/s | 11.9° | ❌ worst |
39
+
40
+ ## The rule: standing must be made untenable
41
+
42
+ The policy's default attractor is a **stand-and-micro-correct local optimum** — that is what
43
+ `r16_control` is stuck in at 10k (0.026 m/s, 0.24 steps/env/s). Every result follows from
44
+ whether a change makes standing tenable or not:
45
+
46
+ - **Makes standing untenable -> a real gait emerges:** `latency` (cannot twitch-correct at
47
+ 50 Hz -> 0.347), spawn-tilt DR (must recover every reset -> 0.406), or simply training to
48
+ 22k (`crouch_real` -> 0.397; it only learns to translate between 15k and 22k).
49
+ - **Enriches standing -> it never walks:** `footlift` (0.001, worse than its own control) and
50
+ a slower gait clock (0.004).
51
+
52
+ **Latency is load-bearing, not a deploy tax.** `control + latency` walks at 0.347 m/s where the
53
+ identical `control` marches at 0.026 -- same code, same 10k iters, one knob, 14x the stepping.
54
+ Not a confound: the crouch-envelope chain already swaps `legs_waist` to `IdealPDActuatorCfg` and
55
+ moves torque-speed into the PhysX spawn func; `_apply_latency_only` turns that into a DelayedPD
56
+ with identical effort/velocity limits, gains and armature, and never touches `spawn.func`.
57
+
58
+ **Leg gains 180/5 -> 200/10 are free** (0.342 vs 0.347).
59
+
60
+ **Foot-lift is what broke `bigstep`** -- bigstep carried exactly this layer. It perversely reached
61
+ *lower* clearance than control (0.1003 vs 0.1567 m) while paying 2.4x for height: it did not lift
62
+ higher, it stopped stepping.
63
+
64
+ **Lean is not causal.** `r16_latency` walks at 13.3° BACK, `r16_upright` at 0.7°, `bigstep` fails
65
+ at 20.9°. Lean predicts nothing -- though *pricing* it still helps, via the spawn-tilt/untenable
66
+ -standing mechanism rather than via the lean itself.
67
+
68
+ ## Files
69
+
70
+ - `policy.pt`, `policy.onnx` — exported via `scripts/rsl_rl/play_export.py`
71
+ - `deploy.yaml` — deploy config (obs/action layout, gains, 50 Hz)
72
+ - `model_9999.pt` — raw rsl-rl checkpoint (re-export / resume)
r16_latency_g200/deploy.yaml ADDED
@@ -0,0 +1,425 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_name: r16_latency_g200
2
+ task: ETHRC-humanoidv1-walk-r16-latency-g200-psu-v0
3
+ interface: lo
4
+ sim2sim: true
5
+ msg_type: go
6
+ imu_type: base_link
7
+ lowcmd_topic: rt/lowcmd
8
+ lowstate_topic: rt/lowstate
9
+ policy_path: policy.pt
10
+ num_actions: 26
11
+ action_scale: 0.25
12
+ use_default_offset: true
13
+ control_dt: 0.02
14
+ policy_rate_hz: 50.0
15
+ decimation: 4
16
+ sim_dt: 0.005
17
+ joint_names:
18
+ - waist_upperbody_yaw
19
+ - hip_central_rotation
20
+ - neck_yaw
21
+ - shoulder_flexion_l
22
+ - shoulder_flexion_r
23
+ - leg_flexion_l
24
+ - leg_flexion_r
25
+ - neck_pitch
26
+ - shoulder_abduction_l
27
+ - shoulder_abduction_r
28
+ - leg_abduction_l
29
+ - leg_abduction_r
30
+ - shoulder_rotation_l
31
+ - shoulder_rotation_r
32
+ - hip_yaw_l
33
+ - hip_yaw_r
34
+ - elbow_flexion_l
35
+ - elbow_flexion_r
36
+ - knee_l
37
+ - knee_r
38
+ - wrist_rotation_l
39
+ - wrist_rotation_r
40
+ - foot_pitch_l
41
+ - foot_pitch_r
42
+ - foot_roll_l
43
+ - foot_roll_r
44
+ joint2motor_idx:
45
+ - 0
46
+ - 1
47
+ - 2
48
+ - 3
49
+ - 4
50
+ - 5
51
+ - 6
52
+ - 7
53
+ - 8
54
+ - 9
55
+ - 10
56
+ - 11
57
+ - 12
58
+ - 13
59
+ - 14
60
+ - 15
61
+ - 16
62
+ - 17
63
+ - 18
64
+ - 19
65
+ - 20
66
+ - 21
67
+ - 22
68
+ - 23
69
+ - 24
70
+ - 25
71
+ default_angles:
72
+ - 0.0
73
+ - 0.0
74
+ - 0.0
75
+ - 0.0
76
+ - 0.0
77
+ - 0.18000000715255737
78
+ - -0.18000000715255737
79
+ - 0.0
80
+ - 0.0
81
+ - 0.0
82
+ - 0.0
83
+ - 0.0
84
+ - 0.0
85
+ - 0.0
86
+ - 0.0
87
+ - 0.0
88
+ - 0.0
89
+ - 0.0
90
+ - -0.3499999940395355
91
+ - -0.3499999940395355
92
+ - 0.0
93
+ - 0.0
94
+ - 0.18000000715255737
95
+ - 0.18000000715255737
96
+ - 0.0
97
+ - 0.0
98
+ kps:
99
+ - 189.63851928710938
100
+ - 189.63851928710938
101
+ - 40.2313117980957
102
+ - 68.69254302978516
103
+ - 68.69254302978516
104
+ - 189.63851928710938
105
+ - 189.63851928710938
106
+ - 40.2313117980957
107
+ - 68.69254302978516
108
+ - 68.69254302978516
109
+ - 189.63851928710938
110
+ - 189.63851928710938
111
+ - 40.2313117980957
112
+ - 40.2313117980957
113
+ - 189.63851928710938
114
+ - 189.63851928710938
115
+ - 40.2313117980957
116
+ - 40.2313117980957
117
+ - 189.63851928710938
118
+ - 189.63851928710938
119
+ - 40.2313117980957
120
+ - 40.2313117980957
121
+ - 35.159873962402344
122
+ - 35.159873962402344
123
+ - 35.159873962402344
124
+ - 35.159873962402344
125
+ kds:
126
+ - 9.641944885253906
127
+ - 9.641944885253906
128
+ - 0.9752398133277893
129
+ - 1.6067781448364258
130
+ - 1.6067781448364258
131
+ - 9.641944885253906
132
+ - 9.641944885253906
133
+ - 0.9752398133277893
134
+ - 1.6067781448364258
135
+ - 1.6067781448364258
136
+ - 9.641944885253906
137
+ - 9.641944885253906
138
+ - 0.9752398133277893
139
+ - 0.9752398133277893
140
+ - 9.641944885253906
141
+ - 9.641944885253906
142
+ - 0.9752398133277893
143
+ - 0.9752398133277893
144
+ - 9.641944885253906
145
+ - 9.641944885253906
146
+ - 0.9752398133277893
147
+ - 0.9752398133277893
148
+ - 1.054377555847168
149
+ - 1.054377555847168
150
+ - 1.054377555847168
151
+ - 1.054377555847168
152
+ effort_limits:
153
+ - 128.0
154
+ - 128.0
155
+ - 40.0
156
+ - 80.0
157
+ - 80.0
158
+ - 128.0
159
+ - 128.0
160
+ - 40.0
161
+ - 80.0
162
+ - 80.0
163
+ - 128.0
164
+ - 128.0
165
+ - 40.0
166
+ - 40.0
167
+ - 128.0
168
+ - 128.0
169
+ - 40.0
170
+ - 40.0
171
+ - 128.0
172
+ - 128.0
173
+ - 40.0
174
+ - 40.0
175
+ - 60.0
176
+ - 60.0
177
+ - 60.0
178
+ - 60.0
179
+ articulation_joint_names:
180
+ - waist_upperbody_yaw
181
+ - hip_central_rotation
182
+ - neck_yaw
183
+ - shoulder_flexion_l
184
+ - shoulder_flexion_r
185
+ - leg_flexion_l
186
+ - leg_flexion_r
187
+ - neck_pitch
188
+ - shoulder_abduction_l
189
+ - shoulder_abduction_r
190
+ - leg_abduction_l
191
+ - leg_abduction_r
192
+ - shoulder_rotation_l
193
+ - shoulder_rotation_r
194
+ - hip_yaw_l
195
+ - hip_yaw_r
196
+ - elbow_flexion_l
197
+ - elbow_flexion_r
198
+ - knee_l
199
+ - knee_r
200
+ - wrist_rotation_l
201
+ - wrist_rotation_r
202
+ - foot_pitch_l
203
+ - foot_pitch_r
204
+ - foot_roll_l
205
+ - foot_roll_r
206
+ articulation_default_angles:
207
+ - 0.0
208
+ - 0.0
209
+ - 0.0
210
+ - 0.0
211
+ - 0.0
212
+ - 0.18000000715255737
213
+ - -0.18000000715255737
214
+ - 0.0
215
+ - 0.0
216
+ - 0.0
217
+ - 0.0
218
+ - 0.0
219
+ - 0.0
220
+ - 0.0
221
+ - 0.0
222
+ - 0.0
223
+ - 0.0
224
+ - 0.0
225
+ - -0.3499999940395355
226
+ - -0.3499999940395355
227
+ - 0.0
228
+ - 0.0
229
+ - 0.18000000715255737
230
+ - 0.18000000715255737
231
+ - 0.0
232
+ - 0.0
233
+ pd_per_joint:
234
+ waist_upperbody_yaw:
235
+ kp: 189.63851928710938
236
+ kd: 9.641944885253906
237
+ effort_limit: 128.0
238
+ velocity_limit: 14.65999984741211
239
+ hip_central_rotation:
240
+ kp: 189.63851928710938
241
+ kd: 9.641944885253906
242
+ effort_limit: 128.0
243
+ velocity_limit: 14.65999984741211
244
+ leg_flexion_l:
245
+ kp: 189.63851928710938
246
+ kd: 9.641944885253906
247
+ effort_limit: 128.0
248
+ velocity_limit: 14.65999984741211
249
+ leg_flexion_r:
250
+ kp: 189.63851928710938
251
+ kd: 9.641944885253906
252
+ effort_limit: 128.0
253
+ velocity_limit: 14.65999984741211
254
+ leg_abduction_l:
255
+ kp: 189.63851928710938
256
+ kd: 9.641944885253906
257
+ effort_limit: 128.0
258
+ velocity_limit: 14.65999984741211
259
+ leg_abduction_r:
260
+ kp: 189.63851928710938
261
+ kd: 9.641944885253906
262
+ effort_limit: 128.0
263
+ velocity_limit: 14.65999984741211
264
+ hip_yaw_l:
265
+ kp: 189.63851928710938
266
+ kd: 9.641944885253906
267
+ effort_limit: 128.0
268
+ velocity_limit: 14.65999984741211
269
+ hip_yaw_r:
270
+ kp: 189.63851928710938
271
+ kd: 9.641944885253906
272
+ effort_limit: 128.0
273
+ velocity_limit: 14.65999984741211
274
+ knee_l:
275
+ kp: 189.63851928710938
276
+ kd: 9.641944885253906
277
+ effort_limit: 128.0
278
+ velocity_limit: 14.65999984741211
279
+ knee_r:
280
+ kp: 189.63851928710938
281
+ kd: 9.641944885253906
282
+ effort_limit: 128.0
283
+ velocity_limit: 14.65999984741211
284
+ shoulder_flexion_l:
285
+ kp: 68.69254302978516
286
+ kd: 1.6067781448364258
287
+ effort_limit: 80.0
288
+ velocity_limit: 18.0
289
+ shoulder_flexion_r:
290
+ kp: 68.69254302978516
291
+ kd: 1.6067781448364258
292
+ effort_limit: 80.0
293
+ velocity_limit: 18.0
294
+ shoulder_abduction_l:
295
+ kp: 68.69254302978516
296
+ kd: 1.6067781448364258
297
+ effort_limit: 80.0
298
+ velocity_limit: 18.0
299
+ shoulder_abduction_r:
300
+ kp: 68.69254302978516
301
+ kd: 1.6067781448364258
302
+ effort_limit: 80.0
303
+ velocity_limit: 18.0
304
+ neck_yaw:
305
+ kp: 40.2313117980957
306
+ kd: 0.9752398133277893
307
+ effort_limit: 40.0
308
+ velocity_limit: 20.0
309
+ neck_pitch:
310
+ kp: 40.2313117980957
311
+ kd: 0.9752398133277893
312
+ effort_limit: 40.0
313
+ velocity_limit: 20.0
314
+ shoulder_rotation_l:
315
+ kp: 40.2313117980957
316
+ kd: 0.9752398133277893
317
+ effort_limit: 40.0
318
+ velocity_limit: 20.0
319
+ shoulder_rotation_r:
320
+ kp: 40.2313117980957
321
+ kd: 0.9752398133277893
322
+ effort_limit: 40.0
323
+ velocity_limit: 20.0
324
+ elbow_flexion_l:
325
+ kp: 40.2313117980957
326
+ kd: 0.9752398133277893
327
+ effort_limit: 40.0
328
+ velocity_limit: 20.0
329
+ elbow_flexion_r:
330
+ kp: 40.2313117980957
331
+ kd: 0.9752398133277893
332
+ effort_limit: 40.0
333
+ velocity_limit: 20.0
334
+ wrist_rotation_l:
335
+ kp: 40.2313117980957
336
+ kd: 0.9752398133277893
337
+ effort_limit: 40.0
338
+ velocity_limit: 20.0
339
+ wrist_rotation_r:
340
+ kp: 40.2313117980957
341
+ kd: 0.9752398133277893
342
+ effort_limit: 40.0
343
+ velocity_limit: 20.0
344
+ foot_pitch_l:
345
+ kp: 35.159873962402344
346
+ kd: 1.054377555847168
347
+ effort_limit: 60.0
348
+ velocity_limit: 50.0
349
+ foot_pitch_r:
350
+ kp: 35.159873962402344
351
+ kd: 1.054377555847168
352
+ effort_limit: 60.0
353
+ velocity_limit: 50.0
354
+ foot_roll_l:
355
+ kp: 35.159873962402344
356
+ kd: 1.054377555847168
357
+ effort_limit: 60.0
358
+ velocity_limit: 50.0
359
+ foot_roll_r:
360
+ kp: 35.159873962402344
361
+ kd: 1.054377555847168
362
+ effort_limit: 60.0
363
+ velocity_limit: 50.0
364
+ obs_history_length: 5
365
+ obs_single_frame_dim: 89
366
+ obs_total_dim: 445
367
+ obs_layout:
368
+ - name: base_ang_vel
369
+ start: 0
370
+ end: 15
371
+ base_dim: 3
372
+ block_dim: 15
373
+ scale: 0.2
374
+ - name: projected_gravity
375
+ start: 15
376
+ end: 30
377
+ base_dim: 3
378
+ block_dim: 15
379
+ scale: 1.0
380
+ - name: velocity_commands
381
+ start: 30
382
+ end: 45
383
+ base_dim: 3
384
+ block_dim: 15
385
+ scale: 1.0
386
+ params:
387
+ command_name: base_velocity
388
+ - name: joint_pos_rel
389
+ start: 45
390
+ end: 175
391
+ base_dim: 26
392
+ block_dim: 130
393
+ scale: 1.0
394
+ - name: joint_vel_rel
395
+ start: 175
396
+ end: 305
397
+ base_dim: 26
398
+ block_dim: 130
399
+ scale: 0.05
400
+ - name: last_action
401
+ start: 305
402
+ end: 435
403
+ base_dim: 26
404
+ block_dim: 130
405
+ scale: 1.0
406
+ - name: gait_phase
407
+ start: 435
408
+ end: 445
409
+ base_dim: 2
410
+ block_dim: 10
411
+ scale: 1.0
412
+ params:
413
+ period: 0.6
414
+ command_name: base_velocity
415
+ command_ranges:
416
+ lin_vel_x:
417
+ - -0.1
418
+ - 0.1
419
+ lin_vel_y:
420
+ - 0.1
421
+ - 0.8
422
+ ang_vel_z:
423
+ - -0.1
424
+ - 0.1
425
+ checkpoint: /root/rc/logs/rsl_rl/humanoid_v1_locomotion/r16_latency_g200/model_9999.pt
r16_latency_g200/model_9999.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7374076ba3b6ccc8b3f7cca25f72e1bc2a610f435cc66464770c1ee11d6deea3
3
+ size 7475573
r16_latency_g200/policy.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56654a3899b887d2a0c9da8c8a994eae7b11979c75422f186c84aa2e21fe0b03
3
+ size 1584867
r16_latency_g200/policy.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edd4b8a84bc3ceed23bfe6da1f5b1c15e6ca804b3f72f1cf08d90a875e9f6131
3
+ size 1596822