From 4e29a3926dc6e24750bf7add36eb273a2946328a Mon Sep 17 00:00:00 2001 From: "1002142102@qq.com" <1002142102@qq.com> Date: Tue, 9 Dec 2025 17:06:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=BF=BD=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/.gitignore | 3 +++ realman.yml => config/realman.example.yml | 0 record.yml => config/record.example.yml | 3 ++- record.py | 2 +- robot_client/robots/realman/motors_bus.py | 8 ++++---- 5 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 config/.gitignore rename realman.yml => config/realman.example.yml (100%) rename record.yml => config/record.example.yml (80%) diff --git a/config/.gitignore b/config/.gitignore new file mode 100644 index 00000000..b7772459 --- /dev/null +++ b/config/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!*.example.yml \ No newline at end of file diff --git a/realman.yml b/config/realman.example.yml similarity index 100% rename from realman.yml rename to config/realman.example.yml diff --git a/record.yml b/config/record.example.yml similarity index 80% rename from record.yml rename to config/record.example.yml index b815675a..f174b38d 100644 --- a/record.yml +++ b/config/record.example.yml @@ -5,4 +5,5 @@ dataset: single_task: test repo_id: yehao/realman-test num_episodes: 2 - fps: 2 + fps: 30 + push_to_hub: false diff --git a/record.py b/record.py index 91d3d0ff..fd658e7a 100644 --- a/record.py +++ b/record.py @@ -412,7 +412,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( + dataset = LeRobotDataset.create(g cfg.dataset.repo_id, cfg.dataset.fps, root=cfg.dataset.root, diff --git a/robot_client/robots/realman/motors_bus.py b/robot_client/robots/realman/motors_bus.py index 0b4925c4..f02cf634 100644 --- a/robot_client/robots/realman/motors_bus.py +++ b/robot_client/robots/realman/motors_bus.py @@ -175,8 +175,8 @@ class RealmanMotorsBus(MotorsBus): def write_arm(self, target_joint: list): ret = self.rmarm.rm_movej_follow(target_joint[:-1]) - if ret != None: - print("movej error:", ret[1]) + if ret != 0: + print("movej error:", ret) return ret ret = self.rmarm.rm_set_gripper_position(target_joint[-1], block=False, timeout=2) @@ -225,8 +225,8 @@ class RealmanMotorsBus(MotorsBus): for k,v in enumerate(self.init_pose): self.init_pose[k]+=values[k] self.rmarm.rm_movej_p(self.init_pose[:-1], 50, 0, 0, 0) - self.init_pose[6]+=actionData['gripper'] - self.rmarm.rm_set_gripper_position(self.init_pose[6]*1000, False) + # self.init_pose[6]+=actionData['gripper'] + # self.rmarm.rm_set_gripper_position(int(self.init_pose[6]*1000), False, 0) def sync_read(self, data_name, motors = None, *, normalize = True, num_retry = 0): if data_name == "Present_Position":