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(rtc_auto_mode_manager): add rtc_auto_mode_manager and fix auto mode behavior #1541

Merged
merged 12 commits into from
Sep 15, 2022

Conversation

rej55
Copy link
Contributor

@rej55 rej55 commented Aug 8, 2022

Signed-off-by: Fumiya Watanabe [email protected]

Description

RTC Auto Approver had a problem that behavior velocity planning module inserts stop line for a moment because RTC Auto Approver sends a command after receiving RTC status from the planning module.

To solve this problem, I add the function to approve automatically to rtc_interface.
Furthermore, I removed approving function from RTC Auto Approver.
So, RTC Auto Approver just has the function to set default value to enable auto mode.
To clarify the function, I rename RTC Auto Approver to RTC Auto Mode Manager.

The behavior of auto mode is changed as following:

  • If it receives cooperate_commands when auto mode is enabled
    • It plans following received cooperate_commands and turns off the auto mode
    • This behavior is just applied to the target that has same UUID

Related links

Tests performed

Tested in planning simulator.

2022-09-13-10-59-03.mp4

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.

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Base: 10.33% // Head: 10.10% // Decreases project coverage by -0.23% ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1541      +/-   ##
==========================================
- Coverage   10.33%   10.10%   -0.24%     
==========================================
  Files        1152     1221      +69     
  Lines       76248    90492   +14244     
  Branches    18750    22813    +4063     
==========================================
+ Hits         7883     9145    +1262     
- Misses      59453    71683   +12230     
- Partials     8912     9664     +752     
Flag Coverage Δ *Carryforward flag
differential 2.73% <0.00%> (?)
total 10.38% <0.00%> (+0.04%) ⬆️ Carriedforward from de01710

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

Impacted Files Coverage Δ
common/motion_utils/src/resample/resample.cpp 32.08% <0.00%> (+0.85%) ⬆️
...havior_path_planner/behavior_path_planner_node.hpp 0.00% <ø> (ø)
...or_path_planner/src/behavior_path_planner_node.cpp 0.32% <0.00%> (+0.32%) ⬆️
...include/behavior_velocity_planner/planner_data.hpp 0.00% <ø> (ø)
...y_planner/include/utilization/trajectory_utils.hpp 0.00% <0.00%> (ø)
planning/behavior_velocity_planner/src/node.cpp 0.57% <0.00%> (+0.57%) ⬆️
...ty_planner/src/scene_module/blind_spot/manager.cpp 0.00% <0.00%> (ø)
...ity_planner/src/scene_module/crosswalk/manager.cpp 0.00% <0.00%> (ø)
...ner/src/scene_module/crosswalk/scene_crosswalk.cpp 0.00% <0.00%> (ø)
...lanner/src/scene_module/detection_area/manager.cpp 0.00% <0.00%> (ø)
... and 883 more

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.

@rej55 rej55 force-pushed the feature/add_auto_mode_manager branch from c06e7c0 to f089e0e Compare September 7, 2022 09:23
@rej55 rej55 marked this pull request as ready for review September 8, 2022 05:06
@yukkysaito
Copy link
Contributor

image
This may not be relevant, but I was wondering about the stop line.

@rej55
Copy link
Contributor Author

rej55 commented Sep 9, 2022

I can't reproduce it 🤔
2022-09-09-14-43-31

@taikitanaka3
Copy link
Contributor

@yukkysaito
can you tell me commit hash? if your branch is old then occlusion spot could have inserted stop line
#1541 (comment)

@taikitanaka3
Copy link
Contributor

@rej55
I think this additional change is necessary to launch with awf:autoware.universe
image
image

@rej55
Copy link
Contributor Author

rej55 commented Sep 9, 2022

@taikitanaka3
Thank you. I fixed it in 4ad3851

@yukkysaito
Copy link
Contributor

yukkysaito commented Sep 9, 2022

I can't reproduce it

can you tell me commit hash? if your branch is old then occlusion spot could have inserted stop line

@rej55 @taikitanaka3 It is the screenshot of movie in PR description. So I don't know about hash

@rej55
Copy link
Contributor Author

rej55 commented Sep 9, 2022

Ok, I see.
This video is the old version of autoware.universe.
I'll update the video in the description.

@taikitanaka3
Copy link
Contributor

taikitanaka3 commented Sep 9, 2022

@yukkysaito
it's fixed by this PR
actually this is refactoring but this PR could solve insert.zero velocity problem which was caused by occlusion spot own inserting point at edge case
#1615

@taikitanaka3
Copy link
Contributor

@satoshi-ota
Can you test crosswalk for this PR ?
I have tested with awf: autoware_launch but only yield is generated and there is stop behavior for crosswalk
https://user-images.githubusercontent.com/65527974/189782931-0708cb9d-ce92-4ca4-8805-8c8da56374a5.mp4

Copy link
Contributor

@taikitanaka3 taikitanaka3 left a comment

Choose a reason for hiding this comment

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

LGTM

@rej55 rej55 enabled auto-merge (squash) September 14, 2022 08:47
@rej55
Copy link
Contributor Author

rej55 commented Sep 15, 2022

@TakaHoribe
Could you approve this change?

@rej55 rej55 merged commit acf4ac8 into autowarefoundation:main Sep 15, 2022
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
…ode behavior (tier4#1541)

* feat(rtc_auto_mode_manager): add rtc_auto_mode_manager and fix auto mode behavior

Signed-off-by: Fumiya Watanabe <[email protected]>

* ci(pre-commit): autofix

* fix(rtc_auto_mode_manager): fix typo

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): revert namespace

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): reset auto mode just only related uuid

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_auto_mode_manager): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(tier4_planning_launch): launch rtc_auto_mode_manager

Signed-off-by: Fumiya Watanabe <[email protected]>

* Update launch/tier4_planning_launch/launch/scenario_planning/lane_driving.launch.xml

Co-authored-by: taikitanaka3 <[email protected]>

* fix(rtc_interface): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(behavior_velocity_planner): fix initialization in crosswalk module

Signed-off-by: Fumiya Watanabe <[email protected]>

* feat(rtc_auto_mode_manager): fix initialization

Signed-off-by: Fumiya Watanabe <[email protected]>

Signed-off-by: Fumiya Watanabe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka3 <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…ode behavior (tier4#1541)

* feat(rtc_auto_mode_manager): add rtc_auto_mode_manager and fix auto mode behavior

Signed-off-by: Fumiya Watanabe <[email protected]>

* ci(pre-commit): autofix

* fix(rtc_auto_mode_manager): fix typo

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): revert namespace

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): reset auto mode just only related uuid

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_auto_mode_manager): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(tier4_planning_launch): launch rtc_auto_mode_manager

Signed-off-by: Fumiya Watanabe <[email protected]>

* Update launch/tier4_planning_launch/launch/scenario_planning/lane_driving.launch.xml

Co-authored-by: taikitanaka3 <[email protected]>

* fix(rtc_interface): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(behavior_velocity_planner): fix initialization in crosswalk module

Signed-off-by: Fumiya Watanabe <[email protected]>

* feat(rtc_auto_mode_manager): fix initialization

Signed-off-by: Fumiya Watanabe <[email protected]>

Signed-off-by: Fumiya Watanabe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka3 <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…ode behavior (tier4#1541)

* feat(rtc_auto_mode_manager): add rtc_auto_mode_manager and fix auto mode behavior

Signed-off-by: Fumiya Watanabe <[email protected]>

* ci(pre-commit): autofix

* fix(rtc_auto_mode_manager): fix typo

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): revert namespace

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): reset auto mode just only related uuid

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_auto_mode_manager): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(tier4_planning_launch): launch rtc_auto_mode_manager

Signed-off-by: Fumiya Watanabe <[email protected]>

* Update launch/tier4_planning_launch/launch/scenario_planning/lane_driving.launch.xml

Co-authored-by: taikitanaka3 <[email protected]>

* fix(rtc_interface): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(behavior_velocity_planner): fix initialization in crosswalk module

Signed-off-by: Fumiya Watanabe <[email protected]>

* feat(rtc_auto_mode_manager): fix initialization

Signed-off-by: Fumiya Watanabe <[email protected]>

Signed-off-by: Fumiya Watanabe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka3 <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
…ode behavior (tier4#1541)

* feat(rtc_auto_mode_manager): add rtc_auto_mode_manager and fix auto mode behavior

Signed-off-by: Fumiya Watanabe <[email protected]>

* ci(pre-commit): autofix

* fix(rtc_auto_mode_manager): fix typo

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): revert namespace

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_interface): reset auto mode just only related uuid

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(rtc_auto_mode_manager): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(tier4_planning_launch): launch rtc_auto_mode_manager

Signed-off-by: Fumiya Watanabe <[email protected]>

* Update launch/tier4_planning_launch/launch/scenario_planning/lane_driving.launch.xml

Co-authored-by: taikitanaka3 <[email protected]>

* fix(rtc_interface): fix

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix(behavior_velocity_planner): fix initialization in crosswalk module

Signed-off-by: Fumiya Watanabe <[email protected]>

* feat(rtc_auto_mode_manager): fix initialization

Signed-off-by: Fumiya Watanabe <[email protected]>

Signed-off-by: Fumiya Watanabe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka3 <[email protected]>
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.

4 participants