Ask Your Question

How to include another package's launchfile in my launchfile ?

asked 2020-07-21 11:56:33 -0600

bastien gravatar image

updated 2020-07-21 12:51:19 -0600

Hi all,

I got a problem. I don't see a way to include an another launchfile from a launchfile that is not in the current package. I want to add arguments to this launchfile

Example :

To include an other launchfile I do this :

IncludeLaunchDescription( PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/']), launch_arguments={'world': 'PATH'}.items(),

I'm not able to find a substitution to (in my example) the package gazebo_ros. Is it possible ?

An other question, how can I put multiple argument on this include like :

IncludeLaunchDescription( PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/']), launch_arguments={'world': 'PATH','verbose':'true'}.items(),

Thanks a lot for your answer.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-08-02 06:57:10 -0600

updated 2020-08-02 06:57:34 -0600

Hey @bastien, here is an example you can include launch file from another package:

                os.path.join(get_package_share_directory('another_package'), 'launch', '')
                'world': 'PATH',
                'verbose': 'true'

Your approach to pass multiple arguments seems to be correct.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-07-21 11:56:33 -0600

Seen: 510 times

Last updated: Aug 02 '20