Skip to content

Ament lint documentation #58

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

Merged
merged 6 commits into from
Jun 6, 2024

Conversation

fjanguita
Copy link
Contributor

· Documentation for configuring, running and passing ament_lint_tests added.
· Documentation structure at 'Develop Guide' refactored to include new section.
· Documentation on new section for setting up VSCode for testing added.

fjanguita added 2 commits June 5, 2024 11:31

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added documentation for ament_lint tests
@fjanguita fjanguita requested a review from RPS98 June 5, 2024 10:21
},
"autopep8.args": ["--max-line-length=99", "--ignore=''"],

// ROS2 uses as a linter flake8==4.0.1 (apt installation). Pip installation should be
Copy link
Member

Choose a reason for hiding this comment

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

Afaik, this issue happens only with ROS 2 Humble. Newer versions of ROS 2 include upgraded flake8 (in ament_flake8). Thus, flake8 might be used from code too with the following settings:

    // flake8
    "flake8.args": ["--extend-ignore=B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202",
                    "--import-order-style=google", "--max-line-length=99", "--show-source=true",
                    "--statistics=true"],

Developing a New Package
------------------------

TDB
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this

Architecture of a New Package
=============================

Every new package should have the following architecture:
Copy link
Contributor

Choose a reason for hiding this comment

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

Some changes:

  • Add LICENSE and CONTRIBUTING.md
  • Header files should be in /include/package_name. Also add a package_name.hpp header
  • In src, a package_name.cpp and package_name_node.cpp should appears
  • Set README.md to uppercase

Separate for cpp, python and hybrid packages

Code Coverage Test
------------------

TDB
Copy link
Contributor

Choose a reason for hiding this comment

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

We use github workflow to do so. Remove this section

@fjanguita fjanguita requested review from RPS98 and pariaspe June 5, 2024 13:28
/include
/package_name
### header files ###
node_name(.hpp)
Copy link
Contributor

Choose a reason for hiding this comment

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

Something like:
/package_name
/include
/package_name
header_files(.hpp)
package_name.hpp
...
/src
implementation_files(.cpp)
package_name.cpp
package_name_node.cpp
...
/tests
package_name_gtest.cpp
package_name_test.cpp

Note that gtest must end with _gtest.cpp and normal test executables with _test.cpp (see tests/CMakeLists.txt)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it compulsory for every package to have a header file with the same name as the package? same for implementation and main files. Wouldn´t it be 'node_name.hpp', for example?

Copy link
Contributor

Choose a reason for hiding this comment

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

The standar way of aerostack2 it this. There are some exceptions, but mainly we try to use the package name for simple packages that have only one node


Aerostack2 mainly follows the `ROS 2 code style and language versions <https://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html>`_.
There are, though, some exceptions, as ROS 2 claims to follow Goggle code style but uses snake_case
instead of camelCase. Aerostack2 uses camelCase.
Copy link
Contributor

Choose a reason for hiding this comment

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

Aerostack2 uses camelCase. -> Aerostack2 uses Google code style.

@fjanguita fjanguita requested a review from RPS98 June 6, 2024 09:03
@@ -6,234 +6,9 @@ Develop Guide

TDB
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove TDB for a description of the section and the toctree

@RPS98 RPS98 merged commit 1550967 into aerostack2:main Jun 6, 2024
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

3 participants