Configure Parameters
| ||
LeRobot Tutorial Catalog
- 1. Install Environment
- 2. Configure Parameters
- 3. Remote Control Operation
- 4. Record Dataset
- 5. Visualize Dataset
- 6. Replay Dataset
- 7. Training
- 8. Assessment
2. Configure Parameters
2.1 Parameter File Introduction
- Note: Modify the parameter file within the container.
The location of the parameter file is /home/ws/lerobot/lerobot/common/robot_devices/robots/configs.py
Among them, the RoarmRobotConfig section
- Box 1: The value of the communication serial port of the host robotic arm (with A gripper at the end)
- Box 2: The value of the communication serial port of the slave robotic arm (without A gripper at the end)
- Box 3: Port values for USB camera 1 and USB camera 2 (no order required)
2.2 Get Port Information
- Note that you need to confirm the USB HUB output is set to IN1, and then connect IN1 to the computer or Jetson Orin.
2.2.1 Get Robotic Arm Port Value
Check the current serial port device. First, do not power on the robotic arm. Set the robotic arm power switch to OFF. At this time, there is no need to connect the robotic arm to the USB HUB using a USB cable.
ls /dev/tty*
Next, connect the host robotic arm to the USB1 of the USB HUB using a USB cable. Note that you should connect it to the Type-C interface in the middle of the driver board of the robotic arm (the Type-C interface at the edge is for communication with the radar and does not communicate with the ESP32).
Check the current serial device in the terminal again, and you can see that there is a new device name of /dev/ttyUSB* at this time, which represents the serial port number of the host robotic arm.
Then continue to use the USB cable to connect slave robotic arm to the USB2 of the USB HUB.
Check the current serial device in the terminal again, and you can see that there is a new device name of /dev/ttyUSB* at this time, which represents the port number of the serial port of the slave robotic arm.
After confirming the port numbers of the serial ports for the two robotic arms, you can connect the power to the robotic arms, and set the power switch on the robotic arm to ON.
2.2.2 Get Camera Port Value
First, execute the following command before connecting any cameras to check the camera devices available in the current system.
ls /dev/video*
At this time, you will see the list of existing /dev/video* devices in the system. Connect camera 1 to the USB3 port of the USB HUB using a USB cable, and then execute again:
ls /dev/video*
You will find two new devices added to the list, such as /dev/video0 and /dev/video1, because:
- A single camera is usually recognized as two video devices (for example, one for a color video stream and one for an infrared or depth stream), which occupy two /dev/video ports.
- Typically, we only use the device with an even number (such as /dev/video0), as it is the interface for the main video stream (e.g., RGB images).
Connect camera 2 to the USB4 port of the USB HUB via a USB cable, and then check the device list again:
ls /dev/video*
You will see two additional devices again (such as /dev/video2 and /dev/video3). Similarly, use the video device with an even number (such as /dev/video2) as the main interface for camera 2.
2.3 Sound Card Settings
- The following example uses a USB sound card.
First, query the sound card device information in the host machine.
pactl info
Next, list all available audio output devices and query the serial number of alsa_output.usb-solid_state_system_co._Ltd._USB_PnP_Audio_Device_000000000000-00.analog-stereo.
pactl list short sinks
Finally, set the default audio output device to alsa_output.usb-solid_state_system_co._Ltd._USB_PnP_Audio_Device_000000000000-00.analog-stereo.
pactl set-default-sink [SINK_NAME_OR_INDEX]
Test the sound card output separately in the host and container.
spd-say "hello"
