init
This commit is contained in:
16
Node_ws/cppNode/launch/cpp_node.launch.py
Normal file
16
Node_ws/cppNode/launch/cpp_node.launch.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# 导入必要的库
|
||||
# LaunchDescription用于描述整个launch文件的内容,Node用于定义要启动的ROS2节点
|
||||
from launch import LaunchDescription
|
||||
# 导入Node类,用于定义要启动的ROS2节点
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
return LaunchDescription([
|
||||
Node(
|
||||
package='cpp_node', # 包名
|
||||
executable='cpp_node', # 可执行文件名
|
||||
name='cpp_node', # 节点名称
|
||||
output='screen' # 输出日志到屏幕
|
||||
)
|
||||
])
|
||||
Reference in New Issue
Block a user