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

110 - Implement traffic light detection #148

Merged
merged 19 commits into from
Jan 13, 2024

Conversation

MaxJa4
Copy link
Collaborator

@MaxJa4 MaxJa4 commented Dec 17, 2023

Description

Extended the VisionNode to publish the cut out traffic lights and implemented a new traffic light detection node which uses them to recognize the traffic light state via a small neural network.

The node can publish the states UNKNOWN, GREEN, YELLOW, RED which are int8 enums as a ROS message.

The neural network has been extended to recognize side-facing traffic lights as a first measure of filtering those out. Additionally, a bounding box was laid over the source image, as the correct traffic light is towards the center of the image.

It was necessary to switch from 'yolov8x-seg' to yolo 'rtdetr-x' as the traffic lights were detected too late (had to be almost in the intersection to see them properly). Lack of segmentation wasn't an issue, cutting out by the bounding box of the recognized object was perfectly fine in this case.

Fixes #110

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Does this PR introduce a breaking change?

No

Most important changes

  • Extension of VisionNode
  • Implementation of TrafficLightDetectionNode

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
  • New and existing unit tests pass locally with my changes (might be obsolete with CI later on)

@MaxJa4 MaxJa4 added this to the Average Driving Score of 0.10 milestone Dec 17, 2023
@MaxJa4 MaxJa4 self-assigned this Dec 17, 2023
@MaxJa4 MaxJa4 requested a review from okrusch December 17, 2023 13:12

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copy link

Simulation results

Metric Value
Avg. driving score 0.023043
Avg. route completion 0.19
Avg. infraction penalty 0.283629
Collisions with pedestrians 0.0
Collisions with vehicles 38.994
Collisions with layout 116.982
Red lights infractions 0.0
Stop sign infractions 0.0
Off-road infractions 0.014
Route deviations 0.0
Route timeouts 38.994
Agent blocked 38.994
Yield emergency vehicles infractions 0.0
Scenario timeouts 38.994
Min speed infractions 0.0

Copy link
Collaborator

@JuliusMiller JuliusMiller left a comment

Choose a reason for hiding this comment

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

Nice Implementation

Copy link
Collaborator

@okrusch okrusch left a comment

Choose a reason for hiding this comment

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

Nice work!

@okrusch
Copy link
Collaborator

okrusch commented Jan 13, 2024

Fix failed checks!

@MaxJa4
Copy link
Collaborator Author

MaxJa4 commented Jan 13, 2024

Linter error fixed (came from main-branch).
Driving error not fixed, came from and still present in main-branch, reason unknown.

@MaxJa4 MaxJa4 merged commit bda0112 into main Jan 13, 2024
2 of 3 checks passed
@MaxJa4 MaxJa4 deleted the 110-implement-traffic-light-detection branch January 13, 2024 14:35
JuliusMiller pushed a commit that referenced this pull request Jan 14, 2024
* Add publisher

* Publish segmented traffic lights

* Implement TrafficLightNode

* Add TrafficLightState msg. WIP

* Add publisher

* Publish segmented traffic lights

* Implement TrafficLightNode

* Add TrafficLightState msg. WIP

* Added side view classification

* Finish traffic light node

* Add manual control launch file

* Make linter happy

* Add documentation

* Add missing traffic light detection model

* Fix color issues in rviz

* Limit simulator's max. RAM usage to prevent system crash

* fix: Linter fixes for other team's code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Feature]: Implementation of Traffic Light Detection
3 participants