forked from ros2/ros2_documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Code generation documentation #1
Open
gonzodepedro
wants to merge
10
commits into
try_mermaid
Choose a base branch
from
code_generation_documentation
base: try_mermaid
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
125b28c
Replace dead link in Creating-A-Workspace.rst (#4148) (#4150)
mergify[bot] d5717df
Copy over Metrics from wiki to ros2_documentation (#4147)
tfoote 1071ace
Update Setting-Up-Simulation-Webots-Advanced.rst (#4146)
MichaelRazum c569b50
Bring in support for mermaid and move pinning forward (#4151)
tfoote 3f8327e
Add mermain support and update pinned version
tfoote 906446c
Match folders in ignore too
tfoote f5f3448
Unoverlap lines
tfoote da36e92
remove now redundant pycache gitignore
tfoote d580364
Added documentation for code generation
gonzodepedro c5453fd
Changed interface name
gonzodepedro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
build/ | ||
plugins/__pycache__ | ||
_build/ | ||
.idea/ | ||
.vscode/ | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
Jinja2==3.0.3 | ||
MarkupSafe==2.0.1 | ||
Pygments==2.11.2 | ||
alabaster==0.7.12 | ||
babel==2.8.0 | ||
Babel==2.14.0 | ||
certifi==2020.6.20 | ||
chardet==4.0.0 | ||
doc8==1.1.1 | ||
docutils==0.20.1 | ||
idna==2.10 | ||
imagesize==1.3.0 | ||
importlib-metadata==4.6.4 | ||
more-itertools==8.10.0 | ||
Jinja2==3.0.3 | ||
MarkupSafe==2.0.1 | ||
packaging==21.3 | ||
pbr==5.8.0 | ||
pip==22.0.2 | ||
Pygments==2.17.2 | ||
pyparsing==2.4.7 | ||
pytz==2022.1 | ||
requests==2.25.1 | ||
restructuredtext-lint==1.3.2 | ||
roman==3.3 | ||
setuptools==59.6.0 | ||
six==1.16.0 | ||
restructuredtext_lint==1.3.2 | ||
snowballstemmer==2.2.0 | ||
Sphinx==4.3.2 | ||
sphinx-copybutton==0.4.0 | ||
Sphinx==7.2.6 | ||
sphinx-copybutton==0.5.2 | ||
sphinx-multiversion==0.2.4 | ||
sphinx-rtd-theme==1.0.0 | ||
sphinx-tabs==3.2.0 | ||
sphinx-rtd-theme==2.0.0 | ||
sphinx-tabs==3.4.5 | ||
sphinxcontrib-applehelp==1.0.4 | ||
sphinxcontrib-devhelp==1.0.2 | ||
sphinxcontrib-htmlhelp==2.0.1 | ||
sphinxcontrib-jquery==4.1 | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-mermaid==0.9.2 | ||
sphinxcontrib-qthelp==1.0.3 | ||
sphinxcontrib-serializinghtml==1.1.5 | ||
sphinxcontrib-serializinghtml==1.1.10 | ||
stevedore==3.5.0 | ||
urllib3==1.26.5 | ||
wheel==0.37.1 | ||
zipp==1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
doc8 | ||
docutils | ||
pip==22.0.2 | ||
sphinx==4.3.2 | ||
sphinx-copybutton==0.4.0 | ||
sphinx-multiversion==0.2.4 | ||
sphinx-rtd-theme==1.0.0 | ||
sphinx-tabs==3.2.0 | ||
pip | ||
sphinx | ||
sphinx-copybutton | ||
sphinx-multiversion | ||
sphinx-rtd-theme | ||
sphinx-tabs | ||
sphinxcontrib-mermaid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,3 +191,58 @@ These are mainly used for error handling, commandline argument parsing, and logg | |
The ``rcutils`` |API| and implementation are located in the `ros2/rcutils <https://github.com/ros2/rcutils>`_ repository on |GitHub|_ which contains the interface as C headers. | ||
|
||
For a complete definition of the ``rcutils`` |API|, see `the rcutils docs <https://docs.ros.org/en/{DISTRO}/p/rcutils/>`_. | ||
|
||
Automatic code generation using template files | ||
============================================== | ||
|
||
As mentioned above, in order to deal with different DDS implementations, code has to be generated. Code generation is handled by a clever usage | ||
of CMake and Ament. To simplify the explanation of this mechanism let's separate ROS2 projects that generate or need code to be generated in two types. | ||
|
||
- ``Generator`` projects, which are the ones that have the templates and logic to generate code. | ||
- ``Interface`` projects, which are the ones that need code to be generated, they have the parameters to generate code. | ||
|
||
For instance, typesupport packages that generate code for a particular dds implementation are *Generator* packages, same case that rosidl which | ||
generates code from ros idl (.msg, .action, etc) files. | ||
|
||
*Interface* projects are typically projects that define messages, actions and services. Which have .msg files with rosidl defined on them which are | ||
used by *Generator* projects to create code. A package that calls rosidl_generate_interfaces CMake macro is a *Interface* project. | ||
|
||
Code generation workflow | ||
------------------------ | ||
|
||
On workspace build, the *generator* packages, registers a portion of CMake code as an ament_extension under 'rosidl_generate_idl_interfaces' key. | ||
|
||
Hook registration on CodeGenerator project build | ||
|
||
.. mermaid:: | ||
|
||
sequenceDiagram | ||
participant CodeGenerator_cmake | ||
participant ament_package | ||
participant ament_register_extension | ||
CodeGenerator_cmake->>ament_package: CONFIG_EXTRAS | ||
ament_package->>ament_register_extension: rosidl_generate_idl_interfaces, cmake_code_hook | ||
Note right of ament_package: Execute a cmake.in template with variables and a cmake code hook. | ||
|
||
|
||
When the *interface* package, during its build process, calls the 'rosidl_generate_interfaces' macro, the extensions that were registered for each of the | ||
*generator* packages, get called. Said extensions have the code to generate sources for each of the IDL interfaces. Then, code is added to an artifact | ||
(a library) and dependiences are exported for code to be build and installed. | ||
|
||
.. mermaid:: | ||
|
||
sequenceDiagram | ||
participant project_with_rosidl_files | ||
participant rosidl_generate_interfaces | ||
participant rosidl_generate_idl_interfaces_HOOK | ||
participant generate_arguments_file | ||
participant rosidl_generator | ||
project_with_rosidl_files->>rosidl_generate_interfaces: path_to_idl_files | ||
loop ForEach Hook | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to include information about how many times this will loop. |
||
rosidl_generate_interfaces->>rosidl_generate_idl_interfaces_HOOK: path_to_idl_files, parameters | ||
rosidl_generate_idl_interfaces_HOOK->>generate_arguments_file: template_parameters | ||
activate generate_arguments_file | ||
generate_arguments_file->>rosidl_generate_idl_interfaces_HOOK: arguments_file | ||
deactivate generate_arguments_file | ||
rosidl_generate_idl_interfaces_HOOK->>rosidl_generator: arguments_file | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. _Metrics: | ||
|
||
Metrics | ||
======= | ||
|
||
.. contents:: Table of Contents | ||
:depth: 2 | ||
:local: | ||
|
||
|
||
We measure aspects of the ROS community to understand and track the impact of our work and identify areas for improvement. | ||
We take inspiration from the MeeGo Project's metrics. | ||
|
||
Metrics.ros.org | ||
--------------- | ||
|
||
At `metrics.ros.org <https://metrics.ros.org>`_ you can find many visualizations of metrics about ROS. | ||
|
||
Periodic Metrics Report | ||
----------------------- | ||
|
||
We periodically publish a metrics report that provides a quantitative view of the ROS community. | ||
We're collectively learning what to measure and how and evoloving as systems change. | ||
Please provide feedback! | ||
Add your suggestions on how to improve these reports by posting them to `ROS Discourse Site Feedback Category <http://discourse.ros.org/c/site-feedback>`_. | ||
|
||
Historical Metrics Reports | ||
.......................... | ||
|
||
* :download:`2023 <http://download.ros.org/downloads/metrics/metrics-report-2024-01.pdf>` | ||
* :download:`2022 <http://download.ros.org/downloads/metrics/metrics-report-2022-07.pdf>` | ||
* :download:`2021 <http://download.ros.org/downloads/metrics/metrics-report-2021-07.pdf>` | ||
* :download:`2020 <http://download.ros.org/downloads/metrics/metrics-report-2020-07.pdf>` | ||
* :download:`2019 <http://download.ros.org/downloads/metrics/metrics-report-2019-07.pdf>` | ||
* :download:`2018 <http://download.ros.org/downloads/metrics/metrics-report-2018-07.pdf>` | ||
* :download:`2017 <http://download.ros.org/downloads/metrics/metrics-report-2017-07.pdf>` | ||
* :download:`2016 <http://download.ros.org/downloads/metrics/metrics-report-2016-07.pdf>` | ||
* :download:`2015 <http://download.ros.org/downloads/metrics/metrics-report-2015-07.pdf>` | ||
* :download:`2014 <http://download.ros.org/downloads/metrics/metrics-report-2014-07.pdf>` | ||
* :download:`2013 <http://download.ros.org/downloads/metrics/metrics-report-2013-08.pdf>` | ||
* :download:`2012 <http://download.ros.org/downloads/metrics/metrics-report-2012-07.pdf>` | ||
* :download:`2011 <http://download.ros.org/downloads/metrics/metrics-report-2011-08.pdf>` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.