Skip to content

Commit 5fe3bfa

Browse files
committed
feat(rl): rig 2's TMC2209 champion, and per-rig naming for headers and sysid
DRV8825 90ep TMC2209 30ep TMC2209 60ep balanced fraction 1.000 0.993 1.000 longest streak 299.64 s 226.09 s 299.66 s |action| mean 0.275 0.236 0.177 pendulum std 1.83 deg 1.62 deg 1.23 deg arm std 9.4 deg 11.1 deg 6.3 deg arm off-centre 9.2 deg 17.7 deg 6.8 deg arm sway <1s 5.10 deg 4.22 deg 3.23 deg arm speed RMS 0.86 0.76 0.58
1 parent 63311c0 commit 5fe3bfa

19 files changed

Lines changed: 179 additions & 52 deletions

‎RotaryInvertedPendulum-arduino/RLControl/RLControl.ino‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,16 @@
7373
#include <AS5600.h>
7474
#include <Wire.h>
7575

76-
// Which champion header to compile. Named per rig as
77-
// policy_weights_<driver>_<microsteps>.h — the suffix carries the driver AND
78-
// its MICROSTEPS setting because the policy is trained against that
79-
// quantisation. Select at compile time, no file edits:
76+
// Which champion header to compile. Named policy_weights_<rig>_<driver>_<microsteps>.h:
77+
// the rig because each one is fine-tuned against its own measured friction, the
78+
// driver and MICROSTEPS because the policy is trained against that quantisation.
79+
// Both rigs now run TMC2209s, which is why the rig comes first — the driver alone
80+
// stopped identifying a champion. Select at compile time, no file edits:
8081
// arduino-cli compile --upload -p <port> --fqbn arduino:avr:nano:cpu=atmega328 \
81-
// --build-property 'build.extra_flags=-DPOLICY_WEIGHTS_H="policy_weights_drv8825_32.h"' \
82+
// --build-property 'build.extra_flags=-DPOLICY_WEIGHTS_H="policy_weights_rig2_tmc2209_32.h"' \
8283
// RotaryInvertedPendulum-arduino/RLControl
8384
#ifndef POLICY_WEIGHTS_H
84-
#define POLICY_WEIGHTS_H "policy_weights_tmc2209_32.h"
85+
#define POLICY_WEIGHTS_H "policy_weights_rig1_tmc2209_32.h"
8586
#endif
8687
#include POLICY_WEIGHTS_H
8788

RotaryInvertedPendulum-arduino/RLControl/policy_weights_tmc2209_32.h renamed to RotaryInvertedPendulum-arduino/RLControl/policy_weights_rig1_tmc2209_32.h

File renamed without changes.

RotaryInvertedPendulum-arduino/RLControl/policy_weights_drv8825_32.h renamed to RotaryInvertedPendulum-arduino/RLControl/policy_weights_rig2_drv8825_32.h

File renamed without changes.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// auto-generated by export_weights.py — do not edit by hand
2+
// source: 20260806_rig2tmc_async_ext/distill_h16_dagger_dev
3+
// generated: 2026-08-06T09:54:26
4+
// student MLP: 24 -> 16 -> 16 -> 1
5+
// params: 689, flash bytes: 2756
6+
// distill val_mse: 0.023052
7+
#pragma once
8+
#include <avr/pgmspace.h>
9+
10+
#define POLICY_OBS_DIM 24
11+
#define POLICY_HIDDEN_DIM 16
12+
#define POLICY_OUT_DIM 1
13+
14+
const float POLICY_W1[16][24] PROGMEM = {
15+
{ +3.38133097e-01f, -1.65638900e+00f, -4.38244402e-01f, +1.42590314e-01f, -1.01831205e-01f, -1.52726203e-01f, +1.45638511e-01f, -8.91232044e-02f, -4.89007473e-01f, +1.66330487e-01f, -1.84126467e-01f, +1.35654017e-01f, -4.39978391e-01f, +2.48103887e-01f, -4.78931099e-01f, -1.41814485e-01f, -1.20666184e-01f, +1.97910517e-01f, -3.74014944e-01f, +4.44088131e-01f, -1.58086717e+00f, -5.12266308e-02f, +1.63528863e-02f, +4.50512677e-01f },
16+
{ -7.24546909e-01f, +1.22600758e+00f, -1.25772619e+00f, -2.02426285e-01f, +1.16257533e-01f, -2.71028191e-01f, -7.08087087e-01f, +1.67138970e+00f, -1.41846955e+00f, -1.72517627e-01f, +6.16240650e-02f, -8.90421331e-01f, -7.14070082e-01f, +1.17945063e+00f, -8.08608949e-01f, -3.26895624e-01f, +7.98271000e-02f, -4.49314415e-01f, -6.99147046e-01f, +6.90418005e-01f, -1.00900602e+00f, +1.83682926e-02f, -2.60821491e-01f, -5.56586206e-01f },
17+
{ +3.27634722e-01f, +5.69367111e-01f, +1.48427576e-01f, +1.19511411e-01f, -1.04626015e-01f, +1.68189421e-01f, +2.86001205e-01f, +9.33736145e-01f, -3.66809338e-01f, +2.25091159e-01f, -1.22834720e-01f, +2.92868078e-01f, -2.39700139e-01f, +2.10198665e+00f, -8.89867842e-01f, -6.85143709e-01f, -4.98566255e-02f, +7.22561598e-01f, -1.04414992e-01f, +3.06522655e+00f, -6.69727027e-01f, +2.86140144e-01f, -3.04788202e-01f, +1.15857482e+00f },
18+
{ +1.17780671e-01f, +4.19258058e-01f, +1.01835895e+00f, -3.83572988e-02f, +1.70839857e-02f, +1.00803919e-01f, -1.58075914e-01f, +2.26036593e-01f, -1.34374678e-01f, +4.84765619e-02f, +1.10440791e-01f, -1.28967360e-01f, +1.05963804e-01f, -8.35654438e-01f, -4.70344961e-01f, +3.23870391e-01f, -6.13221265e-02f, -4.25169133e-02f, +5.19363806e-02f, -3.12074256e+00f, -9.77527916e-01f, +1.38815701e-01f, -2.97772586e-01f, -4.42834169e-01f },
19+
{ +2.94654369e-01f, -2.32683808e-01f, -6.50357485e-01f, -4.25228804e-01f, +2.66185373e-01f, -3.52100700e-01f, +1.01525187e-01f, -5.18333197e-01f, -2.86765784e-01f, +5.34698129e-01f, +1.99896231e-01f, -3.97378832e-01f, -4.15846229e-01f, -2.27832079e-01f, -6.92885280e-01f, +2.48441353e-01f, +5.83996288e-02f, -4.69575584e-01f, -1.37911886e-01f, -2.45359451e-01f, -7.85678208e-01f, -4.10269648e-01f, -2.19135493e-01f, -6.77878737e-01f },
20+
{ -1.10083474e-02f, -9.74682391e-01f, -2.41233289e-01f, -4.23420928e-02f, -5.23521425e-03f, +5.34885339e-02f, -4.82600369e-02f, -5.73780015e-02f, +2.82965660e-01f, -2.12425739e-02f, +4.37713675e-02f, +1.37627020e-01f, -6.03561215e-02f, +1.77136445e+00f, +3.76129746e-01f, -5.93448840e-02f, +2.68655140e-02f, +1.17812984e-01f, -1.00040652e-01f, +4.98626757e+00f, +6.55441731e-02f, -1.77567646e-01f, +2.98025638e-01f, +2.08209768e-01f },
21+
{ +9.54617262e-02f, -1.59708679e+00f, +8.28414977e-01f, +1.85942098e-01f, +1.60967693e-01f, -1.20363437e-01f, -1.70341089e-01f, -1.72777772e+00f, -5.60808599e-01f, -3.53572518e-01f, -1.23885341e-01f, +1.57593533e-01f, -4.93471265e-01f, -1.89257252e+00f, -1.00077713e+00f, -4.47728902e-01f, -8.21855813e-02f, +2.22338021e-01f, -9.17891979e-01f, -1.22099185e+00f, -6.91042125e-01f, +2.85070628e-01f, -6.09865725e-01f, +3.84219676e-01f },
22+
{ -4.28773105e-01f, -7.44341612e-01f, +1.15746832e+00f, -7.88570791e-02f, +1.54549643e-01f, +8.68312940e-02f, -2.77886361e-01f, +3.49410139e-02f, +4.40577716e-01f, -1.82384580e-01f, +1.36958197e-01f, -9.69571844e-02f, +6.56663030e-02f, +5.25193572e-01f, +2.98172235e-01f, +9.21588242e-02f, +2.03072891e-01f, -6.22450531e-01f, +2.01092437e-01f, +3.25483650e-01f, +3.72723341e-01f, -7.68195046e-03f, +4.69505906e-01f, -6.90666080e-01f },
23+
{ -4.57072228e-01f, +1.01082253e+00f, -1.64099365e-01f, -3.61940712e-01f, +1.91958755e-01f, -4.42848921e-01f, -4.93506372e-01f, +6.55515850e-01f, +6.67413056e-01f, -5.65496907e-02f, +1.49120197e-01f, +2.03510880e-01f, -7.05869496e-01f, +9.49795008e-01f, +1.22594647e-01f, -3.92490566e-01f, -2.00266857e-02f, +4.30120796e-01f, -5.65197647e-01f, +1.92814398e+00f, -1.14810085e+00f, +1.28728226e-01f, -3.45520109e-01f, +6.78704023e-01f },
24+
{ -3.60288739e-01f, -6.32615566e-01f, +1.39461386e+00f, -4.75024767e-02f, -2.37394348e-01f, -3.18611532e-01f, -1.26357704e-01f, -1.70034683e+00f, +3.10658336e-01f, +2.45848835e-01f, -3.06383699e-01f, -3.76926214e-01f, -7.72237703e-02f, -1.59873128e+00f, -4.82322931e-01f, +2.21935704e-01f, -9.53543782e-02f, -2.21876636e-01f, +5.98702729e-02f, +2.82846063e-01f, -7.13096261e-01f, -1.93195850e-01f, +1.16056025e-01f, +4.46496718e-02f },
25+
{ +1.82221323e-01f, -1.07090902e+00f, -2.40138873e-01f, -1.43243894e-01f, +7.84139633e-02f, +2.52772510e-01f, +2.29114696e-01f, -1.46021175e+00f, -5.68990648e-01f, -4.20763612e-01f, -1.28183514e-01f, +3.36638540e-01f, +9.36717093e-02f, -1.51464772e+00f, -7.94323802e-01f, -7.90316388e-02f, +7.32349232e-02f, +4.07750249e-01f, -3.52093065e-03f, -1.54488301e+00f, -8.51121247e-01f, +7.35142589e-01f, -3.40342015e-01f, +4.98760581e-01f },
26+
{ +6.95595145e-01f, -1.87075227e-01f, -9.60798502e-01f, +5.44768125e-02f, +1.43639788e-01f, +7.11826503e-01f, +6.58511400e-01f, -1.85332194e-01f, -1.41800320e+00f, -1.56078890e-01f, -1.57079786e-01f, +1.14243126e+00f, +9.92796481e-01f, -2.49312267e-01f, -9.20366585e-01f, +1.47767678e-01f, -1.28334388e-01f, +7.01775432e-01f, +5.53710699e-01f, -1.50617078e-01f, +3.81269008e-02f, +1.22279093e-01f, +1.62022352e-01f, +4.01665956e-01f },
27+
{ +2.17402160e-01f, -1.60994256e+00f, +5.02107143e-02f, -2.81597853e-01f, +1.46820366e-01f, -2.01804191e-01f, +1.28990352e-01f, -1.40663576e+00f, +7.27808535e-01f, -1.61541790e-01f, +1.26004010e-01f, -6.96033910e-02f, -1.39029756e-01f, -1.09252739e+00f, +7.26541102e-01f, +4.62627411e-01f, +7.82221705e-02f, -2.87117630e-01f, -2.12310433e-01f, +1.32983372e-01f, +6.02794766e-01f, -1.48302149e-02f, -7.80761093e-02f, -4.49956119e-01f },
28+
{ -1.78175587e-02f, +4.70387191e-01f, -1.06394343e-01f, +1.93446577e-01f, -2.19939321e-01f, -6.80893660e-02f, -5.46330102e-02f, +4.11411561e-02f, +4.32614386e-01f, +1.08307399e-01f, -5.88953495e-02f, -2.29641706e-01f, +2.86784209e-02f, +2.52605200e-01f, +9.31855083e-01f, +2.64994204e-01f, -4.20365743e-02f, -6.37271404e-02f, -3.33389305e-02f, -4.41928357e-01f, +1.01309955e+00f, -6.46606013e-02f, +1.66441947e-01f, -8.30375627e-02f },
29+
{ +2.17576683e-01f, +3.47421944e-01f, +4.98544246e-01f, +9.65115577e-02f, -2.01977015e-01f, -1.79103374e-01f, +3.19644839e-01f, -9.66282561e-02f, -2.54305452e-01f, +2.73910522e-01f, -3.96906398e-02f, +5.75812943e-02f, -6.77338317e-02f, -2.58643866e-01f, -5.93300581e-01f, -1.19811237e-01f, -1.89113066e-01f, +5.62746525e-01f, +5.91000542e-02f, -6.56981096e-02f, +4.94861715e-02f, -8.99466500e-03f, -3.83234829e-01f, +5.66232681e-01f },
30+
{ +3.70049357e-01f, +3.67216110e-01f, -9.87145245e-01f, +3.26073659e-03f, +2.09149212e-01f, +1.27505630e-01f, +4.84828740e-01f, +3.65224481e-02f, -1.23288369e+00f, +7.55988434e-02f, -9.63041279e-03f, +1.66645303e-01f, +3.39898020e-01f, -4.81659383e-01f, -1.51627553e+00f, -1.05024561e-01f, +1.88974336e-01f, +1.61186755e-01f, +4.92719829e-01f, -4.67322558e-01f, -2.35407329e+00f, -9.07769054e-02f, +9.09856334e-02f, -7.58863240e-02f }
31+
};
32+
const float POLICY_B1[16] PROGMEM = {
33+
+2.51707578e+00f,
34+
+1.77080065e-01f,
35+
-3.12372386e-01f,
36+
+1.21682143e+00f,
37+
+5.82437694e-01f,
38+
+8.44275672e-03f,
39+
+7.64234304e-01f,
40+
-1.18243110e+00f,
41+
+1.21359754e+00f,
42+
-3.95508856e-01f,
43+
+1.01702106e+00f,
44+
-2.05900216e+00f,
45+
+4.92368013e-01f,
46+
-1.06925361e-01f,
47+
-2.99387544e-01f,
48+
+1.52939498e+00f
49+
};
50+
const float POLICY_W2[16][16] PROGMEM = {
51+
{ -2.98150539e-01f, +9.08497810e-01f, -2.05469936e-01f, -9.10634827e-03f, +3.87731612e-01f, -2.38582149e-01f, +3.75341296e-01f, +2.41253767e-02f, -2.14291383e-02f, +2.15480492e-01f, -5.03145933e-01f, +4.55227375e-01f, +5.03847420e-01f, +2.62920380e-01f, +7.41913393e-02f, +4.00362641e-01f },
52+
{ +1.98574081e-01f, +3.30785155e-01f, +9.59735215e-02f, +5.82524836e-01f, -1.36183113e-01f, +5.60618863e-02f, +9.11489546e-01f, +2.16239333e-01f, +1.86198115e-01f, -1.08018935e+00f, -1.09845543e+00f, -3.69689874e-02f, -9.44196284e-02f, +9.01329935e-01f, -4.13634390e-01f, +7.34733194e-02f },
53+
{ +5.86344898e-01f, +6.96932971e-02f, +7.86154196e-02f, +2.78522313e-01f, +4.09881562e-01f, -2.81819701e-01f, +4.50907141e-01f, -4.77867603e-01f, -2.07544461e-01f, -7.39306733e-02f, -2.91967660e-01f, +3.76329958e-01f, +5.72673023e-01f, -2.41558060e-01f, -1.07929492e-02f, -1.08211130e-01f },
54+
{ +2.79018153e-02f, -1.46492466e-01f, +4.78803575e-01f, +1.85835481e-01f, +5.27410924e-01f, -2.03581929e-01f, -4.45573807e-01f, +3.91728133e-01f, +2.96750963e-01f, +5.37122965e-01f, -1.00497767e-01f, +3.20236951e-01f, -2.78049916e-01f, -3.75481546e-01f, -2.45321184e-01f, -4.58886176e-01f },
55+
{ -5.15383065e-01f, -2.78702527e-01f, +3.03246260e-01f, -1.06253958e+00f, -1.13661394e-01f, +2.82583505e-01f, +7.00561583e-01f, +1.29872754e-01f, +6.00064933e-01f, -3.14043254e-01f, +7.20675569e-03f, +1.69051085e-02f, +1.21229030e-01f, +6.38972938e-01f, +1.21151626e-01f, +1.30881697e-01f },
56+
{ -5.50394475e-01f, +4.54181954e-02f, -6.75185859e-01f, -2.11389706e-01f, +3.95752817e-01f, +2.13430509e-01f, +5.54935515e-01f, +1.20745599e-01f, +1.40840247e-01f, +2.70860791e-02f, -4.08792853e-01f, +5.87010741e-01f, +1.42302876e-02f, +2.95380592e-01f, +8.28904867e-01f, +4.24230307e-01f },
57+
{ +5.44864058e-01f, -4.78464812e-01f, +1.21806264e-01f, -1.01412761e+00f, -2.76394308e-01f, +5.38681030e-01f, +2.88278371e-01f, +4.44740474e-01f, +4.53766942e-01f, -1.26599893e-01f, -4.57151055e-01f, +1.63201824e-01f, +1.92920789e-02f, +5.04588425e-01f, -4.17760581e-01f, +5.95611274e-01f },
58+
{ -4.92383748e-01f, -6.77219987e-01f, +8.55387390e-01f, -3.23004872e-01f, +1.79951862e-02f, -9.91518199e-01f, +1.08736008e-01f, -1.34674728e-01f, +3.88512373e-01f, +5.74949421e-02f, -1.13656513e-01f, -3.48790497e-01f, +1.84348240e-01f, +1.23418242e-01f, +4.86740917e-01f, -2.11322761e+00f },
59+
{ -9.92958844e-01f, +3.73629034e-02f, +3.29922467e-01f, +2.46881947e-01f, -4.35163915e-01f, -2.46789384e+00f, +2.00539172e-01f, +7.94634148e-02f, +1.61486745e-01f, +8.55394527e-02f, -3.23412240e-01f, +1.12654559e-01f, +4.07551765e-01f, +3.66272628e-01f, +7.82071576e-02f, -4.28658389e-02f },
60+
{ +2.71307588e-01f, +7.17297792e-02f, -4.06321049e-01f, +9.97965813e-01f, -6.44451380e-01f, -9.36347097e-02f, -2.79408097e-01f, +4.29478586e-02f, +3.14115107e-01f, -7.45974258e-02f, -7.08372414e-01f, -2.04698905e-01f, +1.86035797e-01f, -4.47548963e-02f, +1.19282536e-01f, +2.01378822e-01f },
61+
{ -4.38440681e-01f, +5.00319712e-02f, +1.77551165e-01f, +4.82778370e-01f, -2.18244232e-02f, +1.08985245e+00f, +1.32276952e-01f, -4.21241701e-01f, -3.77440035e-01f, +4.18213785e-01f, +3.40476036e-01f, -3.06508303e-01f, +8.43376666e-02f, -5.95975578e-01f, +7.29376897e-02f, +3.37996989e-01f },
62+
{ +4.09604996e-01f, +3.39800090e-01f, +1.04234003e-01f, +4.57311004e-01f, +8.63473415e-02f, -1.42766565e-01f, +2.58056581e-01f, +2.70945102e-01f, -2.23005548e-01f, -2.18946442e-01f, -4.11528170e-01f, -1.04939871e-01f, +8.33564818e-01f, -1.47977471e-03f, -5.81756830e-01f, -7.80057788e-01f },
63+
{ -1.14698835e-01f, +8.19529518e-02f, +4.30847436e-01f, -4.10709709e-01f, -1.71511233e-01f, +8.19365323e-01f, -4.27254319e-01f, +4.99988198e-01f, +1.25396386e-01f, -1.75798178e-01f, -4.59447831e-01f, +4.92832512e-01f, +1.62097052e-01f, +1.80395097e-01f, -3.74454737e-01f, -2.06452683e-02f },
64+
{ +2.26824656e-01f, -2.59978175e-01f, -1.80136651e-01f, +1.38671510e-02f, +1.18170150e-01f, -6.34951651e-01f, +3.05949539e-01f, +3.75664830e-01f, +4.10913527e-01f, +3.27525616e-01f, +9.53418493e-01f, -6.13551915e-01f, -1.85090929e-01f, +2.03993499e-01f, +2.12406248e-01f, -2.76856154e-01f },
65+
{ +1.90510243e-01f, -3.14149439e-01f, -1.76259801e-01f, +1.94841594e-01f, -6.56146109e-01f, +3.89269628e-02f, +5.86921610e-02f, -1.84897795e-01f, -2.41093114e-01f, +1.74030170e-01f, +1.69642158e-02f, +4.88638610e-01f, +2.22239107e-01f, -3.91324274e-02f, +1.45421386e-01f, +7.03042507e-01f },
66+
{ -5.40757060e-01f, -5.59434295e-01f, +3.80557895e-01f, -4.61497195e-02f, +5.09528995e-01f, +5.10058463e-01f, +8.00691962e-01f, -6.64452761e-02f, +4.58548158e-01f, -5.50616205e-01f, -2.76533306e-01f, -5.30003786e-01f, +1.54438093e-01f, +1.48299322e-01f, -1.15188134e+00f, +7.55470023e-02f }
67+
};
68+
const float POLICY_B2[16] PROGMEM = {
69+
+4.41199988e-01f,
70+
+1.28878076e-02f,
71+
+3.60432155e-02f,
72+
+3.93921614e-01f,
73+
-4.50619072e-01f,
74+
-9.50171709e-01f,
75+
+1.00337827e+00f,
76+
+2.45250627e-01f,
77+
+3.78258795e-01f,
78+
+1.48332703e+00f,
79+
+2.74353594e-01f,
80+
-2.32049868e-01f,
81+
-7.22317696e-01f,
82+
+8.68755102e-01f,
83+
-4.54846501e-01f,
84+
-8.04940835e-02f
85+
};
86+
const float POLICY_W3[1][16] PROGMEM = {
87+
{ -3.73644471e-01f, +4.84374225e-01f, +7.11681485e-01f, +7.16717541e-01f, -6.73347533e-01f, -4.75742459e-01f, +7.57104695e-01f, -8.67552280e-01f, +1.87482738e+00f, -1.05263114e+00f, -1.11511576e+00f, -7.21183658e-01f, +5.45197368e-01f, +6.73029780e-01f, -6.47987545e-01f, -3.94459903e-01f }
88+
};
89+
const float POLICY_B3[1] PROGMEM = {
90+
-2.57447898e-01f
91+
};

‎RotaryInvertedPendulum-python/src/rl/curriculum_train.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ REWARD_MOTOR_POS_WEIGHT="${REWARD_MOTOR_POS_WEIGHT:-}"
150150
# empty to fall back to the env default.
151151
DR_OBS_STALENESS_MAX="${DR_OBS_STALENESS_MAX-0.020}"
152152
REWARD_MOTOR_VEL_WEIGHT="${REWARD_MOTOR_VEL_WEIGHT:-}"
153-
# Per-rig sysid file. Unset → sysid_params_tmc2209.json (the default). Set it
153+
# Per-rig sysid file. Unset → sysid_params_rig1.json (the default). Set it
154154
# when you have more than one rig: bearings and grease differ, and a different
155155
# bearing lands outside the friction DR range rather than inside it.
156156
PARAMS_PATH="${PARAMS_PATH:-}"
@@ -247,7 +247,7 @@ fi
247247
if [ -n "$PARAMS_PATH" ]; then
248248
echo " rig sysid: $PARAMS_PATH"
249249
else
250-
echo " rig sysid: sysid_params_tmc2209.json (default)"
250+
echo " rig sysid: sysid_params_rig1.json (default)"
251251
fi
252252
echo " control rate: ${CONTROL_FREQ} Hz, max accel: ${MAX_ACCEL_RAD_S2} rad/s²"
253253
echo " stage 2 delay: [${DR_DELAY_MIN_S2}, ${DR_DELAY_MAX_S2}] ticks + lag tau [$(awk -v t="$DR_LAG_TAU_MIN_S2" 'BEGIN{ printf "%.0f", t*1000 }'), $(awk -v t="$DR_LAG_TAU_MAX_S2" 'BEGIN{ printf "%.0f", t*1000 }')] ms"

‎RotaryInvertedPendulum-python/src/rl/distill_student.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,5 @@ To flash this student for a trial (scratch header, committed champions untouched
126126
--log recordings/$RUN.npz
127127
128128
To PROMOTE it, export to the named header for the rig instead
129-
(policy_weights_<driver>_<microsteps>.h) and commit.
129+
(policy_weights_<rig>_<driver>_<microsteps>.h) and commit.
130130
EOF

‎RotaryInvertedPendulum-python/src/rl/pendulum_env.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
# rather than a generic `sysid_params.json`, so a multi-rig setup cannot
6060
# silently train against whichever rig happened to be measured last. Pass
6161
# `--params-path` for any other rig; see reference/python.md.
62-
DEFAULT_PARAMS_PATH = HERE / "sysid_params_tmc2209.json"
62+
DEFAULT_PARAMS_PATH = HERE / "sysid_params_rig1.json"
6363

6464
# Hard-stop on the motor joint. Matches the lid-boss mechanical limit of ±135°,
6565
# but we clamp the policy at ±125° so the policy never *commands* a stop hit.

RotaryInvertedPendulum-python/src/rl/sysid_params_tmc2209.json renamed to RotaryInvertedPendulum-python/src/rl/sysid_params_rig1.json

File renamed without changes.

RotaryInvertedPendulum-python/src/rl/sysid_params_drv8825.json renamed to RotaryInvertedPendulum-python/src/rl/sysid_params_rig2.json

File renamed without changes.

‎RotaryInvertedPendulum-python/src/rl/sysid_wizard.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ def common_device(sp):
783783
pf.add_argument("--in-dir", required=True, type=Path)
784784
pf.add_argument("--out-json", required=True, type=Path,
785785
help="where to write the fitted parameters, e.g. "
786-
"sysid_params_tmc2209.json. Required rather than "
786+
"sysid_params_rig1.json. Required rather than "
787787
"defaulted: friction is per-rig, so writing to a "
788788
"generic filename is how one rig's measurements end "
789789
"up silently describing another.")
@@ -799,7 +799,7 @@ def common_device(sp):
799799
p.add_argument("--skip-motor", action="store_true")
800800
p.add_argument("--out-json", required=True, type=Path,
801801
help="where to write the fitted parameters, e.g. "
802-
"sysid_params_tmc2209.json. Required rather than "
802+
"sysid_params_rig1.json. Required rather than "
803803
"defaulted: friction is per-rig, so writing to a "
804804
"generic filename is how one rig's measurements end "
805805
"up silently describing another.")

0 commit comments

Comments
 (0)