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 platooning_control_node.
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')
39 param_file_path = os.path.join(
40 get_package_share_directory(
'platooning_control'),
'config/parameters.yaml')
44 container = ComposableNodeContainer(
45 package=
'carma_ros2_utils',
46 name=
'platooning_control_container',
47 namespace=GetCurrentNamespace(),
48 executable=
'carma_component_container_mt',
49 composable_node_descriptions=[
53 package=
'platooning_control',
54 plugin=
'platooning_control::PlatooningControlPlugin',
55 name=
'platooning_control',
57 {
'use_intra_process_comms':
True},
58 {
'--log-level' : log_level }
60 parameters=[ param_file_path ]
65 return LaunchDescription([
66 declare_log_level_arg,