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

fix: sync stored_commands to cooperate status #2223

Merged

Conversation

tkimura4
Copy link
Contributor

@tkimura4 tkimura4 commented Nov 7, 2022

Signed-off-by: tomoya.kimura tomoya.kimura@tier4.jp

Description

In rtc_interface, stored_commands is updated only when onCooperateCommandService() is called and is_locked_ is true.
However, the stored_commands are copied to the cooperate command status every time unlockCommandUpdate() is called.

void RTCInterface::unlockCommandUpdate()
{
is_locked_ = false;
updateCooperateCommandStatus(stored_commands_);
}

As a result, the cooperate commands that are cleared once may be re-registered through stored_commands_.
I fixed this by properly clearing the stored_command.

Note: This bug is caused by performing lane-change in the same direction more than once.

Related links

Tests performed

Using planning simulator, set the lane change module to RTC Approval mode and make sure that a lane change is not performed without approval.

Notes for reviewers

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Base: 11.89% // Head: 11.89% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (8dcdb38) compared to base (7c9f6e2).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2223      +/-   ##
==========================================
- Coverage   11.89%   11.89%   -0.01%     
==========================================
  Files        1111     1111              
  Lines       80812    80834      +22     
  Branches    20737    20750      +13     
==========================================
  Hits         9614     9614              
- Misses      61072    61094      +22     
  Partials    10126    10126              
Flag Coverage Δ *Carryforward flag
differential 3.85% <0.00%> (?)
total 11.86% <0.00%> (ø) Carriedforward from 7c9f6e2

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

Impacted Files Coverage Δ
planning/rtc_interface/src/rtc_interface.cpp 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@rej55 rej55 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@satoshi-ota satoshi-ota left a comment

Choose a reason for hiding this comment

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

The PR worked without any problems in the actual vehicle test.

@tkimura4 tkimura4 merged commit 4f6c3d4 into autowarefoundation:main Nov 8, 2022
@tkimura4 tkimura4 deleted the fix/rtc_inteface_stored_command branch November 8, 2022 04:49
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Nov 8, 2022
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
tkimura4 added a commit to tier4/autoware.universe that referenced this pull request Nov 11, 2022
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
tkimura4 added a commit to tier4/autoware.universe that referenced this pull request Nov 11, 2022
… (#177)

* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Dec 13, 2022
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Dec 15, 2022
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Dec 15, 2022
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
YoshiRi pushed a commit to YoshiRi/autoware.universe that referenced this pull request Jan 11, 2023
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
Signed-off-by: yoshiri <yoshiyoshidetteiu@gmail.com>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jan 16, 2023
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jan 16, 2023
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jan 18, 2023
* fix: sync stored_commands to cooperate status

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* fix: avoid double lock

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
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.

3 participants