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

Added Dataflow/Architecture Diagram & Checked Documentation for Planning #406

Conversation

victor-42
Copy link
Collaborator

@victor-42 victor-42 commented Oct 31, 2024

Description

Added new diagram of current planning architecture/dataflow to Readme. (including drawio asset)
Changed confusing naming scheme in Readme.md to the scheme used in the other parts of the documentation.
Validated current Documentation.

Type of change

Documentation Additions/Changes

Summary by CodeRabbit

  • New Features

    • Introduced a new diagram file that visually represents the planning architecture and interactions among components.
  • Documentation

    • Updated the README.md to enhance clarity, including new section headers and refined descriptions of the planning process and components, along with the addition of a relevant image.

Changed confusing naming scheme in Readme.
Checked current Documentation.
@victor-42 victor-42 added this to the Sprint 00 2024-11-04 milestone Oct 31, 2024
@victor-42 victor-42 linked an issue Oct 31, 2024 that may be closed by this pull request
3 tasks
Copy link
Contributor

coderabbitai bot commented Oct 31, 2024

Walkthrough

The changes introduce a new diagram file, planning_structure.drawio, which visually represents the planning architecture for a system, likely related to autonomous vehicle navigation. Additionally, the README.md file in the doc/planning directory has been updated to include an image, refined section headers, and expanded descriptions to clarify the roles of various components in the planning process.

Changes

File Change Summary
doc/assets/planning/planning_structure.drawio New file added, containing a diagram that illustrates the planning structure and relationships among components.
doc/planning/README.md Updated to include an image, refined section headers, and expanded descriptions for clarity regarding planning components.

Possibly related PRs

Poem

In the garden of plans, where ideas take flight,
A diagram blooms, oh what a sight! 🌼
With nodes that connect, and edges that flow,
The path of our planning is starting to grow.
From ACC to Motion, each role is defined,
In the world of our systems, harmony we find! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between da9d0dc and 109933a.

⛔ Files ignored due to path filters (1)
  • doc/assets/planning/planning_structure.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • doc/assets/planning/planning_structure.drawio (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • doc/assets/planning/planning_structure.drawio

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
doc/planning/README.md (2)

9-11: Improve grammar and readability in the OpenDrive Converter section.

Apply these improvements to enhance clarity:

-This module focuses on creating a trajectory out of
-an OpenDrive map (ASAM OpenDrive). As input it receives an xodr file (OpenDrive format) and the target points
-from the leaderboard with the belonging actions. For example action number 3 means, drive through the intersection.
+This module focuses on creating a trajectory from an OpenDrive map (ASAM OpenDrive). As input, it receives an xodr file (OpenDrive format) and target points
+from the leaderboard with their associated actions. For example, action number 3 means drive through the intersection.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: A comma is probably missing here.
Context: ...f an OpenDrive map (ASAM OpenDrive). As input it receives an xodr file (OpenDrive for...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[misspelling] ~10-~10: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ... (ASAM OpenDrive). As input it receives an xodr file (OpenDrive format) and the ta...

(EN_A_VS_AN)


[typographical] ~11-~11: After the expression ‘for example’ a comma is usually used.
Context: ...erboard with the belonging actions. For example action number 3 means, drive through th...

(COMMA_FOR_EXAMPLE)


33-36: Enhance readability of the Local Planning section.

Apply these improvements to fix grammar and enhance clarity:

-This module includes the Nodes: ACC, CollisionCheck, MotionPlanner
+This module includes the following nodes:
+- ACC
+- CollisionCheck
+- MotionPlanner

-The Local Planning package is responsible for evaluating short term decisions in the local environment of the ego vehicle. It containes components responsible for detecting collisions and reacting e. g. lowering speed.
-The local planning also executes behaviors e.g. changes the trajectory for an overtake.
+The Local Planning package is responsible for evaluating short-term decisions in the local environment of the ego vehicle. It contains components responsible for detecting collisions and reacting (e.g., lowering speed).
+The local planning also executes behaviors (e.g., changing the trajectory for overtaking).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~35-~35: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...g package is responsible for evaluating short term decisions in the local environment of t...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~35-~35: A comma might be missing here.
Context: ...esponsible for detecting collisions and reacting e. g. lowering speed. The local plannin...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~35-~35: There should be no space here.
Context: ...e for detecting collisions and reacting e. g. lowering speed. The local planning also...

(EG_SPACE)


[uncategorized] ~36-~36: A comma might be missing here.
Context: ...speed. The local planning also executes behaviors e.g. changes the trajectory for an over...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8c968fb and 8bb463d.

⛔ Files ignored due to path filters (1)
  • doc/assets/planning/planning_structure.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • doc/assets/planning/planning_structure.drawio (1 hunks)
  • doc/planning/README.md (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • doc/assets/planning/planning_structure.drawio
🧰 Additional context used
🪛 LanguageTool
doc/planning/README.md

[uncategorized] ~10-~10: A comma is probably missing here.
Context: ...f an OpenDrive map (ASAM OpenDrive). As input it receives an xodr file (OpenDrive for...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[misspelling] ~10-~10: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ... (ASAM OpenDrive). As input it receives an xodr file (OpenDrive format) and the ta...

(EN_A_VS_AN)


[typographical] ~11-~11: After the expression ‘for example’ a comma is usually used.
Context: ...erboard with the belonging actions. For example action number 3 means, drive through th...

(COMMA_FOR_EXAMPLE)


[uncategorized] ~35-~35: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...g package is responsible for evaluating short term decisions in the local environment of t...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~35-~35: A comma might be missing here.
Context: ...esponsible for detecting collisions and reacting e. g. lowering speed. The local plannin...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~35-~35: There should be no space here.
Context: ...e for detecting collisions and reacting e. g. lowering speed. The local planning also...

(EG_SPACE)


[uncategorized] ~36-~36: A comma might be missing here.
Context: ...speed. The local planning also executes behaviors e.g. changes the trajectory for an over...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

🔇 Additional comments (2)
doc/planning/README.md (2)

Line range hint 13-20: LGTM! Clear and well-structured description.

The section effectively explains the Global Planner's role and its interaction with other components.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: A comma is probably missing here.
Context: ...f an OpenDrive map (ASAM OpenDrive). As input it receives an xodr file (OpenDrive for...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[misspelling] ~10-~10: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ... (ASAM OpenDrive). As input it receives an xodr file (OpenDrive format) and the ta...

(EN_A_VS_AN)


[typographical] ~11-~11: After the expression ‘for example’ a comma is usually used.
Context: ...erboard with the belonging actions. For example action number 3 means, drive through th...

(COMMA_FOR_EXAMPLE)


3-3: Verify the planning structure diagram accessibility.

Let's ensure the diagram is properly accessible and rendered.

✅ Verification successful

Image path is correctly configured and accessible

The planning structure diagram exists at the correct path doc/assets/planning/planning_structure.png and is properly referenced in the documentation using the relative path ../assets/planning/planning_structure.png. The image file is accessible and the markdown reference is correctly configured.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence and accessibility of the planning structure diagram
if [ -f "doc/assets/planning/planning_structure.png" ]; then
    echo "✓ Planning structure diagram exists"
    file "doc/assets/planning/planning_structure.png"
else
    echo "✗ Planning structure diagram not found at expected path"
fi

Length of output: 258


Script:

#!/bin/bash
# Let's verify if the image exists in other potential locations and check the actual path
fd "planning_structure.png" .

# Also check if there are any references to this image in other files
rg "planning_structure.png" --type md

Length of output: 190

</Array>
</mxGeometry>
</mxCell>
<mxCell id="VXw4u54tnH0GYowiBxqF-12" value="&lt;div&gt;&lt;font style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;Motion Planning&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;- Take most disposable Information to make final trajectory Decision&lt;/font&gt;&lt;/div&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1">
Copy link
Collaborator

Choose a reason for hiding this comment

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

I’m not sure what you mean by ‚disposable information‘. Can you give me a bit more detail please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It meant that the node takes most available information into account when generating the desired trajectory and velocity.
I changed the description, it should be less confusing...

Copy link
Collaborator

@johannaschwarz johannaschwarz left a comment

Choose a reason for hiding this comment

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

Very awesome diagram that helps a lot!

p.s.: I started this review in english so i stuck to it but I think in the future we can just do it in German xD

<mxPoint x="-4" y="-3" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="VXw4u54tnH0GYowiBxqF-1" value="&lt;div style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;GlobalPlanner&lt;/b&gt;&lt;/div&gt;&lt;div&gt;(PrePlanner):&lt;/div&gt;&lt;div&gt;- Processes Map and Path Information&lt;/div&gt;&lt;div&gt;- Generates Global Path&lt;/div&gt;&lt;div&gt;&lt;i&gt;Node GlobalPlanDistance&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;provides Distance to next WP and to LaneCHange&lt;/i&gt;&lt;br&gt;&lt;/div&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fad7ac;strokeColor=#b46504;" parent="1" vertex="1">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fix Typo "LaneCHange"

<mxPoint x="-4" y="-3" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="VXw4u54tnH0GYowiBxqF-1" value="&lt;div style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;GlobalPlanner&lt;/b&gt;&lt;/div&gt;&lt;div&gt;(PrePlanner):&lt;/div&gt;&lt;div&gt;- Processes Map and Path Information&lt;/div&gt;&lt;div&gt;- Generates Global Path&lt;/div&gt;&lt;div&gt;&lt;i&gt;Node GlobalPlanDistance&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;provides Distance to next WP and to LaneCHange&lt;/i&gt;&lt;br&gt;&lt;/div&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fad7ac;strokeColor=#b46504;" parent="1" vertex="1">
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't mention the GlobalPlanDistance Node here because it is part of another component. When I first read it, I thought you were describing this node as part of the GlobalPlanner. I think it would be better to just leave it out here and stick to the basic role of the GlobalPlanner.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, would make sense to just leave it out.
Since the information is so closely related, I thought I briefly mention it.

But I can remove it :)

<mxPoint x="-3" y="7" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="VXw4u54tnH0GYowiBxqF-13" value="&lt;div&gt;&lt;b&gt;&lt;font style=&quot;font-size: 14px;&quot;&gt;ACC&lt;/font&gt;&lt;br&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;- Recommend Velocity for current State&lt;br&gt;&lt;/div&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#b0e3e6;strokeColor=#0e8088;" parent="1" vertex="1">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add (Adaptive Cruise Control) behind the abbr. ACC. :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think it might be a good idea to combine the PrePlanner and the OpenDrive Components with a box named Global Planning like the Local Planning? Then you could rename the GlobalPlanner to PrePlanner corresponding to the class name in the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

What does the sentence on the bottom right mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Blackboard is used in the behavior tree. I thought there might be messages exchanged that are not shown on the node graph.
But on closer inspection, it should be just an internal thing.
Will remove it

Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be a good idea in general to not explicitly write the ROS topics used for communication but more the concept of what is being transferred. ( i.e. Speed Limits). That will probably make it easier to keep the diagram up to date in the future, as it will be less prone to change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since it is just a diagram of the current architecture, I would leave it in for now.
We might want to change more major parts anyway ;)

@victor-42 victor-42 merged commit 2ea043f into main Nov 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Architectural model and dataflow / decision making for subsystem Planning
3 participants