"""RealSense Depth to Costmap Integration"""

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


def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time')

    return LaunchDescription([
        DeclareLaunchArgument('use_sim_time', default_value='false'),

        Node(
            package='depth_image_proc',
            executable='convert_node',
            name='depth_image_converter',
            namespace='camera',
            remappings=[
                ('image_rect', '/camera/aligned_depth_to_color/image_raw'),
                ('camera_info', '/camera/color/camera_info'),
                ('points', '/camera/depth/color/points'),
            ],
            parameters=[{'use_sim_time': use_sim_time}],
            output='screen',
        ),
    ])
