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(behavior_velocity_planner_common): fix unregister process #9913

Merged

Conversation

yuki-takagi-66
Copy link
Contributor

@yuki-takagi-66 yuki-takagi-66 commented Jan 14, 2025

Description

This PR fix unregister process problem of behavior_velocity_plannner modules which introduced by #9212

By the above PR, The variable registered_module_id_set_ for RTC-independent modules was not being cleared.
This PR fix this issue.

Related links

How was this PR tested?

psim and tier4 scenario tests

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: yuki-takagi-66 <[email protected]>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jan 14, 2025
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@yuki-takagi-66 yuki-takagi-66 changed the title po fix(behavior_velocity_planner_common): fix deleteExpiredModules process Jan 14, 2025
@yuki-takagi-66 yuki-takagi-66 changed the title fix(behavior_velocity_planner_common): fix deleteExpiredModules process fix(behavior_velocity_planner_common): fix process Jan 14, 2025
@yuki-takagi-66 yuki-takagi-66 changed the title fix(behavior_velocity_planner_common): fix process fix(behavior_velocity_planner_common): fix unregister process Jan 14, 2025
@yuki-takagi-66 yuki-takagi-66 marked this pull request as ready for review January 14, 2025 06:37
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.

LGTM. Thanks you.

@yuki-takagi-66 yuki-takagi-66 added run:clang-tidy-pr-review run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed run:clang-tidy-pr-review labels Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 29.37%. Comparing base (bb66275) to head (dab3426).
Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
...velocity_planner_common/scene_module_interface.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9913      +/-   ##
==========================================
- Coverage   29.37%   29.37%   -0.01%     
==========================================
  Files        1446     1447       +1     
  Lines      108399   108417      +18     
  Branches    42235    42235              
==========================================
+ Hits        31844    31845       +1     
- Misses      73471    73489      +18     
+ Partials     3084     3083       -1     
Flag Coverage Δ *Carryforward flag
differential 27.27% <0.00%> (?)
total 29.37% <ø> (ø) Carriedforward from bb66275

*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

@soblin soblin left a comment

Choose a reason for hiding this comment

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

I double-checked same process is done in

  • void SceneModuleManagerInterfaceWithRTC::deleteExpiredModules(
    const tier4_planning_msgs::msg::PathWithLaneId & path)
    {
    const auto isModuleExpired = getModuleExpiredFunction(path);
    auto itr = scene_modules_.begin();
    while (itr != scene_modules_.end()) {
    if (isModuleExpired(*itr)) {
    const UUID uuid = getUUID((*itr)->getModuleId());
    updateRTCStatus(
    uuid, (*itr)->isSafe(), State::SUCCEEDED, std::numeric_limits<double>::lowest(),
    clock_->now());
    removeUUID((*itr)->getModuleId());
    registered_module_id_set_.erase((*itr)->getModuleId());
    itr = scene_modules_.erase(itr);
    } else {
    itr++;
    }
    }
    }
  • void IntersectionModuleManager::deleteExpiredModules(
    const tier4_planning_msgs::msg::PathWithLaneId & path)
    {
    const auto isModuleExpired = getModuleExpiredFunction(path);
    auto itr = scene_modules_.begin();
    while (itr != scene_modules_.end()) {
    if (isModuleExpired(*itr)) {
    // default
    removeRTCStatus(getUUID((*itr)->getModuleId()));
    removeUUID((*itr)->getModuleId());
    // occlusion
    const auto intersection_module = std::dynamic_pointer_cast<IntersectionModule>(*itr);
    const auto occlusion_uuid = intersection_module->getOcclusionUUID();
    occlusion_rtc_interface_.removeCooperateStatus(occlusion_uuid);
    registered_module_id_set_.erase((*itr)->getModuleId());
    itr = scene_modules_.erase(itr);
    } else {
    itr++;
    }
    }
    }

@yuki-takagi-66 yuki-takagi-66 merged commit 6e0e6c0 into autowarefoundation:main Jan 14, 2025
69 of 72 checks passed
@yuki-takagi-66 yuki-takagi-66 deleted the takagi/fix-behavior-vel-unreg branch January 14, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants