ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is a discussion on this.

Below is my implementation for your reference:

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
import launch_ros.actions

def generate_launch_description():
  default_yaml = os.path.join(get_package_share_directory('my_package'), 'param',
                            'param.yaml')
  return LaunchDescription([
    launch_ros.actions.Node(
        package='my_package', node_executable='my_executable',
        arguments=['-config', default_yaml],
        output='screen'),
])