Skip to content

feat(detection_by_tracker): use CallbackIsolatedAgnocastExecutor for detection_by_tracker_node#12360

Open
Koichi98 wants to merge 1 commit intoautowarefoundation:mainfrom
Koichi98:feat/apply_cie_to_detection_by_tracker
Open

feat(detection_by_tracker): use CallbackIsolatedAgnocastExecutor for detection_by_tracker_node#12360
Koichi98 wants to merge 1 commit intoautowarefoundation:mainfrom
Koichi98:feat/apply_cie_to_detection_by_tracker

Conversation

@Koichi98
Copy link
Contributor

@Koichi98 Koichi98 commented Mar 19, 2026

Description

Use CallbackIsolatedAgnocastExecutor (CIE) for detection_by_tracker node, as part of the effort to achieve middleware-transparent scheduling and optimize end-to-end response time across Autoware. By going through autoware_agnocast_wrapper, CIE activation is controlled by the ENABLE_AGNOCAST environment variable — when unset or 0, the node runs with the standard ROS 2 executor as before; when set to 1, it switches to CallbackIsolatedAgnocastExecutor.

Changes

  • CMakeLists.txt: Set SingleThreadedExecutor explicitly for ROS_EXECUTOR and changed to CallbackIsolatedAgnocastExecutor for AGNOCAST_EXECUTOR option.

Related links

How was this PR tested?

Notes for reviewers

Please review the following aspects:

  • Verify that all relevant CMakeLists.txt for detection_by_tracker node have been updated (no missed files).

    • Our current target is X2 v4.4.0, so please let us know if we have applied CIE to any nodes that do not run with that version.
  • If the node meets all of the following conditions, please check for potential race conditions (see Effects on system behavior for the reason):

    1. The node was originally running on a rclcpp::executors::SingleThreadedExecutor or rclcpp_components::component_container
    2. The node has multiple callback groups (the default is one)
    3. Shared variables are accessed across callback groups without proper mutex protection

    Note: Nodes already running on MultiThreadedExecutor (or component_container_mt) are not affected, as their callbacks are already executed concurrently.

Interface changes

None.

Effects on system behavior

When ENABLE_AGNOCAST=0 (default), there is no change in behavior at all — the node runs with the standard ROS 2 executor exactly as before.

When ENABLE_AGNOCAST=1, the executor switches to CallbackIsolatedAgnocastExecutor (CIE). Internally, CIE creates a dedicated rclcpp::executors::SingleThreadedExecutor for each callback group, so the fundamental scheduling behavior within each group remains almost identical. The key difference is that, for nodes originally using rclcpp::executors::SingleThreadedExecutor, callback groups now run in parallel across separate threads, similar to MultiThreadedExecutor.

Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Mar 19, 2026
@Koichi98 Koichi98 self-assigned this Mar 19, 2026
@github-actions
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.51%. Comparing base (d07e3a3) to head (f3dde69).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12360      +/-   ##
==========================================
- Coverage   18.54%   18.51%   -0.03%     
==========================================
  Files        1850     1852       +2     
  Lines      128011   128167     +156     
  Branches    45591    45650      +59     
==========================================
  Hits        23736    23736              
- Misses      84599    84755     +156     
  Partials    19676    19676              
Flag Coverage Δ *Carryforward flag
daily 21.00% <ø> (ø) Carriedforward from d07e3a3
daily-cuda 18.53% <ø> (ø) Carriedforward from d07e3a3
differential 0.00% <ø> (?)
total-cuda 18.53% <ø> (ø) Carriedforward from d07e3a3
total-humble-cuda 18.53% <ø> (ø) Carriedforward from d07e3a3

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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)

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant