Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed missed installation of the .yaml parameters file #4272

Closed
wants to merge 9 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,25 @@ Let's now create a configuration file, ``turtlesim.yaml``, in the ``/config`` fo

If we now start the ``turtlesim_world_2.launch.py`` launch file, we will start the ``turtlesim_node`` with preconfigured background colors.

Make sure that you have installed the ``turtlesim.yaml`` file. If you have a C++ package, write in the package ``CMakeLists.txt``:

.. code-block:: cmake
install(DIRECTORY
config
DESTINATION share/${PROJECT_NAME}
)

Instead, if you have a Python package, add in package ``setup.py`` file:

.. code-block:: Python
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
(os.path.join('share', package_name, 'config'), glob('config/*.yaml'))
],

AlessandroMelone marked this conversation as resolved.
Show resolved Hide resolved
To learn more about using parameters and using YAML files, take a look at the :doc:`Understand parameters <../../Beginner-CLI-Tools/Understanding-ROS2-Parameters/Understanding-ROS2-Parameters>` tutorial.

2.3 Using wildcards in YAML files
Expand Down