From c10c5a0e6472986fd42ff0f9f49f29351bf3cb15 Mon Sep 17 00:00:00 2001 From: Alex Thiele Date: Thu, 17 Apr 2025 06:19:23 -0700 Subject: [PATCH] Fix --width --height type parsing on opencv and intelrealsense scripts (#556) Co-authored-by: Remi Co-authored-by: Steven Palma --- lerobot/common/robot_devices/cameras/intelrealsense.py | 4 ++-- lerobot/common/robot_devices/cameras/opencv.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lerobot/common/robot_devices/cameras/intelrealsense.py b/lerobot/common/robot_devices/cameras/intelrealsense.py index 7a21661a..3c3cf3c3 100644 --- a/lerobot/common/robot_devices/cameras/intelrealsense.py +++ b/lerobot/common/robot_devices/cameras/intelrealsense.py @@ -512,13 +512,13 @@ if __name__ == "__main__": ) parser.add_argument( "--width", - type=str, + type=int, default=640, help="Set the width for all cameras. If not provided, use the default width of each camera.", ) parser.add_argument( "--height", - type=str, + type=int, default=480, help="Set the height for all cameras. If not provided, use the default height of each camera.", ) diff --git a/lerobot/common/robot_devices/cameras/opencv.py b/lerobot/common/robot_devices/cameras/opencv.py index f279f315..c9226805 100644 --- a/lerobot/common/robot_devices/cameras/opencv.py +++ b/lerobot/common/robot_devices/cameras/opencv.py @@ -492,13 +492,13 @@ if __name__ == "__main__": ) parser.add_argument( "--width", - type=str, + type=int, default=None, help="Set the width for all cameras. If not provided, use the default width of each camera.", ) parser.add_argument( "--height", - type=str, + type=int, default=None, help="Set the height for all cameras. If not provided, use the default height of each camera.", )