From 6f064abc21855cec128a43de121236ee04f3f003 Mon Sep 17 00:00:00 2001 From: Alex Thiele Date: Sat, 7 Dec 2024 08:44:04 -0800 Subject: [PATCH 1/2] Fix --width --height type parsing on opencv script --- lerobot/common/robot_devices/cameras/opencv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/common/robot_devices/cameras/opencv.py b/lerobot/common/robot_devices/cameras/opencv.py index d284cf55a..c8818eb81 100644 --- a/lerobot/common/robot_devices/cameras/opencv.py +++ b/lerobot/common/robot_devices/cameras/opencv.py @@ -494,13 +494,13 @@ def __del__(self): ) 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.", ) From 897032a2b8aa539d02bbf6c622704809823b40b8 Mon Sep 17 00:00:00 2001 From: Alex Thiele Date: Sun, 8 Dec 2024 16:43:08 -0800 Subject: [PATCH 2/2] Update `intelrealsense.py` to also parse `--height` and `--width` as `int` --- lerobot/common/robot_devices/cameras/intelrealsense.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/common/robot_devices/cameras/intelrealsense.py b/lerobot/common/robot_devices/cameras/intelrealsense.py index 84ac540f2..532802227 100644 --- a/lerobot/common/robot_devices/cameras/intelrealsense.py +++ b/lerobot/common/robot_devices/cameras/intelrealsense.py @@ -535,13 +535,13 @@ def __del__(self): ) 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.", )