Python equivalent of xml built-in substitutions for launch files
What is the python equivalent of xml built-in substitutions such as find-pkg-share
when using a python launch file?
e.g. if I need to reference a certain file of a certain package in my python based launch file,
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription([
Node(
package='my_package1',
node_namespace='my_package1',
node_executable='node',
node_name='my_package1',
parameters=[
{"nav_graph_file", <find-pkg-share my_package2>/my_nav_file.yml}
]
)
])
Did you find any solution to this?
@adsasine yes, I've answered my question below