refactor(multi_object_tracker_node): isolate multiple measurement channels with dynamic callback groups#12927
Open
kobayu858 wants to merge 5 commits into
Open
Conversation
Signed-off-by: kobayu858 <yutaro.kobayashi.2@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi.2@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi.2@tier4.jp>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
technolojin
reviewed
Jul 7, 2026
technolojin
left a comment
Contributor
There was a problem hiding this comment.
within the given mutex implementation context, odometry callback updateOdometryBuffer and it's buffer shall be mutex locked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, the introduction of the Callback Isolated Executor into Autoware is underway.
To successfully achieve DAG (Directed Acyclic Graph) Scheduling via the Callback Isolated Executor, each callback recognized as a vertex in the DAG must belong to its own independent CallbackGroup.
This enables a one-to-one mapping between CallbackGroups and OS threads, allowing for fine-grained control over Priority and Affinity on a per-OS-thread basis.
Since isolating all callbacks at once involves a significantly high implementation cost, we are adopting a phased approach—starting the modifications and application with the major nodes that have the highest impact.
Detailed Changes
cb_groups_measurement_(a vector for holding the groups) to the header.MutuallyExclusivegroup is dynamically generated for each valid channel and assigned to each subscription viaAUTOWARE_SUBSCRIPTION_OPTIONS.std::mutexstate_mutex_to the header.onMeasurement): To prevent interference from other threads during processing, the scope executingcore::process_measurementandprocessObjects()is protected usingstd::lock_guard<std::mutex>.onTimer): A lock is similarly applied to the scope handling transmission determination and distribution processing, completely preventing data rewriting (race conditions) during distribution.Related links
Parent Issue: Separation of CallbackGroups: Background
How was this PR tested?
I ran
lsimlocally using a sample application.I also measured the latency using CARET and confirmed that there were no significant differences.
The purpose of this PR is to enable scheduler configuration by isolating callback groups, not to reduce latency.
While the OSS version has only one subscriber, multiple subscribers are actually generated in practice.
Before

After

Notes for reviewers
state_mutex_withinonMeasurementandonTimeris appropriate, with no risk of deadlocks.state_/debugger_) are thoroughly protected due to multi-threading.Interface changes
None.
Effects on system behavior
None.