From 952e892fe55a4b3c28d4963f4a2db65e14d8e9e5 Mon Sep 17 00:00:00 2001 From: Pepijn <138571049+pkooij@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:36:37 +0100 Subject: [PATCH] Use float32 instead of int (#877) --- lerobot/common/robot_devices/robots/manipulator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/common/robot_devices/robots/manipulator.py b/lerobot/common/robot_devices/robots/manipulator.py index 8a7c7fe..9173abc 100644 --- a/lerobot/common/robot_devices/robots/manipulator.py +++ b/lerobot/common/robot_devices/robots/manipulator.py @@ -474,7 +474,7 @@ class ManipulatorRobot: # Used when record_data=True follower_goal_pos[name] = goal_pos - goal_pos = goal_pos.numpy().astype(np.int32) + goal_pos = goal_pos.numpy().astype(np.float32) self.follower_arms[name].write("Goal_Position", goal_pos) self.logs[f"write_follower_{name}_goal_pos_dt_s"] = time.perf_counter() - before_fwrite_t @@ -596,7 +596,7 @@ class ManipulatorRobot: action_sent.append(goal_pos) # Send goal position to each follower - goal_pos = goal_pos.numpy().astype(np.int32) + goal_pos = goal_pos.numpy().astype(np.float32) self.follower_arms[name].write("Goal_Position", goal_pos) return torch.cat(action_sent)