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

Remove visibility include from docs #1975

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions hardware_interface/doc/writing_new_hardware_component.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ The following is a step-by-step guide to create source files, basic tests, and c
After creating the package, you should have at least ``CMakeLists.txt`` and ``package.xml`` files in it.
Create also ``include/<PACKAGE_NAME>/`` and ``src`` folders if they do not already exist.
In ``include/<PACKAGE_NAME>/`` folder add ``<robot_hardware_interface_name>.hpp`` and ``<robot_hardware_interface_name>.cpp`` in the ``src`` folder.
Optionally add ``visibility_control.h`` with the definition of export rules for Windows.
You can copy this file from an existing controller package and change the name prefix to the ``<PACKAGE_NAME>``.

#. **Adding declarations into header file (.hpp)**

1. Take care that you use header guards. ROS2-style is using ``#ifndef`` and ``#define`` preprocessor directives. (For more information on this, a search engine is your friend :) ).

2. Include ``"hardware_interface/$interface_type$_interface.hpp"`` and ``visibility_control.h`` if you are using one.
2. Include ``"hardware_interface/$interface_type$_interface.hpp"``.
``$interface_type$`` can be ``Actuator``, ``Sensor`` or ``System`` depending on the type of hardware you are using. for more details about each type check :ref:`Hardware Components description <overview_hardware_components>`.

3. Define a unique namespace for your hardware_interface. This is usually the package name written in ``snake_case``.
Expand Down
Loading