"""Launch file for balance controller node."""

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


def generate_launch_description():
    """Generate launch description for balance controller."""
    return LaunchDescription([
        DeclareLaunchArgument(
            "node_name",
            default_value="balance_controller",
            description="Name of the balance controller node",
        ),
        DeclareLaunchArgument(
            "config_file",
            default_value="balance_params.yaml",
            description="Configuration file for balance controller parameters",
        ),
        Node(
            package="saltybot_balance_controller",
            executable="balance_controller_node",
            name=LaunchConfiguration("node_name"),
            output="screen",
            parameters=[
                LaunchConfiguration("config_file"),
            ],
        ),
    ])
