Skip to content

Support Reentrant callback groups in Agnocast CIE #1246

@atsushi421

Description

@atsushi421

Summary

The Agnocast version of the Callback Isolated Executor (CIE) currently does not support rclcpp::CallbackGroupType::Reentrant. Every callback group, regardless of its type, is dispatched to a single-threaded child executor, so callbacks that users place in a Reentrant group still execute sequentially. We should bring the Agnocast CIE in line with the upstream CIE, which gained Reentrant callback group support in autowarefoundation/callback_isolated_executor#21.

Current behavior

All three Agnocast-side CIE implementations unconditionally spawn a single-threaded child executor per callback group, ignoring the group's type:

  • CallbackIsolatedAgnocastExecutor::spin() in src/agnocastlib/src/agnocast_callback_isolated_executor.cpp (around lines 79–88) creates either an rclcpp::executors::SingleThreadedExecutor or an agnocast::SingleThreadedAgnocastExecutor for every group.
  • AgnocastOnlyCallbackIsolatedExecutor::spin() in src/agnocastlib/src/node/agnocast_only_callback_isolated_executor.cpp (around lines 84–109) always uses AgnocastOnlySingleThreadedExecutor.
  • ComponentManagerCallbackIsolated::start_executor_for_callback_group() in src/agnocast_components/src/agnocast_component_container_cie.cpp (around lines 152–188) has the same pattern: one rclcpp::executors::SingleThreadedExecutor or agnocast::SingleThreadedAgnocastExecutor per callback group, regardless of its type.

Desired behavior

Match the design introduced by autowarefoundation/callback_isolated_executor#21 for the Agnocast CIE:

  • Detect the callback group type when spawning child executors.
  • For Mutually Exclusive groups, keep the current single-threaded child executor to preserve sequential execution guarantees.
  • For Reentrant groups, dispatch callbacks to a multi-threaded child executor so that callbacks within the same group can run in parallel.
  • Apply the change to all three entry points: CallbackIsolatedAgnocastExecutor, AgnocastOnlyCallbackIsolatedExecutor, and ComponentManagerCallbackIsolated (the agnocast_component_container_cie component container).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions