-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
Added documentation for ament_lint tests
}, | ||
"autopep8.args": ["--max-line-length=99", "--ignore=''"], | ||
|
||
// ROS2 uses as a linter flake8==4.0.1 (apt installation). Pip installation should be |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
/include | ||
/package_name | ||
### header files ### | ||
node_name(.hpp) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
@@ -6,234 +6,9 @@ Develop Guide | |||
|
|||
TDB |
There was a problem hiding this comment.
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
· 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.