from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([
        # 启动joy_node
        Node(
            package='joy',
            executable='joy_node',
            name='joy_node',
            parameters=[{
                'dev': '/dev/input/js0',
                'deadzone': 0.1,
                'autorepeat_rate': 20.0
            }]
        ),
        
        # 启动joy_control_node
        Node(
            package='game_pad',
            executable='game_pad_node',
            name='game_pad_node',
            output='screen'
        )
    ])
    