24 lines
614 B
Python
24 lines
614 B
Python
from launch import LaunchDescription
|
|
from launch_ros.actions import Node
|
|
from ament_index_python.packages import get_package_share_directory
|
|
import os
|
|
|
|
|
|
def generate_launch_description():
|
|
# 获取配置文件路径
|
|
config_dir = os.path.join(
|
|
get_package_share_directory("fu"), "config", "fu_params.yaml"
|
|
)
|
|
|
|
return LaunchDescription(
|
|
[
|
|
Node(
|
|
package="fu",
|
|
executable="fu_node",
|
|
name="FU",
|
|
parameters=[config_dir], # 从YAML文件加载参数
|
|
output="screen",
|
|
),
|
|
]
|
|
)
|