Skip to content

Commit

Permalink
Suggest adding exec_depend on ros2launch for packages with launch fil…
Browse files Browse the repository at this point in the history
…es (#1786) (#2138)

* Suggest adding exec_dependency on ros2launch for packages with launch files

Signed-off-by: Christophe Bedard <[email protected]>

* Move note to 'Creating a launch file' tutorial

Signed-off-by: Christophe Bedard <[email protected]>

* Add link to launch file formats guide

Signed-off-by: Christophe Bedard <[email protected]>
(cherry picked from commit 622a1a5)

Co-authored-by: Christophe Bedard <[email protected]>
  • Loading branch information
mergify[bot] and christophebedard authored Nov 24, 2021
1 parent 5de0623 commit eaf02b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/Tutorials/Launch-Files/Creating-Launch-Files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,17 @@ To launch ``turtlesim_mimic_launch.py``, enter into the directory you created ea
You will learn more about :doc:`creating packages <../Creating-Your-First-ROS2-Package>` in a later tutorial.

.. note::

For packages with launch files, it is a good idea to add an ``exec_depend`` dependency on the ``ros2launch`` package in your package's ``package.xml``:

.. code-block:: xml
<exec_depend>ros2launch</exec_depend>
This helps make sure that the ``ros2 launch`` command is available after building your package.
It also ensures that all :doc:`launch file formats <../../How-To-Guides/Launch-file-different-formats>` are recognized.

Two turtlesim windows will open, and you will see the following ``[INFO]`` messages telling you which nodes your launch file has started:

.. code-block:: console
Expand Down

0 comments on commit eaf02b2

Please sign in to comment.