autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
964 stars 630 forks source link

feat(rtc_interface, lane_change): check state transition for cooperate status #8855

Closed go-sakayori closed 2 weeks ago

go-sakayori commented 2 weeks ago

Description

A new filed tier4_rtc_msgs/State state was introduced in the rt cooperate status previously. This field is used to observe the state transition of the rtc message. However, inappropriate state transition could be occurred since there was no limitation in the rtc interface module.

In this PR, I have checked the state transition inside the updateCooperateStatus function. Additionally, the RTC state transition is fixed in the lane change module. The cooperateState status would transit to failure when the module can only transit to FAILURE. Being specific, it should not transit to FAILED inside planWaitingApproval function, although the lane change module status could be kept WAITING_APPROVAL due to canTransitFailureState function.

Related links

https://github.com/tier4/tier4_autoware_msgs/pull/119 https://github.com/autowarefoundation/autoware.universe/pull/8604

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

github-actions[bot] commented 2 weeks ago

Thank you for contributing to the Autoware project!

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

Please ensure:

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.

Project coverage is 27.82%. Comparing base (eaacae4) to head (58e1ae2). Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...nning/autoware_rtc_interface/src/rtc_interface.cpp 66.66% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8855 +/- ## ========================================== - Coverage 27.82% 27.82% -0.01% ========================================== Files 1325 1329 +4 Lines 98809 98848 +39 Branches 39668 39675 +7 ========================================== + Hits 27495 27502 +7 - Misses 71235 71314 +79 + Partials 79 32 -47 ``` | [Flag](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8855/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [differential](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `24.15% <66.66%> (?)` | | | | [total](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `27.82% <ø> (-0.01%)` | :arrow_down: | Carriedforward from [aaf5f27](https://app.codecov.io/gh/autowarefoundation/autoware.universe/commit/aaf5f270408216ab8ba3980bcd1a5a687ddb2307?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

go-sakayori commented 2 weeks ago

@satoshi-ota Since I've made a minor change eba9d508492349cd760649fb4073c3cc16f535eb after you reviewed, can you check it once more. Thank you in advance.