From 450383cabb4cd85460f38e1022f466f326807075 Mon Sep 17 00:00:00 2001 From: yutang Date: Wed, 10 Dec 2025 09:36:49 +0800 Subject: [PATCH] youhuaxiangji --- pyproject.toml | 1 + record.py | 4 +++- .../teleoperators/flight_stick/flight_stick.py | 2 +- uv.lock | 13 +++++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 30ff5157..a1576a5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,4 +8,5 @@ dependencies = [ "lerobot>=0.4.2", "Robotic_Arm==1.0.4.1", "pygame==2.6.1", + "pyrealsense2>=2.56.5.9235", ] diff --git a/record.py b/record.py index fd658e7a..262022d6 100644 --- a/record.py +++ b/record.py @@ -126,6 +126,8 @@ from lerobot.utils.utils import ( from lerobot.utils.visualization_utils import init_rerun, log_rerun_data from robot_client.robots.realman import RealmanRobot,RealmanRobotConfig from robot_client.teleoperators.xbox import Xbox,XboxConfig +from robot_client.teleoperators.flight_stick import FlightStick,FlightStickConfig + @dataclass @@ -412,7 +414,7 @@ def record(cfg: RecordConfig) -> LeRobotDataset: else: # Create empty dataset or load existing saved episodes sanity_check_dataset_name(cfg.dataset.repo_id, cfg.policy) - dataset = LeRobotDataset.create(g + dataset = LeRobotDataset.create( cfg.dataset.repo_id, cfg.dataset.fps, root=cfg.dataset.root, diff --git a/robot_client/teleoperators/flight_stick/flight_stick.py b/robot_client/teleoperators/flight_stick/flight_stick.py index 8159490b..9263ac11 100644 --- a/robot_client/teleoperators/flight_stick/flight_stick.py +++ b/robot_client/teleoperators/flight_stick/flight_stick.py @@ -10,7 +10,7 @@ class FlightStick(Xbox): def get_action(self): pygame.event.pump() - pose_speeds = [0.0] * 6 + pose_speeds = {} """更新末端位姿控制""" # 根据控制模式调整步长 current_linear_step = self.linear_step * (0.1 if self.fine_control_mode else 1.0) diff --git a/uv.lock b/uv.lock index 8dbd9840..73bfe593 100644 --- a/uv.lock +++ b/uv.lock @@ -1716,6 +1716,17 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4d/a6/708a55f3ff7a18c403b30a29a11dccfed0410485a7548c60a4b6d4cc0676/pyobjc_framework_quartz-12.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0cc08fddb339b2760df60dea1057453557588908e42bdc62184b6396ce2d6e9a", size = 224580, upload-time = "2025-11-14T10:01:00.091Z" }, ] +[[package]] +name = "pyrealsense2" +version = "2.56.5.9235" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fc/20/a46e60a496a17f1cf0cbdffb45e66dc015756e4dbce83580fd569e53e178/pyrealsense2-2.56.5.9235-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:ba2c22981111adbefb169c39e023af4352a2409dfbff59f02c2404c68b82064b", size = 11062766, upload-time = "2025-07-28T14:59:26.551Z" }, + { url = "https://files.pythonhosted.org/packages/22/b5/dd8349abac780aed774f65825fc2ed3ca832b0ad2bf3293262bfa9a517b2/pyrealsense2-2.56.5.9235-cp312-cp312-win_amd64.whl", hash = "sha256:e9c64b94cf6170a3ad60416ff1bf969df8aafe383d4bff14e0fa10b2459d885b", size = 7801788, upload-time = "2025-07-28T14:59:28.303Z" }, + { url = "https://files.pythonhosted.org/packages/a8/66/fa706f1d906a06d5e7015d5b412a48de9914549792eb5cb53c1854e06427/pyrealsense2-2.56.5.9235-cp313-cp313-manylinux1_x86_64.whl", hash = "sha256:c203bc8c79d5958889681408f1038ee69b0021fd8cba7ff2d4532fc90295c4fc", size = 11062717, upload-time = "2025-07-28T14:59:30.072Z" }, + { url = "https://files.pythonhosted.org/packages/b2/88/19425ce6fa809d31a8d23f46dfa6aed9b16a881e8a00e0162d4b97ba1e64/pyrealsense2-2.56.5.9235-cp313-cp313-win_amd64.whl", hash = "sha256:ad8012f7fec843c3c6ec8904bfff048806dc7b4c7709e021c6ea75e83d8d5096", size = 7802471, upload-time = "2025-07-28T14:59:31.985Z" }, +] + [[package]] name = "pyserial" version = "3.5" @@ -1935,6 +1946,7 @@ source = { virtual = "." } dependencies = [ { name = "lerobot" }, { name = "pygame" }, + { name = "pyrealsense2" }, { name = "robotic-arm" }, ] @@ -1942,6 +1954,7 @@ dependencies = [ requires-dist = [ { name = "lerobot", specifier = ">=0.4.2" }, { name = "pygame", specifier = "==2.6.1" }, + { name = "pyrealsense2", specifier = ">=2.56.5.9235" }, { name = "robotic-arm", specifier = "==1.0.4.1" }, ]