From a187221e458681e3bc707b558e5829b524624df7 Mon Sep 17 00:00:00 2001 From: Vinman Date: Wed, 22 Jul 2026 10:00:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(umi):=20=E6=B7=BB=E5=8A=A0=E5=B7=A6?= =?UTF-8?q?=E5=8F=B3=20xArm6=20=E5=8F=8C=E8=87=82=20UMI=20=E5=BD=95?= =?UTF-8?q?=E5=88=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增左右双臂 xArm6 的 UMI 遥操作录制配置文件,包含机器人 IP、 相机、遥操作参数及数据集设置;utils 新增 version_ge 版本比较函数。 --- config/umi/left_xarm6_umi_record_config.yaml | 43 +++++++++++++++++++ config/umi/right_xarm6_umi_record_config.yaml | 43 +++++++++++++++++++ src/lerobot_robot_ufactory/utils/utils.py | 6 +++ 3 files changed, 92 insertions(+) create mode 100644 config/umi/left_xarm6_umi_record_config.yaml create mode 100644 config/umi/right_xarm6_umi_record_config.yaml diff --git a/config/umi/left_xarm6_umi_record_config.yaml b/config/umi/left_xarm6_umi_record_config.yaml new file mode 100644 index 0000000..d504d0d --- /dev/null +++ b/config/umi/left_xarm6_umi_record_config.yaml @@ -0,0 +1,43 @@ +robot: + type: uf::robot + id: "uf_robot" + robot_ip: "192.168.1.29" + robot_dof: 6 + control_space: "cartesian" + gripper_type: 0 + max_linear_velocity: 250 + start_joints: [-14.7, 25.6, -49.6, -282.5, 95.9, -65.9] + start_tcp_pose: [400, 0, 150, -90, 0, 0] + cameras: + fisheye: + # type: uf::umi_camera + # serial_number: "250801DR48FB26001379" + # width: 1280 + # height: 1280 + # fps: 30 + type: opencv + index_or_path: "/dev/v4l/by-id/usb-XVisio_Technology_XVisio_vSLAM_250801DR48FB26001379-video-index0" + width: 1280 + height: 1280 + fps: 100 + fourcc: "YUYV" + +teleop: + type: uf::umi_teleop + serial_number: "250801DR48FP26001318" + use_vive_tracker: False + vive_tracker_id: "LHR-555DC7BF" + use_gripper: True + tracker_to_robot_eef: [0, 0, 0, 0, 0, -90] + robot_base_pose: [400, 0, 150, -90, 0, 0] + +dataset: + # root of local repo: /home//.cache/huggingface/lerobot (default) + root: "/home/uf/Data/lerobot_datas/record/ufactory/xarm6_umi_datas" + repo_id: "ufactory/xarm6_umi_datas" + single_task: "Pick up the purple grape and drop into the box on the left." + fps: 60 + episode_time_s: 60 # max duration for one episode + reset_time_s: 20 # time for resetting env between episodes + num_episodes: 100 + push_to_hub: False \ No newline at end of file diff --git a/config/umi/right_xarm6_umi_record_config.yaml b/config/umi/right_xarm6_umi_record_config.yaml new file mode 100644 index 0000000..b79b0a1 --- /dev/null +++ b/config/umi/right_xarm6_umi_record_config.yaml @@ -0,0 +1,43 @@ +robot: + type: uf::robot + id: "uf_robot" + robot_ip: "192.168.1.83" + robot_dof: 6 + control_space: "cartesian" + gripper_type: 2 + max_linear_velocity: 250 + start_joints: [14.5, 25.5, -49.6, -76.8, 95.9, 66.6] + start_tcp_pose: [400, 0, 150, 90, 0, 0] + cameras: + fisheye: + # type: uf::umi_camera + # serial_number: "250801DR48FB26001396" + # width: 1280 + # height: 1280 + # fps: 30 + type: opencv + index_or_path: "/dev/v4l/by-id/usb-XVisio_Technology_XVisio_vSLAM_250801DR48FB26001396-video-index0" + width: 1280 + height: 1280 + fps: 100 + fourcc: "YUYV" + +teleop: + type: uf::umi_teleop + serial_number: "250801DR48FP26001295" + use_vive_tracker: False + vive_tracker_id: "LHR-2425BAD3" + use_gripper: True + tracker_to_robot_eef: [0, 0, 0, 0, 0, -90] + robot_base_pose: [400, 0, 150, 90, 0, 0] + +dataset: + # root of local repo: /home//.cache/huggingface/lerobot (default) + root: "/home/uf/Data/lerobot_datas/record/ufactory/xarm6_umi_datas" + repo_id: "ufactory/xarm6_umi_datas" + single_task: "Pick up the purple grape and drop into the box on the left." + fps: 60 + episode_time_s: 60 # max duration for one episode + reset_time_s: 20 # time for resetting env between episodes + num_episodes: 100 + push_to_hub: False \ No newline at end of file diff --git a/src/lerobot_robot_ufactory/utils/utils.py b/src/lerobot_robot_ufactory/utils/utils.py index 7b6de5b..41cbdd3 100644 --- a/src/lerobot_robot_ufactory/utils/utils.py +++ b/src/lerobot_robot_ufactory/utils/utils.py @@ -72,3 +72,9 @@ def init_keyboard_listener(events: dict = None, on_press: callable = None, on_re listener.start() return listener, events + +def version_ge(ver_str: str, target: str) -> bool: + try: + return tuple(int(x) for x in ver_str.split(".")) >= tuple(int(x) for x in target.split(".")) + except: + return False