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

feat(traffic_light_arbiter): add signal match validator #6423

Conversation

TomohitoAndo
Copy link
Contributor

@TomohitoAndo TomohitoAndo commented Feb 15, 2024

Description

I added the signal match validator, which validate the match between perception signals and external signals and publish the received color only when they are identical.
This feature aims to enhance safety when both perception and external sources are available. It can be enabled by setting enable_signal_matching to true, though it is set to false by default.
Please see the Readme.md for the details.

Related Links

Tests performed

I conducted tests using the rosbag simulator. Please note that the Traffic Light Monitor Panel was specifically created for this testing and has not yet been merged into autoware.universe.

signal_matching_test.mp4

In this case, ego vehicle stops at the traffic light that has the ID of 1002.

  • Both signals are RED, so the arbiter output is RED

image

  • The external signal changed to GREEN and they are not identical now, so the output is UNKNOWN

image

  • The perception signal changed to GREEN and they are identical now, so the output is GREEN, and the ego vehicle proceeds.

image

Effects on system behavior

This feature is disabled by default.
If this is enabled, this validates the match between perception signals and external signals and publish the received color only when they are identical.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) labels Feb 15, 2024
@TomohitoAndo TomohitoAndo added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 15, 2024
@TomohitoAndo TomohitoAndo changed the title Feat/arbiter signal match validator feat(traffic_light_arbiter): add signal match validator Feb 15, 2024
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: 122 lines in your changes are missing coverage. Please review.

Comparison is base (c9e6dda) 14.99% compared to head (3106795) 14.98%.
Report is 32 commits behind head on main.

Files Patch % Lines
...affic_light_arbiter/src/signal_match_validator.cpp 0.00% 98 Missing ⚠️
...raffic_light_arbiter/src/traffic_light_arbiter.cpp 0.00% 23 Missing ⚠️
...e/traffic_light_arbiter/signal_match_validator.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6423      +/-   ##
==========================================
- Coverage   14.99%   14.98%   -0.02%     
==========================================
  Files        1838     1840       +2     
  Lines      127099   127192      +93     
  Branches    38075    38065      -10     
==========================================
  Hits        19062    19062              
- Misses      86715    86808      +93     
  Partials    21322    21322              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 15.00% <ø> (+<0.01%) ⬆️ Carriedforward from 95fd4dc

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

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

Only nits that can be ignored.
LGTM !

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
@knzo25
Copy link
Contributor

knzo25 commented Feb 19, 2024

@TomohitoAndo
Just one small comment regarding some keyword-looking variable 🙏

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
@TomohitoAndo
Copy link
Contributor Author

@knzo25
Could you check this PR as well? 🙏
autowarefoundation/autoware_launch#879

Copy link
Contributor

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

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

LGTM!

@TomohitoAndo
Copy link
Contributor Author

Thank you for your review! 🙇

@TomohitoAndo TomohitoAndo merged commit 757d656 into autowarefoundation:main Feb 20, 2024
21 of 26 checks passed
@TomohitoAndo TomohitoAndo deleted the feat/arbiter-signal-match-validator branch February 20, 2024 05:14
TomohitoAndo added a commit to tier4/autoware.universe that referenced this pull request Feb 20, 2024
TomohitoAndo added a commit to tier4/autoware.universe that referenced this pull request Feb 26, 2024
StepTurtle pushed a commit to StepTurtle/autoware.universe that referenced this pull request Feb 28, 2024
…dation#6423)

* feat(traffic_light_arbiter): add signal match validator

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* fix comments

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* add an explanation of signal match validator to readme

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* update readme

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* style(pre-commit): autofix

* fix comments

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* use std::copy instead of std::transform

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* use unordered_map to reduce calculation cost

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* avoid using `signal` because it is used in std::signal

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

---------

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
* feat(traffic_light_arbiter): add signal match validator

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* fix comments

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* add an explanation of signal match validator to readme

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* update readme

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* style(pre-commit): autofix

* fix comments

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* use std::copy instead of std::transform

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* use unordered_map to reduce calculation cost

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* avoid using `signal` because it is used in std::signal

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

---------

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…dation#6423)

* feat(traffic_light_arbiter): add signal match validator

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* fix comments

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* add an explanation of signal match validator to readme

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* update readme

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* style(pre-commit): autofix

* fix comments

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* use std::copy instead of std::transform

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* use unordered_map to reduce calculation cost

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* avoid using `signal` because it is used in std::signal

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

---------

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants