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

490 remodel acc concept #516

Merged
merged 13 commits into from
Dec 5, 2024
Merged

490 remodel acc concept #516

merged 13 commits into from
Dec 5, 2024

Conversation

seefelke
Copy link
Collaborator

@seefelke seefelke commented Nov 22, 2024

Description

This includes research on general ACC concepts, an evaluation of the current implementation and a concept for remaking it.

Fixes #490

Type of change

Please delete options that are not relevant.

  • This change requires a documentation update

Does this PR introduce a breaking change?

No

Most important changes

MD file

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (might be obsolete with CI later on)
  • New and existing unit tests pass locally with my changes (might be obsolete with CI later on)

Summary by CodeRabbit

  • New Features

    • Introduced a new Behaviour enumeration to enhance utility functions.
    • Added a new trajectory message type to improve the Adaptive Cruise Control (ACC) system's functionality.
    • Enhanced trajectory management for improved responsiveness in ACC systems.
  • Documentation

    • Provided a comprehensive overview of ACC systems, detailing functionalities, methodologies, challenges, and proposed improvements.
    • Highlighted the need for restructuring current implementations and outlined future steps for enhancement.

Vroni27 and others added 2 commits November 21, 2024 11:32
added information about current implementation, new concept and next steps
@seefelke seefelke added this to the Sprint 02 2024-11-25 milestone Nov 22, 2024
@seefelke seefelke linked an issue Nov 22, 2024 that may be closed by this pull request
4 tasks
Copy link
Contributor

coderabbitai bot commented Nov 22, 2024

Walkthrough

The pull request introduces updates to the Adaptive Cruise Control (ACC) system documentation and implementation. It provides an overview of ACC systems, detailing their objectives, methodologies, and challenges. Key control techniques such as PID Control, Model Predictive Control (MPC), and Fuzzy Logic Control (FLC) are discussed. The changes include the addition of a new enumeration for behaviors and a new trajectory message type to enhance trajectory management. The document emphasizes the need for restructuring the current implementation to address existing issues.

Changes

File Path Change Summary
doc/research/paf24/planning/ACC.md Overview of ACC systems, control techniques (PID, MPC, FLC), implementation challenges, and proposed enhancements. New trajectory message type and behavior enumeration added.
utils.py New enum Behaviour added.

Assessment against linked issues

Objective Addressed Explanation
Common understanding of currently used ACC gained
Research concerning real-world ACCs completed
Ideas on how to improve current ACC collected
Results documented in a markdown file

Possibly related PRs

Suggested reviewers

  • niklasr22
  • victor-42

🐰 In the realm of speed and grace,
ACC finds its rightful place.
With new paths and clearer ways,
We hop towards brighter days!
Let's steer with care, and never stray! 🚗💨


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: 3

🧹 Outside diff range and nitpick comments (4)
doc/research/paf24/planning/ACC.md (4)

4-6: Consider adding specific velocity thresholds for ACC systems.

The distinction between classic ACC and Stop & Go systems could be more precise. Consider adding typical industry-standard velocity thresholds and citing sources for these values.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~5-~5: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


17-17: Fix typo in MPC procedure.

There's a typo in "repitition" which should be "repetition".


65-65: Define clear criteria for overtaking decisions.

The statement about initiating overtaking needs more specific criteria:

  • What speed difference triggers overtaking?
  • How do we ensure safe overtaking conditions?
  • How does this integrate with the lane change system?

84-85: Enhance documentation with additional sources and proper citations.

Consider:

  1. Adding more academic and industry sources
  2. Using proper citation format instead of bare URLs
  3. Including specific references for safety distance calculations and control algorithms
🧰 Tools
🪛 Markdownlint (0.35.0)

84-84: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


85-85: null
Bare URL used

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5c0606c and ab7a866.

⛔ Files ignored due to path filters (1)
  • doc/assets/research_assets/ACC_FLC_Example_1.PNG is excluded by !**/*.png
📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~5-~5: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[uncategorized] ~55-~55: Possible missing comma found.
Context: ...just accordingly in a local manner. For this a new trajectory message type was imple...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~63-~63: Possible missing comma found.
Context: ...stem needs to be discussed. For safety distance the old approach can simply be modified...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)²...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~63-~63: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking dis...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... for calculating the braking distance. For a general speed target we need to take ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~67-~67: Possible missing comma found.
Context: ...oint in the trajectory up to the car in front for example by interpolation. Points fu...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 Markdownlint (0.35.0)
doc/research/paf24/planning/ACC.md

22-22: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


82-82: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


83-83: Expected: 1; Actual: 3
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


3-3: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


10-10: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


19-19: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


69-69: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


78-78: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


84-84: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


78-78: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


13-13: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


79-79: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


85-85: null
Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (1)
doc/research/paf24/planning/ACC.md (1)

44-44: ⚠️ Potential issue

Critical: Safety distance calculation needs immediate attention.

The current safety distance formula speed + (speed * 0.36)² is identified as incorrect. This is a critical safety concern that should be addressed before any other improvements.

Comment on lines 78 to 81
### Requirements:
- obstacle speed
- obstacle distance

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Expand requirements section with specific criteria.

The requirements section needs significant expansion to include:

  1. Safety requirements (minimum safe distances, maximum deceleration rates)
  2. Performance requirements (response times, accuracy)
  3. System constraints (sensor limitations, processing delays)
  4. Integration requirements with other systems
🧰 Tools
🪛 Markdownlint (0.35.0)

78-78: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


78-78: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


79-79: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


The general idea for speeds above the 40 km/h mark is to calculate a proper safety distance and a general target velocity. For speeds lower than that a stop and go system needs to be discussed.

For safety distance the old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking distance.
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

The proposed safety distance formula needs revision based on existing implementation

The proposed formula (speed / 10)*3 + (speed / 10)² differs significantly from the current validated implementation in the codebase. The existing implementation in utils.py uses:

  • Reaction distance = speed
  • Braking distance = (speed * 0.36)²
  • Total safety distance = reaction_distance + braking_distance

The proposed formula would result in less conservative safety margins compared to the existing implementation, which could compromise safety. Stick with the current implementation as it:

  1. Separates reaction distance and braking distance components
  2. Has been tested in the CARLA simulator environment
  3. Includes an emergency braking mode with adjusted calculations
🔗 Analysis chain

Validate the proposed safety distance formula.

The proposed formula (speed / 10)*3 + (speed / 10)² for braking distance should be:

  1. Validated against industry standards
  2. Include additional safety margin
  3. Consider road conditions and vehicle capabilities
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any existing safety distance calculations in the codebase
rg "safety.*distance|braking.*distance" --type cpp --type python

Length of output: 97


Script:

#!/bin/bash
# Search for any existing safety distance calculations in the codebase with correct file extensions
rg "safety.*distance|braking.*distance" -t cpp -t py

# Also search for general distance calculations that might be safety-related
rg "calculateDistance|getDistance|distance.*calculation" -t cpp -t py

# Look for files that might contain safety-related calculations
fd -e cpp -e hpp -e py -e h | grep -i "safety\|distance\|brake"

Length of output: 1159


Script:

#!/bin/bash
# Let's examine the actual implementation of safety distance calculation
cat code/planning/src/local_planner/utils.py

Length of output: 7921

🧰 Tools
🪛 LanguageTool

[uncategorized] ~63-~63: Possible missing comma found.
Context: ...stem needs to be discussed. For safety distance the old approach can simply be modified...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)²...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~63-~63: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking dis...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

doc/research/paf24/planning/ACC.md Show resolved Hide resolved
fix linter
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/research/paf24/planning/ACC.md (2)

5-7: Enhance ACC system boundaries and requirements

The distinction between ACC and Stop & Go systems needs more specific details:

  1. Define exact speed thresholds and transition logic between systems
  2. Specify how the systems will handle edge cases (e.g., transitioning between high and low speeds)
  3. Document the rationale for potentially implementing two separate systems

Would you like me to help draft a detailed specification for the system boundaries and transition logic?

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


87-89: Enhance documentation with additional sources

Consider adding more references:

  1. Industry standards for ACC systems
  2. Research papers on safety distance calculations
  3. Implementation examples of trajectory-based ACC

Would you like assistance in finding relevant academic and industry sources?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ab7a866 and 1b3ea9a.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~6-~6: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[style] ~66-~66: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)²...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~66-~66: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking dis...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... for calculating the braking distance. For a general speed target we need to take ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (4)
doc/research/paf24/planning/ACC.md (4)

47-51: ⚠️ Potential issue

Prioritize critical safety and architectural issues

The identified issues need to be prioritized:

  1. Safety-critical: Incorrect safety distance calculation must be addressed first
  2. Architectural: Separate ACC from waypoint management and unstuck routine
  3. Behavioral: Speed limit handling needs clear policy

This aligns with the previous architectural review comment. The separation of concerns is essential for maintainability and safety.


66-66: ⚠️ Potential issue

Validate and document safety distance calculations

The proposed formula (speed / 10)*3 + (speed / 10)² needs:

  1. Validation against industry standards
  2. Documentation of assumptions and limitations
  3. Consideration of different road conditions

This aligns with the previous safety distance review comment. Please provide empirical evidence or citations supporting this formula's safety margins.

🧰 Tools
🪛 LanguageTool

[style] ~66-~66: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)²...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~66-~66: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking dis...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


82-86: ⚠️ Potential issue

Expand system requirements section

The requirements section needs significant expansion to include:

  1. Functional requirements:
    • Speed control ranges and accuracy
    • Response time requirements
    • System modes (ACC, Stop & Go)
  2. Safety requirements:
    • Minimum safe distances
    • Maximum acceleration/deceleration rates
    • Fail-safe behaviors
  3. Performance requirements:
    • Sensor update rates
    • Processing latency limits
  4. Integration requirements:
    • Interface specifications
    • Data flow documentation

This aligns with the previous requirements review comment. Would you like assistance in drafting a comprehensive requirements specification?


68-71: Specify trajectory calculation details

The trajectory-based speed control needs more specific details:

  1. How far ahead should the trajectory planning look?
  2. What interpolation method will be used for speed calculations?
  3. How will the system handle sudden changes in the leading vehicle's speed?

Would you like assistance in designing the trajectory calculation algorithm?

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: 1

🧹 Outside diff range and nitpick comments (4)
doc/research/paf24/planning/ACC.md (4)

11-31: Enhance control techniques section with implementation specifics

While the control techniques are well-described theoretically, consider adding:

  • Specific advantages/disadvantages of each approach
  • Implementation complexity comparison
  • Resource requirements (CPU, memory)
  • Real-time performance characteristics
🧰 Tools
🪛 LanguageTool

[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


41-44: Address open questions with specific proposals

Please provide concrete answers to these questions:

  1. ACC usage: Define specific conditions (straight roads, curves < X degrees, etc.)
  2. Testing: Outline specific test scenarios (e.g., sudden braking, gradual slowdown)
  3. Acting component I/O: Define exact message format and fields
  4. Perception input: Specify required sensor data format and update frequency

67-69: Elaborate on trajectory-based implementation details

The new concept needs additional clarification on:

  1. How many trajectory points to consider (performance vs. accuracy tradeoff)
  2. Update frequency for trajectory points
  3. Handling of trajectory interruptions or replanning
  4. Smooth transitions between different behaviors

71-71: Improve documentation quality and maintainability

  1. Replace GitHub user attachment link with a relative path to a committed image file
  2. Fix formatting issues:
    • Add missing commas in compound sentences
    • Use hyphens in compound adjectives (e.g., "well-known")
    • Ensure consistent spacing in links
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1b3ea9a and 5dbf85d.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~73-~73: Possible missing comma found.
Context: ...c9cb9) Since behaviour is passed as an ID a new enum for behaviours was implement...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~77-~77: Possible missing comma found.
Context: ...stem needs to be discussed. For safety distance the old approach can simply be modified...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)²...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~77-~77: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking dis...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... for calculating the braking distance. For a general speed target we need to take ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~79-~79: Possible missing comma found.
Context: ... braking distance. For a general speed target we need to take the speed and the speed...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~81-~81: Possible missing comma found.
Context: ...oint in the trajectory up to the car in front for example by interpolation. Points fu...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~91-~91: Possible missing article found.
Context: ...c. Subscriber logic could be taken from old implementation. ### Requirements - ob...

(AI_HYDRA_LEO_MISSING_AN)

🪛 Markdownlint (0.35.0)
doc/research/paf24/planning/ACC.md

100-100: null
Spaces inside link text

(MD039, no-space-in-links)

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: 4

🧹 Outside diff range and nitpick comments (1)
doc/research/paf24/planning/ACC.md (1)

98-101: Expand literature review

Consider adding recent sources covering:

  1. Modern ACC implementations in production vehicles
  2. Stop & Go systems
  3. Safety distance calculation methodologies
  4. Trajectory-based control approaches
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5dbf85d and dbedea4.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he old approach can simply be modified. For example, (speed / 10)*3 + (speed / 10)²...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~77-~77: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le, (speed / 10)*3 + (speed / 10)² is a well known formula for calculating the braking dis...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... for calculating the braking distance. For a general speed target we need to take ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (1)
doc/research/paf24/planning/ACC.md (1)

8-8: Justify the velocity threshold for ACC vs Stop & Go systems

The 40 km/h threshold for distinguishing between ACC and Stop & Go systems needs justification. Consider:

  1. Citing industry standards or research that supports this threshold
  2. Explaining the technical limitations that drive this separation
  3. Discussing the implications for our implementation
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)

doc/research/paf24/planning/ACC.md Outdated Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@vinzenzm vinzenzm left a comment

Choose a reason for hiding this comment

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

In general I think this is a good overview of possible improvements to the ACC.
Maybe you should create a diagram for your own solution. Try to use the formula symbols consistent with the other solution candidates mentioned (PID, Fuzzy).
Then it is far easier to comprehend which changes you actually plan on implementing and especially how you want to do so.

doc/research/paf24/planning/ACC.md Show resolved Hide resolved

Provides a unified control framework to offer both functions: ACC and Stop & Go.

![Example of a FLC control algorithm](../../../assets/research_assets/ACC_FLC_Example_1.png)
Copy link
Collaborator

Choose a reason for hiding this comment

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

For me this link does not work. This might be the github preview however.
Maybe this image should also be directly included.
Especially because here some formula symbols are explained.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How can I embed an image directly?

doc/research/paf24/planning/ACC.md Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Show resolved Hide resolved
made proposed concept more detailed
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: 2

🧹 Outside diff range and nitpick comments (2)
doc/research/paf24/planning/ACC.md (2)

24-32: Enhance MPC implementation details

The MPC section would benefit from additional technical details:

  1. Define the cost function components (tracking error, control effort, etc.)
  2. Specify the prediction horizon length and its impact on performance
  3. Document state and control constraints (acceleration limits, jerk bounds, etc.)

81-84: Review sampling approach performance implications

The proposed approach of sampling every fifth trajectory point needs careful consideration:

  1. Memory overhead of storing velocities for all trajectory points
  2. Computational cost of interpolation
  3. Impact on real-time performance

Consider implementing a dynamic sampling rate based on vehicle speed and computational resources.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~81-~81: Possible missing comma found.
Context: ..., the way PID calculates velocity seems reasonable since we can treat the trajectory point...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~81-~81: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~81-~81: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~83-~83: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)

🪛 Markdownlint (0.35.0)

81-81: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


81-81: Expected: 300; Actual: 364
Line length

(MD013, line-length)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between dbedea4 and 11e94fd.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~68-~68: Possible missing comma found.
Context: ...e current behaviour to each point. This way the Acting has more knowledge about wha...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~69-~69: Possible missing comma found.
Context: ...just accordingly in a local manner. For this a new trajectory message type was imple...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~73-~73: Possible missing comma found.
Context: ...c9cb9) Since behaviour is passed as an ID a new enum for behaviours was implement...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~75-~75: Possible missing comma found.
Context: ...ets based on PID. For speeds lower than that a stop and go system can be discussed i...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~77-~77: Possible missing comma found.
Context: ...sed if it is really needed. For safety distance we will use the concept from the FLC gr...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... use the concept from the FLC graphic. For a general speed target we either take t...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~79-~79: Possible missing comma found.
Context: ...m the FLC graphic. For a general speed target we either take the speed of the car in ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~81-~81: Possible missing comma found.
Context: ..., the way PID calculates velocity seems reasonable since we can treat the trajectory point...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~81-~81: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~81-~81: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~83-~83: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)


[uncategorized] ~85-~85: Possible missing comma found.
Context: ...me as well if needed. For the distance error we can use the safety distance as the d...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 Markdownlint (0.35.0)
doc/research/paf24/planning/ACC.md

81-81: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


85-85: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


81-81: Expected: 300; Actual: 364
Line length

(MD013, line-length)

🔇 Additional comments (2)
doc/research/paf24/planning/ACC.md (2)

67-70: Verify trajectory message implementation

Need to verify the trajectory message type implementation from PR #511 and its integration with the existing system.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~68-~68: Possible missing comma found.
Context: ...e current behaviour to each point. This way the Acting has more knowledge about wha...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~69-~69: Possible missing comma found.
Context: ...just accordingly in a local manner. For this a new trajectory message type was imple...

(AI_HYDRA_LEO_MISSING_COMMA)


79-80: ⚠️ Potential issue

Define safety protocols for overtaking initiation

The suggestion that "ACC could initiate overtaking" requires careful consideration:

  1. Define clear criteria for when overtaking is safe
  2. Specify required sensor coverage and reliability
  3. Document interaction with other autonomous systems
  4. Include fail-safe mechanisms

This is a safety-critical feature that needs thorough design and validation before implementation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~79-~79: Possible missing comma found.
Context: ...m the FLC graphic. For a general speed target we either take the speed of the car in ...

(AI_HYDRA_LEO_MISSING_COMMA)

Comment on lines 77 to 79
For safety distance we will use the concept from the FLC graphic.

For a general speed target we either take the speed of the car in front or the speed limit, whichever is lower. In cases where the car in front is substantially slower than the speed limit ACC could inititate overtaking.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Document safety distance calculation details

The reference to "the concept from the FLC graphic" needs explicit documentation:

  1. Provide the actual formula to be used
  2. Define all variables and their units
  3. Include validation criteria for the safety distance calculation

This is critical for safety and should be thoroughly documented before implementation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~77-~77: Possible missing comma found.
Context: ...sed if it is really needed. For safety distance we will use the concept from the FLC gr...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... use the concept from the FLC graphic. For a general speed target we either take t...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~79-~79: Possible missing comma found.
Context: ...m the FLC graphic. For a general speed target we either take the speed of the car in ...

(AI_HYDRA_LEO_MISSING_COMMA)

doc/research/paf24/planning/ACC.md Show resolved Hide resolved
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: 1

🧹 Outside diff range and nitpick comments (3)
doc/research/paf24/planning/ACC.md (3)

7-9: Enhance system requirements documentation

The velocity threshold (40 km/h) for distinguishing between ACC and Stop & Go systems needs justification:

  1. Add references to industry standards or research supporting this threshold
  2. Document hardware/sensor requirements for each system
  3. Specify the impact on control strategy selection
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


24-31: Enhance MPC implementation details

The MPC section needs practical implementation guidance:

  1. Specify the prediction horizon length and its impact
  2. Define the cost function components (tracking error, control effort, etc.)
  3. Add computational complexity considerations
  4. Include pseudo-code or example implementation

107-110: Expand literature review

Consider adding:

  1. Recent papers (2020-2024) on ACC implementations
  2. Industry standards and safety regulations
  3. Real-world ACC system case studies
  4. Sources specifically addressing Stop & Go systems
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 11e94fd and f55db3f.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... use the concept from the FLC graphic. For a general speed target we either take t...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~81-~81: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~82-~82: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~84-~84: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)

🔇 Additional comments (1)
doc/research/paf24/planning/ACC.md (1)

81-85: Validate trajectory sampling approach

The proposed sampling of every fifth point needs validation:

  1. Justify the sampling interval choice
  2. Address potential issues with varying vehicle speeds
  3. Document the impact on control system stability
  4. Consider adaptive sampling based on speed/conditions
🧰 Tools
🪛 LanguageTool

[style] ~81-~81: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~82-~82: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~84-~84: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)

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: 5

🧹 Outside diff range and nitpick comments (1)
doc/research/paf24/planning/ACC.md (1)

24-32: Enhance MPC section with implementation details

The MPC overview is good, but consider adding:

  1. Cost function formulation for ACC
  2. Prediction horizon selection guidelines
  3. Computational complexity considerations

Would you like me to help draft these additional implementation details?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f55db3f and d93d240.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~82-~82: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~83-~83: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~85-~85: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)

doc/research/paf24/planning/ACC.md Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Outdated Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Show resolved Hide resolved
added diagram for presentation
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: 5

🧹 Outside diff range and nitpick comments (1)
doc/research/paf24/planning/ACC.md (1)

89-90: Define safety margins for velocity calculations

The 5% threshold for optimal safety distance needs additional safety considerations:

  1. What is the minimum absolute safety margin regardless of percentage?
  2. How are sudden changes in the leading vehicle's velocity handled?

Consider adding a section on safety margins:

+Safety considerations for velocity calculations:
+1. Minimum absolute safety margin: 2 meters regardless of percentage
+2. Maximum acceleration/deceleration rates: ±2.5 m/s²
+3. Hysteresis in distance threshold to prevent oscillation
🧰 Tools
🪛 LanguageTool

[uncategorized] ~89-~89: Possible missing comma found.
Context: ...afety distance. For points further than that we simply use the desired general speed...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d93d240 and 9b3870a.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... + k_p e (t-t_s) + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~68-~68: Possible missing comma found.
Context: ...e current behaviour to each point. This way the Acting has more knowledge about wha...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~69-~69: Possible missing comma found.
Context: ...just accordingly in a local manner. For this a new trajectory message type was imple...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~73-~73: Possible missing comma found.
Context: ...c9cb9) Since behaviour is passed as an ID a new enum for behaviours was implement...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~75-~75: Possible missing comma found.
Context: ...ets based on PID. For speeds lower than that a stop and go system can be discussed i...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~80-~80: Possible missing comma found.
Context: ...imit in that case. For a general speed target we either take the speed of the car in ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~80-~80: Possible missing comma found.
Context: ... is substantially slower than the speed limit ACC could inititate overtaking. Since ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~82-~82: Possible missing comma found.
Context: ..., the way PID calculates velocity seems reasonable since we can treat the trajectory point...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~82-~82: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~83-~83: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~85-~85: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)


[uncategorized] ~87-~87: Possible missing comma found.
Context: ...me as well if needed. For the distance error we can use the safety distance as the d...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~89-~89: Possible missing comma found.
Context: ...afety distance. For points further than that we simply use the desired general speed...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~101-~101: Possible missing article found.
Context: ...c. Subscriber logic could be taken from old implementation. Implement PID logic #...

(AI_HYDRA_LEO_MISSING_AN)

doc/research/paf24/planning/ACC.md Outdated Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Show resolved Hide resolved
doc/research/paf24/planning/ACC.md Show resolved Hide resolved
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: 1

🧹 Outside diff range and nitpick comments (1)
doc/research/paf24/planning/ACC.md (1)

8-9: Justify the speed threshold selection

The 40 km/h threshold between ACC and Stop & Go systems needs justification. Consider adding:

  • Why this specific threshold was chosen
  • How it aligns with urban/highway driving scenarios
  • Impact on control system design
-In general, classic ACC systems are designed for higher velocity (e.g. > 40 km/h). Apart from that, there are Stop & Go systems that support lower velocites (e.g. < 40 km/h). In our case, both systems might be needed and it might be reasonable to develop two different systems for ACC and Stop & Go.
-The threshold to distinguish between the two systems has to be chosen reasonably.
+In general, classic ACC systems are designed for higher velocity (v > 40 km/h), aligning with typical highway driving scenarios where steady-state following is more common. Stop & Go systems support lower velocities (v ≤ 40 km/h), optimized for urban traffic patterns with frequent stops. This threshold was chosen based on:
+- Typical urban speed limits (30-50 km/h)
+- Different control requirements for low-speed following
+- Industry standard implementations
+
+In our case, both systems are needed due to the diverse operating environments our vehicle will encounter.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9b3870a and 6b75683.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~16-~16: Possible typo: you repeated a word
Context: ...t} e(\tau) d\tau + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~65-~65: Possible missing comma found.
Context: ...just accordingly in a local manner. For this a new trajectory message type was imple...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...ets based on PID. For speeds lower than that a stop and go system can be discussed i...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~78-~78: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~79-~79: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~81-~81: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)


[uncategorized] ~83-~83: Possible missing comma found.
Context: ...me as well if needed. For the distance error we can use the safety distance as the d...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~85-~85: Possible missing comma found.
Context: ...afety distance. For points further than that we simply use the desired general speed...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~97-~97: Possible missing article found.
Context: ...c. Subscriber logic could be taken from old implementation. Implement PID logic #...

(AI_HYDRA_LEO_MISSING_AN)

🔇 Additional comments (2)
doc/research/paf24/planning/ACC.md (2)

101-105: 🛠️ Refactor suggestion

Expand system requirements section

The requirements section needs significant expansion to include:

  1. Safety requirements:
    • Minimum safe following distance
    • Maximum deceleration rates
    • Emergency behavior specifications
  2. Performance requirements:
    • Control loop frequency
    • Response time limits
    • Speed control accuracy
  3. System constraints:
    • Sensor limitations
    • Processing delays
    • Communication latency
-### Requirements
-
-- obstacle speed
-- obstacle distance
+### System Requirements
+
+1. Safety Requirements:
+   - Minimum following distance: 2 seconds time gap
+   - Maximum deceleration: 3 m/s²
+   - Emergency behavior specifications
+   - Fail-safe modes
+
+2. Performance Requirements:
+   - Control loop frequency: ≥ 20 Hz
+   - Response time: ≤ 100 ms
+   - Speed control accuracy: ±2 km/h
+   - Distance measurement accuracy: ±0.5m
+
+3. Input Requirements:
+   - Obstacle speed (range: 0-120 km/h, accuracy: ±1 km/h)
+   - Obstacle distance (range: 0-150m, accuracy: ±0.5m)
+   - Host vehicle speed and acceleration
+
+4. System Constraints:
+   - Sensor update rate: ≥ 10 Hz
+   - Processing delay: ≤ 50 ms
+   - Communication latency: ≤ 20 ms

Likely invalid or redundant comment.


78-85: Add error handling for trajectory sampling

The PID-based velocity calculation using trajectory points needs robust error handling:

  1. What happens if there aren't enough points for the sampling interval?
  2. How are trajectory discontinuities handled?
  3. How is the interpolation validated?
🧰 Tools
🪛 LanguageTool

[style] ~78-~78: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~79-~79: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~81-~81: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)


[uncategorized] ~83-~83: Possible missing comma found.
Context: ...me as well if needed. For the distance error we can use the safety distance as the d...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~85-~85: Possible missing comma found.
Context: ...afety distance. For points further than that we simply use the desired general speed...

(AI_HYDRA_LEO_MISSING_COMMA)

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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6b75683 and 9328459.

📒 Files selected for processing (1)
  • doc/research/paf24/planning/ACC.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/research/paf24/planning/ACC.md

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


[duplication] ~16-~16: Possible typo: you repeated a word
Context: ...t} e(\tau) d\tau + k_d \dot{e}(t - t_s) $$ $$ e(t-t_s) = \Delta x(t - t_s) - t_{hw,d}...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~65-~65: Possible missing comma found.
Context: ...just accordingly in a local manner. For this a new trajectory message type was imple...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~69-~69: Possible missing comma found.
Context: ...c9cb9) Since behaviour is passed as an ID a new enum for behaviours was implement...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...ets based on PID. For speeds lower than that a stop and go system can be discussed i...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~76-~76: Possible missing comma found.
Context: ...imit in that case. For a general speed target we either take the speed of the car in ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~76-~76: Possible missing comma found.
Context: ... is substantially slower than the speed limit ACC could inititate overtaking. Since ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~78-~78: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~79-~79: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~81-~81: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)


[uncategorized] ~83-~83: Possible missing comma found.
Context: ...me as well if needed. For the distance error we can use the safety distance as the d...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~85-~85: Possible missing comma found.
Context: ...afety distance. For points further than that we simply use the desired general speed...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~97-~97: Possible missing article found.
Context: ...c. Subscriber logic could be taken from old implementation. Implement PID logic #...

(AI_HYDRA_LEO_MISSING_AN)

🔇 Additional comments (2)
doc/research/paf24/planning/ACC.md (2)

8-9: 🛠️ Refactor suggestion

Specify and justify the speed threshold

The threshold between ACC and Stop & Go systems needs more precise specification and justification:

  1. Define exact threshold value instead of "e.g. > 40 km/h"
  2. Explain the rationale behind choosing 40 km/h
  3. Document different control requirements for each speed range
-In general, classic ACC systems are designed for higher velocity (e.g. > 40 km/h). Apart from that, there are Stop & Go systems that support lower velocites (e.g. < 40 km/h).
+In general, classic ACC systems are designed for higher velocity (v > 40 km/h), where aerodynamic effects and longer stopping distances require different control strategies. Stop & Go systems support lower velocities (v ≤ 40 km/h), where precise distance control and quick response times are crucial for urban traffic scenarios.

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n our case, both systems might be needed and it might be reasonable to develop two d...

(COMMA_COMPOUND_SENTENCE)


78-85: Validate trajectory sampling approach and add error handling

The PID sampling strategy needs validation and error handling:

  1. Edge cases for trajectory sampling:
    • Insufficient points for sampling interval
    • Trajectory discontinuities
    • Invalid velocity calculations
  2. Distance prediction accuracy:
    • Validation of predicted distances
    • Error accumulation prevention
🧰 Tools
🪛 LanguageTool

[style] ~78-~78: This phrase is redundant. Consider writing “points” or “times”.
Context: ...reat the trajectory points as different points in time for the sampling time. For example let'...

(MOMENT_IN_TIME)


[typographical] ~79-~79: After the expression ‘for example’ a comma is usually used.
Context: ...ints in time for the sampling time. For example let's say we sample every fifth point a...

(COMMA_FOR_EXAMPLE)


[typographical] ~81-~81: Consider adding a comma after ‘Theoretically’ for more clarity.
Context: ...the fifth point before the current one. Theoretically this allows us to dynamically adjust th...

(RB_LY_COMMA)


[uncategorized] ~83-~83: Possible missing comma found.
Context: ...me as well if needed. For the distance error we can use the safety distance as the d...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~85-~85: Possible missing comma found.
Context: ...afety distance. For points further than that we simply use the desired general speed...

(AI_HYDRA_LEO_MISSING_COMMA)

Comment on lines +27 to +35
It calculates the current control action by solving an online, iterative and finite-horizon optimization of the model.
Procedure:

1. Prediction of future system states based on current states
2. Computation of the cost function for a finite time horizon in the future
3. Implementation of the first step of the solved control sequence
4. Application of the feedback control loop to compensate for the predictive error and model inaccuracy
5. Sampling of new current states and repitition of the process

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance MPC section with implementation specifics

The MPC section needs more detailed information to be implementable:

  1. Define the prediction model
  2. Specify the cost function components
  3. Document the optimization constraints
  4. Provide the control horizon parameters

Would you like me to help draft the detailed MPC implementation specifications?

Comment on lines +54 to +58
- safe distance calculation is currently not correct, uses speed + (speed * 0.36)² which results in wrong distances
- if car in front of us ignores speed limits we ignore them as well
- some parts of unstuck routine are in ACC and need to be refactored
- same goes for publishing of current waypoint, this should not be in ACC

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Address safety distance calculation and architectural issues

Several critical issues require immediate attention:

  1. Safety distance calculation is incorrect and unsafe
  2. Component responsibilities are mixed:
    • Unstuck routine in ACC
    • Waypoint publishing in ACC

Proposed actions:

  1. Create a dedicated SafetyDistance class with physics-based calculations
  2. Move unstuck routine to a behavior module
  3. Implement waypoint management in planning component
  4. Add comprehensive unit tests

Would you like me to help draft the SafetyDistance class implementation?

Comment on lines +103 to +104
- obstacle speed
- obstacle distance
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Expand system requirements with specific metrics

The requirements section needs quantitative metrics:

  1. Obstacle Detection:
    • Detection range
    • Speed measurement accuracy
    • Position accuracy
    • Update rate
  2. System Performance:
    • Control loop frequency
    • Response time
    • Speed control accuracy
  3. Safety Requirements:
    • Minimum time gap
    • Maximum deceleration
    • Fail-safe behavior

Would you like me to help draft detailed requirements specifications?

Copy link
Collaborator

@vinzenzm vinzenzm left a comment

Choose a reason for hiding this comment

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

Vorschläge wurden eingearbeitet.

@seefelke seefelke merged commit 8532d6a into main Dec 5, 2024
4 checks passed
@seefelke seefelke deleted the 490-feature-remodel-acc-concept branch December 5, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Feature]: Remodel ACC concept
3 participants