Skip to content

Commit

Permalink
Fix more formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Gongsta committed Mar 8, 2024
1 parent 5679d63 commit db6f04e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 35 deletions.
35 changes: 21 additions & 14 deletions src/perception/camera_object_detection/launch/eve.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -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,
])

0 comments on commit db6f04e

Please sign in to comment.