feat: add destructor to socket_can_receiver_node (#75) - #100
Merged
xmfcx merged 2 commits intoSep 7, 2026
Merged
Conversation
mitsudome-r
approved these changes
Sep 4, 2026
xmfcx
force-pushed
the
feat/jazzy-10-receiver-node-destructor
branch
from
September 4, 2026 09:48
92c33fa to
8c5bea0
Compare
xmfcx
force-pushed
the
feat/jazzy-10-receiver-node-destructor
branch
from
September 4, 2026 10:07
8c5bea0 to
1c2a249
Compare
* feat: add destructor to socket_can_receiver_node Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * fix: stop the receiver thread before joining it The receive loop exits only when the global context shuts down, so a bare join blocks forever on lifecycle cleanup and on component unload. A stop flag in the loop condition makes every join return within one loop iteration. The destructor, on_cleanup, and on_shutdown share one stop_receiver_thread() helper. on_shutdown needs it because the shutdown transition does not pass through on_cleanup. on_cleanup now joins before it resets the publishers, which closes a race between the thread's active-state check and its publish call. The helper resets the thread handle, so a later configure starts clean. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org> --------- Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org> Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org> (cherry picked from commit 544b8b0) Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
xmfcx
force-pushed
the
feat/jazzy-10-receiver-node-destructor
branch
from
September 4, 2026 10:48
1c2a249 to
55416b6
Compare
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
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
Backport the receiver destructor from
maintojazzy. This is layer 10 of 11, based ontest/jazzy-09-node-destruction-test.The destructor stops and joins the receiver thread. The stop flag also allows lifecycle cleanup while the ROS context remains up.
This branch includes the Humble formatting and GoogleTest fixes, plus the virtual CAN trigger fix, from the preceding layers.
The CI follow-up awaits a separate review.
AI usage
AI usage: Cherry-picked from
mainwith Claude Code. Codex prepared the CI follow-up, propagated it through normal merge commits, and ran the local checks below.Self-review: Pure backport, I checked the order and verified that it is correct.
Verification: Local package builds and tests passed on Humble and Jazzy. All five destruction cases passed with virtual CAN on each distribution.
CI on the published head
Connection reset by peer, before the package build.Humble and Jazzy package builds and tests
Tested
bfbea2d48a31b7306dae3a874c3e79e1ebe89292in Ubuntu 22.04 / Humble and Ubuntu 24.04 / Jazzy containers. All colcon commands ran from/home/mfc/projects/autoware, with isolated build and install paths, Release mode, and--coverage.0.Summary: 220 tests, 0 errors, 0 failures, 51 skippedSummary: 226 tests, 0 errors, 0 failures, 53 skippedROS2_SOCKETCAN_REQUIRE_VCAN0=1:5 tests,0 errors,0 failures,0 skipped.