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(autoware_traffic_light_arbiter): add current time validation #9747

Merged

Conversation

MasatoSaeki
Copy link
Contributor

@MasatoSaeki MasatoSaeki commented Dec 23, 2024

Description

This PR enables to validate external messages compared by current time.

Related links

Parent Issue:

How was this PR tested?

I have checked it on Evaluator.

Notes for reviewers

None.

Interface changes

None.

ROS Parameter Changes

Additions and removals

Change type Parameter Name Type Default Value Description
Added external_delay_tolerance double 5.0 The duration in seconds an external message is considered valid for merging in comparison with current time

Effects on system behavior

None.

Signed-off-by: MasatoSaeki <[email protected]>
@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) tag:require-cuda-build-and-test labels Dec 23, 2024
Copy link

github-actions bot commented Dec 23, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Signed-off-by: MasatoSaeki <[email protected]>
@MasatoSaeki MasatoSaeki marked this pull request as ready for review December 24, 2024 05:35
@MasatoSaeki MasatoSaeki added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 24, 2024
@knzo25
Copy link
Contributor

knzo25 commented Dec 24, 2024

I see changes that aim to address the sync issues between the V2X source and the perception stack (I did not consider that during the original implementation). To handle all the possible cases, could you make the comparisons using std::abs ?

@knzo25
Copy link
Contributor

knzo25 commented Dec 24, 2024

The tests seem to be failing. Maybe the stamps need to be generated during the test?

@MasatoSaeki
Copy link
Contributor Author

@knzo25
Thanks for your input.

I see changes that aim to address the sync issues between the V2X source and the perception stack (I did not consider that during the original implementation). To handle all the possible cases, could you make the comparisons using std::abs ?

fixed in 982643f

The tests seem to be failing. Maybe the stamps need to be generated during the test?

fixed in e2916dd

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 29.75%. Comparing base (4045fb3) to head (0e85287).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...raffic_light_arbiter/src/traffic_light_arbiter.cpp 44.44% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9747      +/-   ##
==========================================
- Coverage   29.75%   29.75%   -0.01%     
==========================================
  Files        1444     1444              
  Lines      108722   108736      +14     
  Branches    42699    42704       +5     
==========================================
+ Hits        32354    32357       +3     
- Misses      73185    73194       +9     
- Partials     3183     3185       +2     
Flag Coverage Δ *Carryforward flag
differential 4.61% <44.44%> (?)
total 29.75% <ø> (-0.01%) ⬇️ Carriedforward from e2916dd

*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.

@knzo25
Copy link
Contributor

knzo25 commented Dec 24, 2024

@MasatoSaeki

It seems there is a ci/cd error:

perception/autoware_traffic_light_arbiter/src/traffic_light_arbiter.cpp:241:  Add #include <algorithm> for max  [build/include_what_you_use] [4]
Done processing perception/autoware_traffic_light_arbiter/src/traffic_light_arbiter.cpp

Signed-off-by: MasatoSaeki <[email protected]>
@MasatoSaeki
Copy link
Contributor Author

@knzo25
I fixed in 0e85287

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

@MasatoSaeki
Copy link
Contributor Author

@YoshiRi
Could you check this PR regarding change requested?

@YoshiRi YoshiRi self-requested a review December 24, 2024 07:40
Copy link
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

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

LGTM

@MasatoSaeki MasatoSaeki merged commit 3dc9605 into autowarefoundation:main Dec 24, 2024
34 of 36 checks passed
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Dec 25, 2024
…towarefoundation#9747)

* add current time validation

Signed-off-by: MasatoSaeki <[email protected]>

* style(pre-commit): autofix

* change ros parameter name

Signed-off-by: MasatoSaeki <[email protected]>

* style(pre-commit): autofix

* add validation with absolute function

Signed-off-by: MasatoSaeki <[email protected]>

* add timestamp of topic in test

Signed-off-by: MasatoSaeki <[email protected]>

* fix ci error

Signed-off-by: MasatoSaeki <[email protected]>

---------

Signed-off-by: MasatoSaeki <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Dec 25, 2024
…towarefoundation#9747)

* add current time validation

Signed-off-by: MasatoSaeki <[email protected]>

* style(pre-commit): autofix

* change ros parameter name

Signed-off-by: MasatoSaeki <[email protected]>

* style(pre-commit): autofix

* add validation with absolute function

Signed-off-by: MasatoSaeki <[email protected]>

* add timestamp of topic in test

Signed-off-by: MasatoSaeki <[email protected]>

* fix ci error

Signed-off-by: MasatoSaeki <[email protected]>

---------

Signed-off-by: MasatoSaeki <[email protected]>
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) tag:require-cuda-build-and-test type:documentation Creating or refining documentation. (auto-assigned)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants