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

374 Research: Why does the car hit obstacles #409

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ralf524
Copy link
Collaborator

@Ralf524 Ralf524 commented Nov 1, 2024

Description

Provides a quick overview of the current object detection and some issues related to collisions with obstacles

Fixes # (374)

Type of change

Please delete options that are not relevant.

  • documentation update

Does this PR introduce a breaking change?

No

Most important changes

changes file /doc/research/paf24/perception/Obstacle_detection.md

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

  • Documentation
    • Updated the Obstacle_detection.md document to provide a structured overview of obstacle detection methodologies in vehicle perception systems.
    • Introduced a new section titled "Research: Why does the car hit obstacles."
    • Organized content into sections: Object Detection, Distance Calculation, Publishing of Outputs, and Dependencies of Detected and Hit Obstacles.
    • Highlighted significant findings regarding detection accuracy and potential issues with distance measurements, particularly concerning certain undetected objects and inaccuracies leading to collisions.

@Ralf524 Ralf524 linked an issue Nov 1, 2024 that may be closed by this pull request
Copy link
Contributor

coderabbitai bot commented Nov 1, 2024

Walkthrough

The document Obstacle_detection.md has been updated to provide a structured overview of the current state of obstacle detection in vehicle perception systems. It introduces a new section titled "Research: Why does the car hit obstacles" and organizes the content into distinct sections: Object Detection, Distance Calculation, Publishing of Outputs, and Dependencies of Detected and Hit Obstacles. Key findings regarding detection inaccuracies and the limitations of certain sensors are also highlighted.

Changes

File Path Change Summary
doc/research/paf24/perception/Obstacle_detection.md Updated to include a structured overview of obstacle detection, detailing object detection methods, distance calculations, output publishing, and dependencies related to obstacle detection.

Possibly related PRs

  • get current state and document it #363 #399: The current_state.md document provides an overview of the simulation involving an agent, which may relate to the obstacle detection and distance calculation aspects discussed in the Obstacle_detection.md document.
  • Add RViz research #400: The rviz.md document discusses visualizing real-time data from sensors like LIDAR, which is relevant to the Object Detection section of the main PR that categorizes sensors and discusses their roles in obstacle detection.
  • 396 read previous research #403: The old_research_overview.md document summarizes previous research related to vehicle control and perception, which may provide context for the findings in the Obstacle_detection.md regarding detection inaccuracies and vehicle behavior.
  • 360 document and review systems architecture of autonomous driving platform #408: The architecture_documentation.md document outlines the interactions between components, including perception, which is directly relevant to the main PR's focus on obstacle detection in vehicle perception systems.

Suggested labels

documentation

Suggested reviewers

  • seitzseb

Poem

In the realm of sensors, we hop and we play,
Detecting the obstacles that come in our way.
With LIDAR and cameras, we navigate fine,
A world full of wonders, where data aligns.
So here’s to the changes, both clever and bright,
In the dance of perception, we’ll leap with delight! 🐇✨


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

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

1-9: Fix Markdown formatting issues in the document header section.

The document structure is good, but there are some formatting issues to address:

-# Research: Why does the car hit obstacles
+# Research: Why does the car hit obstacles?

+
 ## Summary of current obstacle detection in perception
-:
 - [Object detection](#Object-detection)
 - [Distance calculation](#Distance-calculation)
 - [Publishing of Outputs](#Publishing-of-Outputs)
+
 For more details, please refer to the current documentation.
🧰 Tools
🪛 Markdownlint

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

(MD022, blanks-around-headings)


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

(MD026, no-trailing-punctuation)


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

(MD032, blanks-around-lists)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

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

📒 Files selected for processing (1)
  • doc/research/paf24/perception/Obstacle_detection.md (1 hunks)
🧰 Additional context used
🪛 Markdownlint
doc/research/paf24/perception/Obstacle_detection.md

37-37: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


38-38: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


39-39: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


40-40: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


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

(MD009, no-trailing-spaces)


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

(MD009, no-trailing-spaces)


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)


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

(MD022, blanks-around-headings)


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

(MD026, no-trailing-punctuation)


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

(MD026, no-trailing-punctuation)


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

(MD026, no-trailing-punctuation)


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

(MD026, no-trailing-punctuation)


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

(MD026, no-trailing-punctuation)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)

🔇 Additional comments (3)
doc/research/paf24/perception/Obstacle_detection.md (3)

10-18: Clarify sensor classification and capabilities.

The distinction between "active" and "inactive" sensors needs more context:

  • Why are certain sensors classified as inactive?
  • What are the implications of this classification for obstacle detection?
  • What are the specific capabilities and limitations of each sensor type?

This information is crucial for understanding the system's detection capabilities and potential blind spots.

🧰 Tools
🪛 Markdownlint

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

(MD022, blanks-around-headings)


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

(MD026, no-trailing-punctuation)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


19-27: Address critical safety implications in distance calculation.

Several concerning issues need further investigation:

  1. The use of "infinity" for missing distance values could be dangerous. Consider:
    • How does the control system handle these infinity values?
    • What fallback mechanisms exist?
  2. The LIDAR flickering issue presents a significant safety risk:
    • What is the minimum acceptable resolution?
    • How frequently does flickering occur?
    • Are there compensatory mechanisms in place?

Would you like me to help create a detailed test plan to validate these scenarios?

🧰 Tools
🪛 Markdownlint

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

(MD009, no-trailing-spaces)


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

(MD009, no-trailing-spaces)


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

(MD022, blanks-around-headings)


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

(MD032, blanks-around-lists)


33-41: Verify independence claims with empirical data.

The document states that obstacle detection is independent of:

  • Vehicle speed
  • Obstacle size
  • Obstacle type
  • Dynamic/static nature

These claims seem counterintuitive and need validation. For example:

  • Higher speeds typically affect sensor data quality
  • Smaller obstacles are generally harder to detect
  • Moving obstacles present different detection challenges

Please provide:

  • Test data supporting these independence claims
  • Detection success rates under various conditions
  • Confidence intervals for each scenario

Also fix the list indentation:

 - Are all obstacles detected? No
 - Does successful object detection depend on:
-    - Speed of the car? No
-    - Size of obstacles? No
-    - Type of obstacle? No
-    - Dynamic/static obstacle? No
+  - Speed of the car? No
+  - Size of obstacles? No
+  - Type of obstacle? No
+  - Dynamic/static obstacle? No
🧰 Tools
🪛 Markdownlint

37-37: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


38-38: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


39-39: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


40-40: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


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

(MD026, no-trailing-punctuation)

Comment on lines 42 to 48
## Important aspects found during research:

- Sometimes objects are not detected (sometimes e.g.: cyclists, construction site signs, open car doors)
- Most object that are hit are detected
- Sometimes distance calculation is incorrect (distance is set to infinity just before the collision)
- Distance in x is alway > ~0.5 (is that a problem?), sometimes distance to a collided car is greater than the distance to a parked car on the side of the road
- Significant issues in dead-end situations: -> 1.2 seconds of reversing -> the car often immediately collides with the obstacle again
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 safety issues require immediate attention and mitigation strategies.

The research findings reveal several serious safety concerns:

  1. Undetected Objects:

    • Cyclists and construction signs being missed is a critical safety issue
    • Need to specify detection success rate and conditions
  2. Distance Calculation Issues:

    • The minimum distance of ~0.5m needs investigation
    • Incorrect infinity values before collision indicate a systemic problem
    • Inconsistent distance measurements could lead to accidents
  3. Dead-end Behavior:

    • The 1.2-second reverse-and-collide cycle indicates a fundamental logic issue
    • Need to implement proper obstacle avoidance strategy

Consider:

  • Implementing redundant detection systems for critical objects (cyclists, construction elements)
  • Adding safety margins to distance calculations
  • Developing a more sophisticated reversing strategy with proper obstacle tracking
  • Adding sensor fusion to improve reliability

Would you like assistance in designing specific test scenarios or mitigation strategies for these issues?

🧰 Tools
🪛 Markdownlint

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

(MD026, no-trailing-punctuation)

Copy link
Collaborator

@Lukasnol Lukasnol left a comment

Choose a reason for hiding this comment

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

Looks good to me. You might want to add the formatting changes suggested by the mark down linter. But is not mandatory

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 (1)
doc/research/paf24/perception/Obstacle_detection.md (1)

1-10: Consider adding research methodology details.

The document would benefit from additional context about:

  • Research timeframe and conditions
  • Test scenarios conducted
  • Data collection methods
  • Success criteria used
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 940e837 and e68ee8b.

📒 Files selected for processing (1)
  • doc/research/paf24/perception/Obstacle_detection.md (1 hunks)
🔇 Additional comments (1)
doc/research/paf24/perception/Obstacle_detection.md (1)

13-21: Clarify sensor activation status and capabilities.

Please provide:

  • Reasons why certain sensors are inactive
  • Impact of inactive sensors on detection capabilities
  • Whether activating additional sensors could improve detection reliability

This is particularly important given the detection issues mentioned later in the document. Consider implementing sensor fusion to improve reliability.

Comment on lines +25 to +30
- The vision_node receives depth-images from the lidar_distance_node for the specified camera angle

- According to the distance-to-objects documentation, the LIDAR sensor's 3D values are projected onto a 2D image that matches the exact dimensions of the camera image.
Numpy formulas are used to reconstruct the depth image, with distances in meters represented as pixel values (grayscale image).
If no distance is found in the depth image, “infinity” is returned for this bounding box.

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 distance calculation reliability issues.

The current implementation has several concerning aspects:

  1. Returning "infinity" when no distance is found could lead to unsafe behavior
  2. No mention of error handling or fallback mechanisms
  3. No validation of depth image reconstruction accuracy

Consider implementing:

  • Bounded distance values instead of infinity
  • Confidence scores for distance measurements
  • Error handling for missing or invalid depth data

Comment on lines +52 to +56
- Sometimes objects are not detected (sometimes e.g.: cyclists, construction site signs, open car doors)
- Most objects that are hit are detected
- Sometimes distance calculation is incorrect (distance is set to infinity just before the collision)
- Distance in x is alway > ~0.5 (is that a problem?), sometimes distance to a collided car is greater than the distance to a parked car on the side of the road
- Significant issues in dead-end situations: -> 1.2 seconds of reversing -> the car often immediately collides with the obstacle again
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

Urgent: Implement specific technical mitigations for identified issues.

The research has identified critical safety issues that require immediate technical solutions:

  1. For undetected objects (cyclists, construction signs):

    • Implement redundant detection methods
    • Add specific detection models for vulnerable road users
    • Consider adding object persistence tracking
  2. For distance calculation issues:

    • Investigate the 0.5m minimum distance limitation
    • Implement sanity checks for distance values
    • Add temporal smoothing of distance measurements
  3. For dead-end behavior:

    • Implement a proper state machine for reversing
    • Add obstacle memory to prevent repeated collisions
    • Consider path planning with multiple waypoints

Would you like assistance in designing specific implementations for any of these solutions?

Comment on lines +50 to +56
## Important aspects found during research

- Sometimes objects are not detected (sometimes e.g.: cyclists, construction site signs, open car doors)
- Most objects that are hit are detected
- Sometimes distance calculation is incorrect (distance is set to infinity just before the collision)
- Distance in x is alway > ~0.5 (is that a problem?), sometimes distance to a collided car is greater than the distance to a parked car on the side of the road
- Significant issues in dead-end situations: -> 1.2 seconds of reversing -> the car often immediately collides with the obstacle again
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

Document mitigation strategies and timeline.

While the research findings are valuable, the document should be expanded to include:

  1. Prioritized list of issues based on safety impact
  2. Proposed technical solutions for each issue
  3. Implementation timeline and milestones
  4. Success criteria for validating fixes

This will help track progress and ensure all critical issues are addressed systematically.

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.

Research: Why does the car hit obstacles
2 participants