CyberNative AI LLC commited on
Commit
15b0b27
·
1 Parent(s): f2f54c2

holdcheck 0.5.2: read so_follower recordings (LeRobot 2026) as SO-100/101 arms

Browse files
Files changed (4) hide show
  1. index.html +2 -2
  2. py/engine.py +1 -1
  3. py/holdcheck.py +18 -7
  4. py/playfix.py +3 -1
index.html CHANGED
@@ -120,7 +120,7 @@ robot = wrap_send_action(robot, PlayCorrection.from_card(json.load(open("card.js
120
  <p class="label">03 · The card</p>
121
  <div>
122
  <h2 id="hc-card-h">Keep the card.</h2>
123
- <p>The card holds every figure above and the ones behind them: the 90% intervals in encoder steps, hold counts by direction, settle creep, and the measuring settings. Measure again after you tighten a horn or change a servo and compare the two.</p>
124
  <div class="hc-downloads">
125
  <a class="hc-dl" id="hc-dl-json" href="#" download="holdcheck-card.json">Download card (JSON)</a>
126
  <a class="hc-dl hc-dl-2" id="hc-dl-text" href="#" download="holdcheck-card.txt">Download as text</a>
@@ -151,7 +151,7 @@ robot = wrap_send_action(robot, PlayCorrection.from_card(json.load(open("card.js
151
  <footer class="close">
152
  <div class="wrap">
153
  <p class="label">Prepared by CyberNative AI LLC, an AI-run company, using AI agents</p>
154
- <p class="label">Arm play check · method 0.5.1</p>
155
  </div>
156
  </footer>
157
  </body>
 
120
  <p class="label">03 · The card</p>
121
  <div>
122
  <h2 id="hc-card-h">Keep the card.</h2>
123
+ <p>The card holds every figure above and the ones behind them: the 90% intervals in encoder steps, hold counts by direction, settle creep, and the measuring settings. Measure again after you change the position gain, a servo or the calibration, and compare the two.</p>
124
  <div class="hc-downloads">
125
  <a class="hc-dl" id="hc-dl-json" href="#" download="holdcheck-card.json">Download card (JSON)</a>
126
  <a class="hc-dl hc-dl-2" id="hc-dl-text" href="#" download="holdcheck-card.txt">Download as text</a>
 
151
  <footer class="close">
152
  <div class="wrap">
153
  <p class="label">Prepared by CyberNative AI LLC, an AI-run company, using AI agents</p>
154
+ <p class="label">Arm play check · method 0.5.2</p>
155
  </div>
156
  </footer>
157
  </body>
py/engine.py CHANGED
@@ -93,7 +93,7 @@ def view(card: dict) -> dict:
93
  return out
94
  fam = hc.family(card.get("robot_type"))
95
  out["family"] = fam
96
- so = fam in ("so100", "so101")
97
  table = hc.compare_table(SUMMARY, fam)
98
  # No table: the corpus has too few arms of this family to place one among (fewer than COMPARE_MIN_ARMS).
99
  out["compared"] = bool(table)
 
93
  return out
94
  fam = hc.family(card.get("robot_type"))
95
  out["family"] = fam
96
+ so = fam in hc.SO_FAMILIES
97
  table = hc.compare_table(SUMMARY, fam)
98
  # No table: the corpus has too few arms of this family to place one among (fewer than COMPARE_MIN_ARMS).
99
  out["compared"] = bool(table)
py/holdcheck.py CHANGED
@@ -36,7 +36,7 @@ import urllib.request
36
 
37
  import numpy as np
38
 
39
- VERSION = "0.5.1"
40
  STEP_DEG = 360.0 / 4096.0
41
  HF = "https://huggingface.co"
42
  SO_JOINTS = ["shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll", "gripper"]
@@ -200,12 +200,17 @@ B_GRID = np.arange(0.0, 60.25, 0.25) # candidate lost motion, encoder steps
200
  # of B_WIDE (21 deg) is not servo play; the joint is reported as not measured.
201
  B_WIDE = np.arange(0.0, 240.25, 0.25)
202
  # The play correction is given only up to 60 steps (5.3 deg) of play, the range the 0.4 check covered.
203
- # Larger play is a loose horn, screw or gear (elbow p90 is 4.7 deg); aiming far past a target is not a fix.
 
 
204
  CORR_MAX_STEPS = 60.0
205
  # 0.4.2: the correction is given only where an encoder step is known to be 1/4096 turn (Feetech STS3215 on
206
  # SO-100/101, Dynamixel on Koch) and, for -100..100 recordings, the calibrated range is at most one turn.
207
  # Elsewhere the step, and so the size of the correction, is not known (Piper's range read 40 turns).
208
- CORR_FAMILIES = ("so100", "so101", "koch", "mixed")
 
 
 
209
  TURN_STEPS = 4096
210
  # A family is placed against other arms only when the corpus has at least this many of them.
211
  COMPARE_MIN_ARMS = 5
@@ -254,6 +259,8 @@ def family(robot_type) -> str:
254
  rt = str(robot_type or "").lower().replace("-", "")
255
  if "koch" in rt and "so10" in rt:
256
  return "mixed"
 
 
257
  if rt.startswith("so101"):
258
  return "so101"
259
  if rt.startswith("so100") or rt.startswith("so_100"):
@@ -438,7 +445,11 @@ def correction_skip(card: dict) -> list:
438
  f"encoder steps, more than one servo turn ({TURN_STEPS}). Check that joint's calibration."))
439
  elif j["lost_motion_steps"] > CORR_MAX_STEPS:
440
  out.append((k, f"No correction for {k}: its {j['lost_motion_deg']:.1f} deg of play is more than software should "
441
- f"cancel (it is given up to {CORR_MAX_STEPS * STEP_DEG:.1f} deg). Check that joint's horn screws and servo."))
 
 
 
 
442
  return out
443
 
444
 
@@ -515,7 +526,7 @@ def tip_figures(joints: dict, tipmap: dict | None = None, per_pose: int = 200, s
515
 
516
  SEATMAP = os.path.join(os.path.dirname(os.path.abspath(__file__)), "seatmap.json")
517
  SEAT_LEAD_IN_MM = (3, 5)
518
- SEAT_FAMILIES = ("so100", "so101")
519
  SEAT_P0_TESTED = 0.33 # the own-rate escalation was tested in simulation up to a miss rate of 0.327
520
 
521
 
@@ -587,7 +598,7 @@ def compare_table(summary: dict | None, fam: str) -> dict:
587
  fewer than COMPARE_MIN_ARMS arms of the family (an arm is not compared with itself)."""
588
  if not summary:
589
  return {}
590
- if fam in ("so100", "so101"):
591
  return summary.get("joints", {})
592
  if summary.get("arms_by_family", {}).get(fam, 0) < COMPARE_MIN_ARMS:
593
  return {}
@@ -638,7 +649,7 @@ def report_text(card: dict, summary: dict | None = None) -> str:
638
  if "one_side_p95_mm" not in t:
639
  L.append(f"At the gripper: {t.get('not_computed', 'not computed')}")
640
  return "\n".join(L + correction_text(card))
641
- ts = (summary or {}).get("tip", {}) if fam in ("so100", "so101") else {}
642
  L += [
643
  "At the gripper (sideways error of the tool point, table poses 13-25 cm in front of the base):",
644
  f" arriving from one side 95% within {t['one_side_p95_mm']:.1f} mm {_place(t['one_side_p95_mm'], ts.get('one_side_p95_mm', {}))}",
 
36
 
37
  import numpy as np
38
 
39
+ VERSION = "0.5.2"
40
  STEP_DEG = 360.0 / 4096.0
41
  HF = "https://huggingface.co"
42
  SO_JOINTS = ["shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll", "gripper"]
 
200
  # of B_WIDE (21 deg) is not servo play; the joint is reported as not measured.
201
  B_WIDE = np.arange(0.0, 240.25, 0.25)
202
  # The play correction is given only up to 60 steps (5.3 deg) of play, the range the 0.4 check covered.
203
+ # Larger play is past the tested range, and a recording cannot locate its cause (a soft position gain, friction
204
+ # or wear in the servo, load or contact, calibration); shaft-to-link play is not seen at all. Elbow p90 is 4.7 deg.
205
+ # Aiming far past a target is not a fix.
206
  CORR_MAX_STEPS = 60.0
207
  # 0.4.2: the correction is given only where an encoder step is known to be 1/4096 turn (Feetech STS3215 on
208
  # SO-100/101, Dynamixel on Koch) and, for -100..100 recordings, the calibrated range is at most one turn.
209
  # Elsewhere the step, and so the size of the correction, is not known (Piper's range read 40 turns).
210
+ # "so": LeRobot names SO-100 and SO-101 followers alike "so_follower" since its 2026 consolidation of the SO
211
+ # robots; both use the STS3215 servo and the same joint names, so the card treats the pair as one family.
212
+ SO_FAMILIES = ("so100", "so101", "so")
213
+ CORR_FAMILIES = ("so100", "so101", "so", "koch", "mixed")
214
  TURN_STEPS = 4096
215
  # A family is placed against other arms only when the corpus has at least this many of them.
216
  COMPARE_MIN_ARMS = 5
 
259
  rt = str(robot_type or "").lower().replace("-", "")
260
  if "koch" in rt and "so10" in rt:
261
  return "mixed"
262
+ if rt == "so_follower":
263
+ return "so"
264
  if rt.startswith("so101"):
265
  return "so101"
266
  if rt.startswith("so100") or rt.startswith("so_100"):
 
445
  f"encoder steps, more than one servo turn ({TURN_STEPS}). Check that joint's calibration."))
446
  elif j["lost_motion_steps"] > CORR_MAX_STEPS:
447
  out.append((k, f"No correction for {k}: its {j['lost_motion_deg']:.1f} deg of play is more than software should "
448
+ f"cancel (it is given up to {CORR_MAX_STEPS * STEP_DEG:.1f} deg, the range the correction was tested on). "
449
+ f"A recording cannot say where play this large comes from. It may be a dead-band from a soft "
450
+ f"position gain (LeRobot's follower setting position_p_coefficient), friction or wear in the "
451
+ f"servo, the arm pressing on the table or an object, or that joint's calibration. Play between "
452
+ f"the servo shaft and the link is not measured at all."))
453
  return out
454
 
455
 
 
526
 
527
  SEATMAP = os.path.join(os.path.dirname(os.path.abspath(__file__)), "seatmap.json")
528
  SEAT_LEAD_IN_MM = (3, 5)
529
+ SEAT_FAMILIES = SO_FAMILIES
530
  SEAT_P0_TESTED = 0.33 # the own-rate escalation was tested in simulation up to a miss rate of 0.327
531
 
532
 
 
598
  fewer than COMPARE_MIN_ARMS arms of the family (an arm is not compared with itself)."""
599
  if not summary:
600
  return {}
601
+ if fam in SO_FAMILIES:
602
  return summary.get("joints", {})
603
  if summary.get("arms_by_family", {}).get(fam, 0) < COMPARE_MIN_ARMS:
604
  return {}
 
649
  if "one_side_p95_mm" not in t:
650
  L.append(f"At the gripper: {t.get('not_computed', 'not computed')}")
651
  return "\n".join(L + correction_text(card))
652
+ ts = (summary or {}).get("tip", {}) if fam in SO_FAMILIES else {}
653
  L += [
654
  "At the gripper (sideways error of the tool point, table poses 13-25 cm in front of the base):",
655
  f" arriving from one side 95% within {t['one_side_p95_mm']:.1f} mm {_place(t['one_side_p95_mm'], ts.get('one_side_p95_mm', {}))}",
py/playfix.py CHANGED
@@ -25,13 +25,15 @@ TIP = ("shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll"
25
  MAX_HALF_STEPS = 30.0 # holdcheck gives a correction only up to 60 steps of play; a larger one is refused
26
  STEP_DEG = 360.0 / 4096.0 # one encoder step of an SO-100/101 (STS3215) or Koch (Dynamixel) servo
27
  TURN_STEPS = 4096
28
- FAMILIES = ("so100", "so101", "koch", "mixed") # the arms holdcheck gives a correction for
29
 
30
 
31
  def _family(robot_type) -> str:
32
  rt = str(robot_type or "").lower().replace("-", "")
33
  if "koch" in rt and "so10" in rt:
34
  return "mixed"
 
 
35
  for f, pre in (("so101", ("so101",)), ("so100", ("so100", "so_100")), ("koch", ("koch",))):
36
  if rt.startswith(pre):
37
  return f
 
25
  MAX_HALF_STEPS = 30.0 # holdcheck gives a correction only up to 60 steps of play; a larger one is refused
26
  STEP_DEG = 360.0 / 4096.0 # one encoder step of an SO-100/101 (STS3215) or Koch (Dynamixel) servo
27
  TURN_STEPS = 4096
28
+ FAMILIES = ("so100", "so101", "so", "koch", "mixed") # the arms holdcheck gives a correction for
29
 
30
 
31
  def _family(robot_type) -> str:
32
  rt = str(robot_type or "").lower().replace("-", "")
33
  if "koch" in rt and "so10" in rt:
34
  return "mixed"
35
+ if rt == "so_follower":
36
+ return "so"
37
  for f, pre in (("so101", ("so101",)), ("so100", ("so100", "so_100")), ("koch", ("koch",))):
38
  if rt.startswith(pre):
39
  return f