15from ament_index_python 
import get_package_share_directory
 
   16from launch 
import LaunchDescription
 
   17from launch_ros.actions 
import ComposableNodeContainer
 
   18from launch_ros.descriptions 
import ComposableNode
 
   19from launch.actions 
import DeclareLaunchArgument
 
   20from launch.substitutions 
import LaunchConfiguration
 
   21from carma_ros2_utils.launch.get_current_namespace 
import GetCurrentNamespace
 
   27This file is can be used to launch the CARMA stop_controlled_intersection_tactical_plugin_container. 
   28  Though in carma-platform it may be launched directly 
from the base launch file.
 
   31def generate_launch_description(): 
   34    log_level = LaunchConfiguration(
'log_level')
 
   35    declare_log_level_arg = DeclareLaunchArgument(
 
   36        name =
'log_level', default_value=
'WARN')
 
   38    stop_controlled_intersection_tactical_plugin_file_path = os.path.join(
 
   39        get_package_share_directory(
'stop_controlled_intersection_tactical_plugin'), 
'config/parameters.yaml')
 
   42    container = ComposableNodeContainer(
 
   43        package=
'carma_ros2_utils',
 
   44        name=
'stop_controlled_intersection_tactical_plugin_container',
 
   45        namespace=GetCurrentNamespace(),
 
   46        executable=
'carma_component_container_mt',
 
   47        composable_node_descriptions=[
 
   51                package=
'stop_controlled_intersection_tactical_plugin',
 
   52                plugin=
'stop_controlled_intersection_tactical_plugin::StopControlledIntersectionTacticalPlugin',
 
   53                name=
'stop_controlled_intersection_tactical_plugin',
 
   55                    {
'use_intra_process_comms': 
True},
 
   56                    {
'--log-level' : log_level }
 
   59                    stop_controlled_intersection_tactical_plugin_file_path
 
   65    return LaunchDescription([
 
   66        declare_log_level_arg,