from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

def generate_launch_description():
    interface = LaunchConfiguration('interface', default='can0')

    return LaunchDescription([
        DeclareLaunchArgument('interface', default_value='can0'),
        Node(
            package='can_driver',
            executable='can_bridge',
            name='can_bridge',
            parameters=[{'interface': interface}],
            output='screen'
        )
        # Node(
        #     package='can_driver',
        #     executable='can_analy',
        #     name='can_analy',
        #     output='screen'
        # )
    ])
