"""Launch file for saltybot_safety_zone (Issue #575)."""

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description() -> LaunchDescription:
    config = os.path.join(
        get_package_share_directory("saltybot_safety_zone"),
        "config",
        "safety_zone_params.yaml",
    )

    safety_zone_node = Node(
        package="saltybot_safety_zone",
        executable="safety_zone",
        name="safety_zone",
        parameters=[config],
        remappings=[
            # Remap if the upstream mux publishes to a different topic:
            # ("/cmd_vel_input", "/cmd_vel_safe"),
        ],
        output="screen",
    )

    return LaunchDescription([safety_zone_node])
