#!/usr/bin/env python3

from launch import LaunchDescription
from launch_ros.actions import Node
from launch.substitutions import PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare


def generate_launch_description():
    """Launch social memory service node."""

    package_share_dir = FindPackageShare("saltybot_social_memory_node")
    config_file = PathJoinSubstitution(
        [package_share_dir, "config", "social_memory.yaml"]
    )

    social_memory_node = Node(
        package="saltybot_social_memory_node",
        executable="social_memory",
        name="social_memory",
        output="screen",
        parameters=[config_file],
        remappings=[],
    )

    return LaunchDescription([
        social_memory_node,
    ])
