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

Code generation documentation #1

Open
wants to merge 10 commits into
base: try_mermaid
Choose a base branch
from

Conversation

gonzodepedro
Copy link
Owner

No description provided.

mergify bot and others added 2 commits January 30, 2024 08:32
Signed-off-by: Romain Lebbadi-Breteau <[email protected]>
(cherry picked from commit 8fd5822)

Co-authored-by: Romain Lebbadi-Breteau <[email protected]>
These reports are important to continue to provide visiblity for ROS 2 as well as maintain the history.

Migrating from: https://wiki.ros.org/Metrics
@tfoote
Copy link

tfoote commented Jan 31, 2024

I got mermaid working in: ros2#4151 that you can build on top of.

The import statement `from launch_ros.actions import Node` was missing in line 3

Signed-off-by: Michael Razum <[email protected]>
@gonzodepedro gonzodepedro force-pushed the code_generation_documentation branch 2 times, most recently from 406b22b to 38f2d1f Compare January 31, 2024 20:21
@gonzodepedro gonzodepedro changed the base branch from rolling to try_mermaid January 31, 2024 20:24
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.
- ``Client`` projects, which are the ones that need code to be generated, they have the parameters to generate code.
Copy link

Choose a reason for hiding this comment

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

Client as a keyword collides with the "ros client library" verbiage. I might suggest an alternative to client to differentiate from rcl. I would suggest potentially interface projects.

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.
- ``Client`` projects, which are the ones that need code to be generated, they have the parameters to generate code.
Copy link
Owner Author

Choose a reason for hiding this comment

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

Change "client" for "interfaces"

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
Copy link

Choose a reason for hiding this comment

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

Suggested change
As mentioned above, in order to deal with different DDS implementations, code has to be generated. Code generation is handled by a clever usage
As mentioned above, in order to deal with different DDS implementations, code has to be generated. Code generation is handled by a combination

Note right of ament_package: Execute a cmake.in template with variables and a cmake code hook.


When the *client* package, during its build process, calls the 'rosidl_generate_interfaces' macro, the extensions that were registered for each of the
Copy link

Choose a reason for hiding this comment

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

Please wrap on sentence boundaries. That's our standard for documentation. It makes diffs easier to read.

participant generate_arguments_file
participant rosidl_generator
project_with_rosidl_files->>rosidl_generate_interfaces: path_to_idl_files
loop ForEach Hook
Copy link

Choose a reason for hiding this comment

The 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.

@gonzodepedro gonzodepedro force-pushed the code_generation_documentation branch from 38f2d1f to 2599068 Compare February 5, 2024 15:59
tfoote and others added 6 commits February 5, 2024 08:08
* Add mermaid support and update pinned version

To get mermaid support working I had to do upgrades. I've updated our pins and documented how they're used as well as how to update them too.

This will allow us to do integrated mermaid sequence diagrams as well as flow diagrams instead of committing images of them.

* clean up docker installation to focus on pip version pinning

* Match folders in ignore too

Signed-off-by: Tully Foote <[email protected]>
Co-authored-by: Tomoya Fujita <[email protected]>
To get mermaide support working I had to do upgrades. I've updated our pins and documented how they're used as well as how to update them too.

This will allow us to do integrated mermaid sequence diagrams as well as flow diagrams instead of committing images of them.
Co-authored-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tully Foote <[email protected]>
Co-authored-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tully Foote <[email protected]>
@gonzodepedro gonzodepedro force-pushed the code_generation_documentation branch from 2599068 to d580364 Compare February 5, 2024 18:45
Signed-off-by: Gonzalo de Pedro <[email protected]>
@tfoote
Copy link

tfoote commented Mar 1, 2024

There's some more advanced features here: https://mermaid.js.org/syntax/sequenceDiagram.html

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.

3 participants