From 00581796ec28747cafcc87769d1e7d52726e9819 Mon Sep 17 00:00:00 2001 From: liammcalpineduckietown Date: Sun, 15 Dec 2024 10:12:16 +0200 Subject: [PATCH] window size changes --- duckiebot/calibrate_extrinsics/command.py | 8 +++----- duckiebot/calibrate_intrinsics/command.py | 8 +++----- duckiebot/image_viewer/command.py | 8 ++++---- duckiebot/keyboard_control/command.py | 12 ++---------- duckiebot/led_control/command.py | 5 +++-- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/duckiebot/calibrate_extrinsics/command.py b/duckiebot/calibrate_extrinsics/command.py index 71d0dbfd..b9852c07 100644 --- a/duckiebot/calibrate_extrinsics/command.py +++ b/duckiebot/calibrate_extrinsics/command.py @@ -22,11 +22,9 @@ def command(shell: DTShell, args, **kwargs): # launch viewer launch_viewer( parsed.robot, - "extrinsics_calibrator", + LAUNCHER_NAME, verbose=parsed.vv, window_args={ - "icon": get_asset_icon_path(ICON_ASSET), - "width": 1120, - "height": 660, - }, + "icon": get_asset_icon_path(ICON_ASSET) + } ) diff --git a/duckiebot/calibrate_intrinsics/command.py b/duckiebot/calibrate_intrinsics/command.py index 79ef9dfe..60194574 100644 --- a/duckiebot/calibrate_intrinsics/command.py +++ b/duckiebot/calibrate_intrinsics/command.py @@ -22,11 +22,9 @@ def command(shell: DTShell, args, **kwargs): # launch viewer launch_viewer( parsed.robot, - "intrinsics_calibrator", + LAUNCHER_NAME, verbose=parsed.vv, window_args={ - "icon": get_asset_icon_path(ICON_ASSET), - "width": 1120, - "height": 960, - }, + "icon": get_asset_icon_path(ICON_ASSET) + } ) diff --git a/duckiebot/image_viewer/command.py b/duckiebot/image_viewer/command.py index e1982609..187e9ad2 100644 --- a/duckiebot/image_viewer/command.py +++ b/duckiebot/image_viewer/command.py @@ -5,9 +5,9 @@ # NOTE: this must match the name of the launcher in the dt-duckietown-viewer project LAUNCHER_NAME = "image_viewer" -VIEWER_WINDOW_WIDTH = 702 ICON_ASSET = "icon-image-viewer.png" + class DTCommand(DTCommandAbs): help = "Runs the image viewer" @@ -22,10 +22,10 @@ def command(shell: DTShell, args, **kwargs): # launch viewer launch_viewer( parsed.robot, - "image_viewer", + LAUNCHER_NAME, verbose=parsed.vv, window_args={ "icon": get_asset_icon_path(ICON_ASSET), - "width": VIEWER_WINDOW_WIDTH - }, + "width": 702 + } ) diff --git a/duckiebot/keyboard_control/command.py b/duckiebot/keyboard_control/command.py index cdc3a8a9..32ca5704 100644 --- a/duckiebot/keyboard_control/command.py +++ b/duckiebot/keyboard_control/command.py @@ -5,14 +5,8 @@ # NOTE: this must match the name of the launcher in the dt-duckietown-viewer project LAUNCHER_NAME = "keyboard_controller" - -VIEWER_WINDOW_WIDTH = 550 -VIEWER_WINDOW_HEIGHT = 600 ICON_ASSET = "icon-keyboard-controller.png" -# NOTE: this must match the name of the launcher in the dt-duckietown-viewer project -LAUNCHER_NAME = "keyboard_controller" -ICON_ASSET = "icon-keyboard-control.png" class DTCommand(DTCommandAbs): help = "Runs the keyboard controller" @@ -31,8 +25,6 @@ def command(shell: DTShell, args, **kwargs): LAUNCHER_NAME, verbose=parsed.vv, window_args={ - "width": VIEWER_WINDOW_WIDTH, - "height": VIEWER_WINDOW_HEIGHT, - "icon": get_asset_icon_path(ICON_ASSET), - }, + "icon": get_asset_icon_path(ICON_ASSET) + } ) diff --git a/duckiebot/led_control/command.py b/duckiebot/led_control/command.py index eff31ddd..876699fd 100644 --- a/duckiebot/led_control/command.py +++ b/duckiebot/led_control/command.py @@ -7,6 +7,7 @@ LAUNCHER_NAME = "led_controller" ICON_ASSET = "icon-led-control.png" + class DTCommand(DTCommandAbs): help = "Runs the LED controller" @@ -21,9 +22,9 @@ def command(shell: DTShell, args, **kwargs): # launch viewer launch_viewer( parsed.robot, - "led_controller", + LAUNCHER_NAME, verbose=parsed.vv, window_args={ "icon": get_asset_icon_path(ICON_ASSET) - }, + } )