fix(sample_application): use dedicated callback groups#1273
fix(sample_application): use dedicated callback groups#1273
Conversation
Signed-off-by: bdm-k <kokusyunn@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates the sample service/server and client to use dedicated ROS 2 callback groups for Agnocast service entities, avoiding the warning about mixing ROS 2 and Agnocast callbacks in the default callback group when using the callback-isolated executor.
Changes:
- Add a dedicated
MutuallyExclusivecallback group tominimal_serverand assign the Agnocast service to it. - Create a dedicated
MutuallyExclusivecallback group inminimal_clientand assign the Agnocast client to it (with explicitServicesQoS).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/agnocast_sample_application/src/minimal_server.cpp | Creates a dedicated callback group and binds the Agnocast service to it. |
| src/agnocast_sample_application/src/minimal_client.cpp | Creates a dedicated callback group and binds the Agnocast client to it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@bdm-k One thought though: the warning on minimal_client / minimal_server is actually triggered by the built-in parameter services that Rather than adding dedicated callback groups on the application side, would it make more sense to relax the warning condition to exclude the built-in parameter services? |
…k warning Signed-off-by: bdm-k <kokusyunn@gmail.com>
|
@Koichi98 Aside from this, I patched |
|
Oh, it's not just the parameter services; we also need to exclude the parameter events and the logging publisher. |
|
@Koichi98 If we consider using the default callback group with |
|
@bdm-k Option A: Have Agnocast lazy-create a dedicated callback group internally when Option B: Extend the allow-list in So I agree — requiring users to set up a dedicated callback group explicitly seems to be the only sound option. Keeping the current warning strict and treating "default group + CIE" as discouraged in docs/samples is probably the right path. @atsushi421 |
|
@Koichi98 I agree that requiring users to set up a dedicated callback group explicitly is the right approach. Option A carries a significant risk — silently breaking the |
… callback warning" This reverts commit 274469e. Signed-off-by: bdm-k <kokusyunn@gmail.com>
|
@Koichi98 |
Description
minimal_server.cppandminimal_client.cpppreviously used the default callback group with CIE, which results in the "contains both ROS 2 callbacks and Agnocast callbacks" warning. This PR fixes the issue by using dedicated callback groups.How was this PR tested?
bash scripts/test/e2e_test_1to1.bash(required)bash scripts/test/e2e_test_2to2.bash(required)bash scripts/test/run_requires_kernel_module_tests.bash(required)Notes for reviewers