from launch import LaunchDescription
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes
from launch_ros.descriptions import ComposableNode
from launch_ros.substitutions import FindPackageShare
from launch.substitutions import PathJoinSubstitution


def generate_launch_description():
    container = ComposableNodeContainer(
        name='chassis_calibration_service_container',
        namespace='/',
        package='rclcpp_components',
        executable='component_container_mt',
        composable_node_descriptions=[],
        output='screen',
    )

    load_node = LoadComposableNodes(
        target_container='/chassis_calibration_service_container',
        composable_node_descriptions=[
            ComposableNode(
                package='chassis_calibration_service',
                plugin='chassis_calibration_service::ChassisCalibrationServiceNode',
                name='chassis_calibration_service',
                namespace='/',
            )
        ],
    )

    return LaunchDescription([
        container,
        load_node,
    ])
