You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/7_get_started_with_real_robot.md
+34-5Lines changed: 34 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -54,24 +54,53 @@ Then plug the 12V power supply to the motor bus of the follower arm. It has two
54
54
55
55
Finally, connect both arms to your computer via USB. Note that the USB doesn't provide any power, and both arms need to be plugged in with their associated power supply to be detected by your computer.
56
56
57
-
*Copy pasting python code*
57
+
Now you are ready to configure your motors for the first time, as detailed in the sections below. In the upcoming sections, you'll learn about our classes and functions by running some python code in an interactive session, or by copy-pasting it in a python file.
58
58
59
-
In the upcoming sections, you'll learn about our classes and functions by running some python code, in an interactive session, or by copy-pasting it in a python file. If this is your first time using the tutorial., we highly recommend going through these steps to get deeper intuition about how things work. Once you're more familiar, you can streamline the process by directly running the teleoperate script (which is detailed further in the tutorial):
59
+
If you have already configured your motors the first time, you can streamline the process by directly running the teleoperate script (which is detailed further in the tutorial):
--robot-overrides '~cameras'# do not instantiate the cameras
64
64
```
65
65
66
66
It will automatically:
67
-
1. Detect and help you correct any motor configuration issues.
68
-
2. Identify any missing calibrations and initiate the calibration procedure.
69
-
3. Connect the robot and start teleoperation.
67
+
1. Identify any missing calibrations and initiate the calibration procedure.
68
+
2. Connect the robot and start teleoperation.
70
69
71
70
### a. Control your motors with DynamixelMotorsBus
72
71
73
72
You can use the [`DynamixelMotorsBus`](../lerobot/common/robot_devices/motors/dynamixel.py) to communicate with the motors connected as a chain to the corresponding USB bus. This class leverages the Python [Dynamixel SDK](https://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/sample_code/python_read_write_protocol_2_0/#python-read-write-protocol-20) to facilitate reading from and writing to the motors.
74
73
74
+
**First Configuration of your motors**
75
+
76
+
You will need to unplug each motor in turn and run a command the identify the motor. The motor will save its own identification, so you only need to do this once. Start by unplugging all of the motors.
77
+
78
+
Do the Leader arm first, as all of its motors are of the same type. Plug in your first motor on your leader arm and run this script to set its ID to 1.
79
+
```bash
80
+
python lerobot/scripts/configure_motor.py \
81
+
--port /dev/tty.usbmodem58760432961 \
82
+
--brand dynamixel \
83
+
--model xl330-m288 \
84
+
--baudrate 1000000 \
85
+
--ID 1
86
+
```
87
+
88
+
Then unplug your first motor and plug the second motor and set its ID to 2.
89
+
```bash
90
+
python lerobot/scripts/configure_motor.py \
91
+
--port /dev/tty.usbmodem58760432961 \
92
+
--brand dynamixel \
93
+
--model xl330-m288 \
94
+
--baudrate 1000000 \
95
+
--ID 2
96
+
```
97
+
98
+
Redo the process for all your motors until ID 6.
99
+
100
+
The process for the follower arm is almost the same, but the follower arm has two types of motors. For the first two motors, make sure you set the model to `xl430-w250`. _Important: configuring follower motors requires plugging and unplugging power. Make sure you use the 5V power for the XL330s and the 12V power for the XL430s!_
101
+
102
+
After all of your motors are configured properly, you're ready to plug them all together in a daisy-chain as shown in the original video.
103
+
75
104
**Instantiate the DynamixelMotorsBus**
76
105
77
106
To begin, create two instances of the [`DynamixelMotorsBus`](../lerobot/common/robot_devices/motors/dynamixel.py), one for each arm, using their corresponding USB ports (e.g. `DynamixelMotorsBus(port="/dev/tty.usbmodem575E0031751"`).
0 commit comments