diff --git a/.cache/calibration/so100/main_follower.json b/.cache/calibration/so100/main_follower.json new file mode 100644 index 000000000..f4db4865f --- /dev/null +++ b/.cache/calibration/so100/main_follower.json @@ -0,0 +1 @@ +{"homing_offset": [-2090, 3086, -952, -2089, 2063, -2472], "drive_mode": [0, 1, 0, 0, 1, 0], "start_pos": [2077, 3156, 908, 2047, 2047, 2048], "end_pos": [3114, -2062, 1976, 3113, -1039, 3496], "calib_mode": ["DEGREE", "DEGREE", "DEGREE", "DEGREE", "DEGREE", "LINEAR"], "motor_names": ["shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll", "gripper"]} \ No newline at end of file diff --git a/.cache/calibration/so100/main_leader.json b/.cache/calibration/so100/main_leader.json new file mode 100644 index 000000000..cd40cfe38 --- /dev/null +++ b/.cache/calibration/so100/main_leader.json @@ -0,0 +1 @@ +{"homing_offset": [-2038, 2985, -1088, -2115, 2060, -1962], "drive_mode": [0, 1, 0, 0, 1, 0], "start_pos": [2052, 3087, 960, 2047, 2011, 2047], "end_pos": [3062, -1961, 2112, 3139, -1036, 2986], "calib_mode": ["DEGREE", "DEGREE", "DEGREE", "DEGREE", "DEGREE", "LINEAR"], "motor_names": ["shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll", "gripper"]} \ No newline at end of file diff --git a/lerobot/common/robot_devices/robots/configs.py b/lerobot/common/robot_devices/robots/configs.py index e940b442f..6e9c8e587 100644 --- a/lerobot/common/robot_devices/robots/configs.py +++ b/lerobot/common/robot_devices/robots/configs.py @@ -443,7 +443,7 @@ class So100RobotConfig(ManipulatorRobotConfig): leader_arms: dict[str, MotorsBusConfig] = field( default_factory=lambda: { "main": FeetechMotorsBusConfig( - port="/dev/tty.usbmodem58760431091", + port="/dev/ttyACM0", motors={ # name: (index, model) "shoulder_pan": [1, "sts3215"], @@ -460,7 +460,7 @@ class So100RobotConfig(ManipulatorRobotConfig): follower_arms: dict[str, MotorsBusConfig] = field( default_factory=lambda: { "main": FeetechMotorsBusConfig( - port="/dev/tty.usbmodem585A0076891", + port="/dev/ttyACM1", motors={ # name: (index, model) "shoulder_pan": [1, "sts3215"], @@ -476,14 +476,14 @@ class So100RobotConfig(ManipulatorRobotConfig): cameras: dict[str, CameraConfig] = field( default_factory=lambda: { - "laptop": OpenCVCameraConfig( - camera_index=0, + "top": OpenCVCameraConfig( + camera_index=2, fps=30, width=640, height=480, ), - "phone": OpenCVCameraConfig( - camera_index=1, + "wrist": OpenCVCameraConfig( + camera_index=0, fps=30, width=640, height=480, diff --git a/lerobot/common/robot_devices/robots/feetech_calibration.py b/lerobot/common/robot_devices/robots/feetech_calibration.py index 2c1e7180e..a3d1d127f 100644 --- a/lerobot/common/robot_devices/robots/feetech_calibration.py +++ b/lerobot/common/robot_devices/robots/feetech_calibration.py @@ -36,6 +36,11 @@ ZERO_POSITION_DEGREE = 0 ROTATED_POSITION_DEGREE = 90 +def reset_middle_positions(arm: MotorsBus): + input("Please move the robot to the new middle position for calibration, then press Enter...") + # Write 128 to Torque_Enable for all motors. + arm.write("Torque_Enable", 128) + def assert_drive_mode(drive_mode): # `drive_mode` is in [0,1] with 0 means original rotation direction for the motor, and 1 means inverted. if not np.all(np.isin(drive_mode, [0, 1])): @@ -439,6 +444,8 @@ def run_arm_manual_calibration(arm: MotorsBus, robot_type: str, arm_name: str, a print(f"\nRunning calibration of {robot_type} {arm_name} {arm_type}...") + reset_middle_positions(arm) + print("\nMove arm to zero position") print("See: " + URL_TEMPLATE.format(robot=robot_type, arm=arm_type, position="zero")) input("Press Enter to continue...")