lerobot icon indicating copy to clipboard operation
lerobot copied to clipboard

`control_robot.py` does not work with Windows

Open dibbla opened this issue 1 year ago • 3 comments

System Info

- `lerobot` version: 0.1.0
- Platform: Windows-10-10.0.22631-SP0
- Python version: 3.10.15
- Huggingface_hub version: 0.26.2
- Dataset version: 3.1.0
- Numpy version: 1.26.3
- PyTorch version (GPU?): 2.4.0+cu124 (True)
- Cuda version: 12040
- Using GPU in script?: false

Information

  • [X] One of the scripts in the examples/ folder of LeRobot
  • [ ] My own task or dataset (give details below)

Reproduction

To reporduce, simply run the script on a Windows computer.

For example python .\lerobot\scripts\control_robot.py teleoperate

This might be an issue with serial and DynamixelSDK, and the error message shows that serial.serialutil.SerialException: could not open port '/dev/tty.usbmodem575E0032081' which looks for a Linux-only directory.

#478 might be related, but it just fix the port finding, and does not applied to the problem in this issue.

Is there anyone can help or give some hints in solving this? I am happy to contribute if I can get more familiar with the whole process.

Expected behavior

It should abllow me to teleoperate/control the robot.

dibbla avatar Nov 16 '24 23:11 dibbla

Hi, thanks for reporting this. Have you tried the solution in the related issue you mentioned? Changing the find_available_ports would allow you to find the correct port. Apparently they used port=COM8 in this other issue.

We don't test our code on Windows yet but if you can confirm the fix works, we can implement the change.

aliberts avatar Nov 20 '24 17:11 aliberts

It seems like the script DOES have this support now, it reported to me that it was on COM8 and didn't require any extra configurations to work.

thefaftek-git avatar Jun 15 '25 03:06 thefaftek-git

works also perfectly fine for me with my so100 on windows:

# calibrate
 python -m lerobot.calibrate --robot.type=so100_follower --robot.port=COM4 --robot.id=my_follower_arm

# teleoperate
python -m lerobot.teleoperate --robot.type=so100_follower --robot.port=COM4 --robot.id=my_follower_arm --teleop.type=so100_leader --teleop.port=COM3 --teleop.id=my_leader_arm

[!NOTE]
replace the ports with the correct COM* for your computer

TimPietrusky avatar Jun 15 '25 20:06 TimPietrusky