From db6f04ea774ab9019a6d80666a4f4fe3fda839d9 Mon Sep 17 00:00:00 2001 From: Steven Gong Date: Fri, 8 Mar 2024 02:39:25 +0000 Subject: [PATCH] Fix more formatting --- .../launch/eve.launch.py | 35 +++++++++------- .../include/pretrained_yolov8.launch.py | 42 +++++++++---------- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/perception/camera_object_detection/launch/eve.launch.py b/src/perception/camera_object_detection/launch/eve.launch.py index a0027cf8..53c3eb08 100755 --- a/src/perception/camera_object_detection/launch/eve.launch.py +++ b/src/perception/camera_object_detection/launch/eve.launch.py @@ -8,29 +8,36 @@ def generate_launch_description(): - launch_traffic_light = LaunchConfiguration('launch_traffic_light', default=True) - launch_traffic_light_arg = DeclareLaunchArgument('launch_traffic_light', - default_value=launch_traffic_light, - description='Launch traffic light detection') - + launch_traffic_light = LaunchConfiguration("launch_traffic_light", default=True) + launch_traffic_light_arg = DeclareLaunchArgument( + "launch_traffic_light", + default_value=launch_traffic_light, + description="Launch traffic light detection", + ) + launch_args = [launch_traffic_light_arg] camera_object_detection_launch_include_dir = os.path.join( - get_package_share_directory('camera_object_detection'), 'launch', 'include') + get_package_share_directory("camera_object_detection"), "launch", "include" + ) pretrained_yolov8_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource( - [camera_object_detection_launch_include_dir, '/pretrained_yolov8.launch.py']), + [camera_object_detection_launch_include_dir, "/pretrained_yolov8.launch.py"] + ), ) traffic_light_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource( - [camera_object_detection_launch_include_dir, '/traffic_light.launch.py']), - condition=LaunchConfigurationEquals( - 'launch_traffic_light', 'True') + [camera_object_detection_launch_include_dir, "/traffic_light.launch.py"] + ), + condition=LaunchConfigurationEquals("launch_traffic_light", "True"), ) - return LaunchDescription(launch_args + [ - pretrained_yolov8_launch, - traffic_light_launch, - ]) + return LaunchDescription( + launch_args + + [ + pretrained_yolov8_launch, + traffic_light_launch, + ] + ) diff --git a/src/perception/camera_object_detection/launch/include/pretrained_yolov8.launch.py b/src/perception/camera_object_detection/launch/include/pretrained_yolov8.launch.py index 9403139f..13096462 100644 --- a/src/perception/camera_object_detection/launch/include/pretrained_yolov8.launch.py +++ b/src/perception/camera_object_detection/launch/include/pretrained_yolov8.launch.py @@ -6,34 +6,34 @@ def generate_launch_description(): config = os.path.join( - get_package_share_directory('camera_object_detection'), - 'config', - 'eve_config.yaml' + get_package_share_directory("camera_object_detection"), "config", "eve_config.yaml" ) left_camera_object_detection_node = Node( - package='camera_object_detection', - executable='camera_object_detection_node', - name='left_camera_object_detection_node', - parameters=[config] + package="camera_object_detection", + executable="camera_object_detection_node", + name="left_camera_object_detection_node", + parameters=[config], ) center_camera_object_detection_node = Node( - package='camera_object_detection', - executable='camera_object_detection_node', - name='center_camera_object_detection_node', - parameters=[config] + package="camera_object_detection", + executable="camera_object_detection_node", + name="center_camera_object_detection_node", + parameters=[config], ) right_camera_object_detection_node = Node( - package='camera_object_detection', - executable='camera_object_detection_node', - name='right_camera_object_detection_node', - parameters=[config] + package="camera_object_detection", + executable="camera_object_detection_node", + name="right_camera_object_detection_node", + parameters=[config], + ) + + return LaunchDescription( + [ + left_camera_object_detection_node, + center_camera_object_detection_node, + right_camera_object_detection_node, + ] ) - - return LaunchDescription([ - left_camera_object_detection_node, - center_camera_object_detection_node, - right_camera_object_detection_node, - ])