AlohaMini入门教程-测试-配置机械臂和相机的端口
说明:
- 介绍如何配置机械臂和相机的端口
配置机械臂的端口步骤:
- 查看机械臂的端口
ls /dev/ttyACM*
/dev/ttyACM0 /dev/ttyACM1
- 添加权限
sudo chmod 777 /dev/ttyACM*
- 配置机械臂的端口,左臂/dev/left_arm,右臂/dev/right_arm
vim ~/lerobot_alohamini/src/lerobot/robots/alohamini/config_lekiwi.py
left_port: str = "/dev/left_arm" # port to connect to the bus
right_port: str = "/dev/right_arm" # port to connect to the bus
配置相机的端口步骤:
- 查看相机的端口,相机端口为/dev/video0,/dev/video2
ls /dev/video*
crw-rw-rw-+ 1 root video 81, 14 8月 6 02:00 /dev/video0
crw-rw----+ 1 root video 81, 15 8月 6 02:00 /dev/video1
crw-rw----+ 1 root video 81, 1 8月 6 02:00 /dev/video10
crw-rw----+ 1 root video 81, 5 8月 6 02:00 /dev/video11
crw-rw----+ 1 root video 81, 8 8月 6 02:00 /dev/video12
crw-rw----+ 1 root video 81, 0 8月 6 02:00 /dev/video13
crw-rw----+ 1 root video 81, 2 8月 6 02:00 /dev/video14
crw-rw----+ 1 root video 81, 3 8月 6 02:00 /dev/video15
crw-rw----+ 1 root video 81, 4 8月 6 02:00 /dev/video16
crw-rw----+ 1 root video 81, 11 8月 6 02:00 /dev/video18
crw-rw----+ 1 root video 81, 13 8月 6 02:00 /dev/video19
crw-rw-rw-+ 1 root video 81, 16 8月 6 02:00 /dev/video2
crw-rw----+ 1 root video 81, 6 8月 6 02:00 /dev/video20
crw-rw----+ 1 root video 81, 7 8月 6 02:00 /dev/video21
crw-rw----+ 1 root video 81, 9 8月 6 02:00 /dev/video22
crw-rw----+ 1 root video 81, 10 8月 6 02:00 /dev/video23
crw-rw----+ 1 root video 81, 17 8月 6 02:00 /dev/video3
crw-rw----+ 1 root video 81, 12 8月 6 02:00 /dev/video31
- 查看可以使用相机的端口,相机端口为/dev/video0,/dev/video2
conda activate lerobot_alohamini
lerobot-find-cameras opencv
--- Detected Cameras ---
Camera #0:
Name: OpenCV Camera @ /dev/video0
Type: OpenCV
Id: /dev/video0
Backend api: V4L2
Default stream profile:
Format: 0.0
Fourcc: YUYV
Width: 640
Height: 480
Fps: 30.0
--------------------
Camera #1:
Name: OpenCV Camera @ /dev/video2
Type: OpenCV
Id: /dev/video2
Backend api: V4L2
Default stream profile:
Format: 0.0
Fourcc: YUYV
Width: 640
Height: 480
Fps: 30.0
--------------------
- 修改相机端口,head_top,head_front:(
pc端和树莓派端要保持一致)
vim ~/lerobot_alohamini/src/lerobot/robots/alohamini/config_lekiwi.py
def lekiwi_cameras_config() -> dict[str, CameraConfig]:
return {
"head_top": OpenCVCameraConfig(
index_or_path="/dev/front_top_camera", fps=15, width=320, height=240, rotation=Cv2Rotation.NO_ROTATION
),
# "head_back": OpenCVCameraConfig(
# index_or_path="/dev/video2", fps=15, width=320, height=240, rotation=Cv2Rotation.NO_ROTATION
# ),
"head_front": OpenCVCameraConfig(
index_or_path="/dev/front_bottom_camera", fps=15, width=320, height=240, rotation=Cv2Rotation.NO_ROTATION
),
# "wrist_left": OpenCVCameraConfig(
# index_or_path="/dev/am_camera_wrist_left", fps=30, width=640, height=480, rotation=Cv2Rotation.NO_ROTATION
# ),
# "wrist_right": OpenCVCameraConfig(
# index_or_path="/dev/am_camera_wrist_right", fps=30, width=640, height=480, rotation=Cv2Rotation.NO_ROTATION
# ),
}
- 校准文件的位置:
/home/ubuntu/.cache/huggingface/lerobot/calibration
- 如果校准出错,可以删掉校准文件,重新校准
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


















