I have a main bringup.launch.py
launch file of which the launch descriptor includes child.launch.py
as a child launch file like this:
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
def generate_launch_description():
package_prefix = get_package_share_directory('child_package')
argument_for_child = "lala"
return LaunchDescription([
# include the child launch file
IncludeLaunchDescription(
PythonLaunchDescriptionSource([package_prefix, '/launch/child.launch.py'])
),
])
How do I pass an argument from bringup.launch.py
to child.launch.py
?