Ask Your Question
0

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

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

bastien gravatar image

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

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(), '/gzserver.launch.py']), 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(), '/gzserver.launch.py']), 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
0

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

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

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

   IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(get_package_share_directory('another_package'), 'launch', 'gzserver.launch.py')
            ),
            launch_arguments={
                'world': 'PATH',
                'verbose': 'true'
            }.items()
    )

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

2 followers

Stats

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

Seen: 73 times

Last updated: Aug 02