Skip to content

feat: add new ros param to disable warning when no data is received (#59) - #101

Merged
xmfcx merged 2 commits into
feat/jazzy-10-receiver-node-destructorfrom
feat/jazzy-11-warn-on-receive-timeout
Sep 7, 2026
Merged

feat: add new ros param to disable warning when no data is received (#59)#101
xmfcx merged 2 commits into
feat/jazzy-10-receiver-node-destructorfrom
feat/jazzy-11-warn-on-receive-timeout

Conversation

@xmfcx

@xmfcx xmfcx commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Backport the receive-timeout warning parameter from main to jazzy. This is layer 11 of 11, based on feat/jazzy-10-receiver-node-destructor.

The warn_on_receive_timeout parameter defaults to true and controls the throttled receive-timeout warning. Both launch files expose the parameter.

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 main with 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

Humble and Jazzy package builds and tests

Tested ec1c4f1fc31a8bc5f752ad643a422e176fd456c5 in 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.

  • Both package builds, both package test commands, and both result commands exited with 0.
  • Humble: Summary: 220 tests, 0 errors, 0 failures, 51 skipped
  • Jazzy: Summary: 226 tests, 0 errors, 0 failures, 53 skipped
  • Each distribution ran all five destruction cases with ROS2_SOCKETCAN_REQUIRE_VCAN0=1: 5 tests, 0 errors, 0 failures, 0 skipped.
  • Not run on this head: GitHub CI, an Agnocast-enabled build, or nodes under the Agnocast executor.

@xmfcx
xmfcx force-pushed the feat/jazzy-11-warn-on-receive-timeout branch from fe97e7c to 26c0dc6 Compare September 4, 2026 09:48
@xmfcx
xmfcx force-pushed the feat/jazzy-11-warn-on-receive-timeout branch from 26c0dc6 to 36fd436 Compare September 4, 2026 10:07
)

* Added ros param to disable warning when no data is received.

Signed-off-by: Tony Baltovski <tbaltovski@clearpathrobotics.com>

* Linting and comment changes from PR feedback.

Signed-off-by: Tony Baltovski <tbaltovski@clearpathrobotics.com>

* fix: gate only receive timeouts behind the parameter

The parameter guarded the generic `catch (const std::exception &)` handler,
which also catches a failed `read(2)`, an incomplete frame, a wrong size
frame and a corrupted CAN FD frame. Setting it silenced those as well.

`SocketCanReceiver::wait()` is the only place that throws `SocketCanTimeout`,
and the header documents the split already. Catch that type first and gate
only it. Every other receive error warns as before.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>

* refactor: rename the parameter to warn_on_receive_timeout

The parameter now gates the timeout alone, so the name states the event that
it controls. The polarity matches `use_bus_time` and `enable_can_fd` next to
it, and it removes the double negative from the guard.

`warn_on_receive_timeout` defaults to `true`, which is the same behaviour as
`disable_warn_no_receive` with its default of `false`.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>

* feat: declare the receive timeout parameter in the launch files

`ros2 launch` cannot set a node parameter that the launch file does not
declare, so the parameter was reachable only through
`ros2 run ... --ros-args -p`. Declare and forward it in both launch files,
next to `use_bus_time`.

Log the value at startup with the other parameters.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>

---------

Signed-off-by: Tony Baltovski <tbaltovski@clearpathrobotics.com>
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org>
(cherry picked from commit e4401ec)
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx
xmfcx force-pushed the feat/jazzy-11-warn-on-receive-timeout branch from 36fd436 to 9c96179 Compare September 4, 2026 10:48
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx
xmfcx merged commit 9599ce5 into jazzy Sep 7, 2026
10 checks passed
@xmfcx
xmfcx deleted the feat/jazzy-11-warn-on-receive-timeout branch September 7, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants