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

Open
wants to merge 7 commits into
base: humble
Choose a base branch
from

Conversation

AlessandroMelone
Copy link

@AlessandroMelone AlessandroMelone commented Apr 11, 2024

In the section "2.2 Loading parameters from YAML file", it was missing the necessity of installing the .yaml file. Missing that step, I was not generating the .yaml file in the /install folder, and therefore getting a runtime error.
I tested what is written in C++.

I was able to understand the solution to my problem thanks to this guide https://roboticsbackend.com/ros2-yaml-params/

In the section "2.2 Loading parameters from YAML file", it was missing the necessity of installing the .yaml file.
I tested what is written in C++

Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
AlessandroMelone and others added 3 commits April 12, 2024 18:09
…ge-Projects.rst


added empty line before the code-block

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
…ge-Projects.rst


added empty line before the code-block

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
removed empty line as suggested by ahcorde 

Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more comment

…ge-Projects.rst

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with code-block category fix.

AlessandroMelone and others added 2 commits April 13, 2024 22:34
…ge-Projects.rst

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
…ge-Projects.rst

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: AlessandroMelone <63403736+AlessandroMelone@users.noreply.github.com>
Comment on lines +223 to +241
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'))
],

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole thing should go above the line If we now start... above.

Further, the way we handle C++ vs. Python in other tutorials is through the use of group-tabs, and I think we should do the same here. You can see an example of this in action in

.. tabs::
.. group-tab:: C++
.. code-block:: C++
// printf style
RCLCPP_DEBUG(node->get_logger(), "My log message %d", 4);
// C++ stream style
RCLCPP_DEBUG_STREAM(node->get_logger(), "My log message " << 4);
.. group-tab:: Python
.. code-block:: python
node.get_logger().debug('My log message %d' % (4))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants