This part is for members
Membership opens soon. Leave your email and we'll tell you the day it does. Founding members get the launch price.
Keep watching the free partsMIT mode 1: one tick of the spring
The last motion mode: MIT mode, which legged robots use to make a joint act like a spring. It opens with the whole mode on one framework page: no plan, no integral; every 100 µs the current = (Kp × how far off + Kd × how much too fast + a set torque) / Kt, so a pushed joint gives way and stays there. Running example: the SIL's wb40st (1:1, Kt 0.05); the master sends Kp 1, Kd 0.005 and the joint's own position, −1, as the target; at 50 ms a 0.1 N·m load pushes the joint. The bench sil-mac/ep27 mit27 runs the bus build (0x6060 = 11 selects the mode; the bench calls set_app_MIT_* in MAVLink's place) and records what MitModeRun hands over and every call to mit_ctl. Eight stops follow tick 510, 1 ms into the push: mode and numbers (only MAVLink with host control writes the six parameters; out of the box Kp = Kd = 0.01); one tick, two layers (AppRun runs the app layer, MitModeRun, before the control layer, in the same tick); MitModeRun converts (four branches, the normal one on every tick here; the joint position it reads, −178, is the last tick's, and at 1:1 the converted target is −1 again); the hand-over (MitTrajectoryPlanningHandle plans nothing, it copies the numbers into mit_ctl_input / mit_ctl_config); where and how fast (enc_sum_p −207, the observer's ev_rad_s −13.109 rad/s → episode 13); one formula (spring 0.009875 N·m, damper 0.0655 N·m, 6.6 times more, / 0.05 = 1.5084 A, as the bench prints; mit_ctl is generated from Simulink and keeps nothing); the clamp (three branches, never clips here, at most 2.24 A → 27b); out to the current loop (ripple and friction compensation off, notch frequencies all 0, idq_tar_A[1] = 1.5084 A, the current loop measures 1.468 A). The whole push, guess first: 0.1 / Kp = 0.1 rad = 2086 counts, measured 2087; 95 % in 12.5 ms, farthest 2090, damping ratio 1.12 (worked out from the code); the damper leads and the spring takes over at tick 545; 2.01 A at the end. Beside PP mode holding: the same push moves it 985 counts and it comes back to 0 (an integrator → episode 14); MIT stays at 2087. Not shown: choosing Kp and Kd → 27b; a gearbox, halt and quick stop → 27c. Your turn: a 0.05 N·m set torque at the same moment, and the joint stops at 1043 counts, exactly half.