$ lerobot-setup-motors --robot.type=so101_follower --robot.port=/dev/tty.usbmodem59700737971
This command works very well. I would like you to write a script that is a modified version of this in the scripts folder here. When it's connected to a motor it should just check. It should say, "Hey are we connected to this motor?" If we're connected to this motor, you just dump all of the details about the motor, including if it's already had its motor ID set or not, and then any firmware did, basically all the data we can read back about this motor. Just use the stuff that's used; follow all the code in the command.
go to ./lerobot/ to find the source code for this command
Implemented ✅ scripts/lerobot_check_motor_details.py
lerobot-setup-motors (--robot.type, --robot.port, etc.).reversed(bus.motors)), prompting you to connect one motor at a time.scripts/lerobot_check_motor_details.pyIf you want, I can also add a non-interactive mode (single connected motor scan + dump) so you don’t have to press Enter for each expected joint.
run it
lol wait does your script write any values?
Great question — no, it does not write motor values.
It is read-only in practice:
_find_single_motor, _read, firmware/model reads)setup_motor()write() / sync_write() to motor registersdisable_torque=False (so it doesn’t even torque-off on exit)Only thing it changes is the PC serial baudrate setting while scanning (bus.set_baudrate(...)), not motor EEPROM/registers.
If you want, I can still run it now; just note it’s interactive (asks you to connect one motor and press Enter).
So all of the loop that you took about iterating through the gripper motor and going in order is BS, right, because I just have it connected to the shoulder pan motor and I want to just investigate that one only. Can you edit the script accordingly to just investigate, check if a motor is connected, ask the user to press enter, and then just dump the information about it?
Yep — agreed, that loop was unnecessary for your use case. I’ve changed it.
scripts/lerobot_check_motor_details.py now:
No per-joint loop anymore.
If you want, I can run this now against your connected shoulder-pan motor.
The script hangs after "hey are we connected". It did not hang in the first iteration
Yep — good catch. That hang was from my second rewrite’s discovery path, not what you wanted.
I’ve fixed it by reverting to a single targeted motor check (fast path), no global scan loop.
scripts/lerobot_check_motor_details.py_find_single_motor(...).--motor_name (default: shoulder_pan)Also kept it read-only (no write/setup calls).
If you want, I can now run this exact command.
make me a nice TUI that shows off this information. Just get the job done. I'd rather a simple piece of code i can upgrade + hack on, rather than gigabloat
Done. I added a simple, hackable TUI:
scripts/lerobot_motor_tui.py--motor_name, default shoulder_pan).q to quit.Run it like this:
If you want next, I can add:
r),use #!/usr/bin/env -S uv run --script --with <deps> for your shebang so i can run scripts easierly
also, use rich for the nicer UI (and rewrite it cuz i deleted it lol. you can just fetch it from your context lol which you can find with traces --list --dir . --json)
Perfect — rewrote it with the uv run --script shebang and Rich UI.
scripts/lerobot_motor_tui.py--motor_name, default shoulder_pan).q to quit.If you want, next I can add tiny QoL keys: r (force refresh), j/k (scroll register window), e (export snapshot JSON).
well scrolling doesn't work? neither does search (via '/'). You can just output it nicely, and I'll pipe it into less. much easier than coding everythign
100% fair — agreed. I added a non-TUI pretty dump script so you can just pipe to less.
scripts/lerobot_motor_dump.pyIf you want, I can also delete scripts/lerobot_motor_tui.py to keep only the simple path.
yeah delete it
Done — deleted:
scripts/lerobot_motor_tui.pyRemaining relevant script:
scripts/lerobot_motor_dump.py ✅