from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import ExecuteProcess
from launch.substitutions import LaunchConfiguration
from launch.conditions import IfCondition

def generate_launch_description():
    return LaunchDescription([
        # 启动orbbec_camera
        #ExecuteProcess(cmd=['ros2','launch', 'orbbec_camera', 'multi_camera.launch.py'],output='screen'),
        # ExecuteProcess(cmd=['ros2','launch', 'orbbec_camera', 'gemini_330_series.launch.py'],output='screen'),
        # ExecuteProcess(cmd=['sleep', '2'],output='screen'),
        ExecuteProcess(cmd=['ros2','launch', 'realsense2_camera','rs_launch.py'],output='screen'),

        ExecuteProcess(cmd=['sleep', '2'],output='screen'),
        
        # 等待一段时间确保相机启动完成
        
        # 启动img_dev_node
        Node(
            package='img_dev',
            executable='img_dev_node',
            name='img_dev_node',
            output='screen',
            parameters=[]
        )
    ])

