Repository navigation
fix(autoware_agnocast_wrapper, autoware_ground_filter): support the message_filters API of Lyrical - #1578
Open
xmfcx wants to merge 1 commit into
Open
fix(autoware_agnocast_wrapper, autoware_ground_filter): support the message_filters API of Lyrical#1578xmfcx wants to merge 1 commit into
xmfcx wants to merge 1 commit into
Conversation
…essage_filters API of Lyrical On ROS 2 Lyrical, message_filters::Subscriber has one template parameter and takes rclcpp::QoS instead of rmw_qos_profile_t. Humble and Jazzy keep rmw_qos_profile_t and default the second template parameter to rclcpp::Node. The non-Agnocast Subscriber of autoware_agnocast_wrapper derives from Subscriber<M> and converts its QoS with to_base_qos(). autoware_ground_filter passes its QoS through a local to_message_filters_qos() helper. Both select the type with __has_include(<message_filters/subscriber.h>), which Lyrical removed. Humble and Jazzy keep the same types and values as before. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
7 of 45 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1578 +/- ##
=======================================
Coverage 82.34% 82.34%
=======================================
Files 421 421
Lines 23903 23904 +1
Branches 147 147
=======================================
+ Hits 19683 19684 +1
Misses 4190 4190
Partials 30 30
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xmfcx
marked this pull request as ready for review
December 1, 2026 19:54
xmfcx
requested review from
a team,
Koichi98,
TetsuKawa,
YoshiRi,
amc-nu,
atsushi421,
badai-nguyen,
kobayu858,
ruth561,
sasakisasaki,
sykwer and
yukkysaito
as code owners
December 1, 2026 19:54
This branch has not been deployed
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
On ROS 2 Lyrical,
message_filters::Subscriberhas one template parameter and takesrclcpp::QoS. Humble and Jazzy takermw_qos_profile_t, and their second template parameter defaults torclcpp::Node.autoware_agnocast_wrapper: the non-AgnocastSubscriber<M>derives from::message_filters::Subscriber<M>. A privateto_base_qos()converts thermw_qos_profile_targument torclcpp::QoSon Lyrical. The public API of the wrapper does not change.autoware_ground_filter: a localto_message_filters_qos()helper gives the QoS tosubscribe()in the type that message_filters expects.Both helpers select the type with
__has_include(<message_filters/subscriber.h>). Lyrical removed this header. On Humble and Jazzy, the code compiles to the same types and QoS values as before.Related links
Parent Issue:
How was this PR tested?
See the Verification block below.
Notes for reviewers
On Lyrical, both packages also need two other changes. The first is the
.hppincludes of the separate header PR (fix: include the .hpp headers of tf2, tf2_ros and message_filters). The second is theament_target_dependencies()replacement of this issue:Universe needs this PR on Lyrical, because
autoware_pointcloud_preprocessor,autoware_object_merger,autoware_simple_object_mergerandautoware_traffic_light_multi_camera_fusionuse the wrapperSubscriber.The Agnocast-enabled branch (
USE_AGNOCAST_ENABLED) still uses::message_filters::Subscriber<M, rclcpp::Node>andrmw_qos_profile_t. This PR does not change it. Upstream agnocast needs its own Lyrical fixes first, and the Agnocast-enabled build was not tried on Lyrical. It is an open item.This PR and the draft PR below change the same
Subscriberclass. The one that merges second needs a small rebase:ENABLE_AGNOCAST=0/1 builds #1257Interface changes
None.
Effects on system behavior
None on Humble and Jazzy. On Lyrical, the wrapper
Subscriberkeeps the history, depth, reliability and durability of the given profile.AI usage
AI usage: Written with Claude Code from a local Lyrical build of the whole workspace.
Self-review: A clean-context agent read commit 965030d, compared it with the live Lyrical diff, and checked every quoted number against the remote and Lyrical logs. Two rounds ran, a review and a verification, and neither ran its own build, because the saved logs show each result. All three findings are fixed in this text: the failed first probe run, the reason for the unchanged Agnocast code, and the cut Humble test lines. Still open is the Agnocast-enabled code path on Lyrical. The wrapper node tests passed on Humble and Jazzy after this review.
Verification: The branch built on Humble and Jazzy in the
universe-devel-humble-20261201anduniverse-devel-jazzy-20261201images. All tests ofautoware_agnocast_wrapperandautoware_ground_filterpassed on both (226 tests, 0 failures), and a QoS probe passed on both. On Lyrical the branch alone stops in CMake, and the full workspace with all Lyrical changes built 576 of 576.Humble and Jazzy build of the branch
Remote runner, job
core-c3:remote-build.sh <distro> core-c3 ... -- --packages-select autoware_agnocast_wrapper autoware_ground_filter c3_mf_probewithRUN_TESTS=1. Core packages that the branch does not change come from/opt/autowareof the image (Autowaremain).universe-devel-humble-20261201image):Summary: 3 packages finished [1min 5s]universe-devel-jazzy-20261201image):Summary: 3 packages finished [1min 11s]autoware_ground_filterunit tests:test_ground_filter.gtest.xml: 14 tests, 0 errors, 0 failures,test_sanity_check.gtest.xml: 5 tests, 0 errors, 0 failurestest_sanity_check.gtest.xml: 5 tests, 0 errors, 0 failures. Thetest_ground_filterresult was not seen, because the helper prints only the last 60 lines ofcolcon test-result.test_ground_filter_integration(5 of 5), the node tests ofautoware_agnocast_wrapper, and thec3_mf_probetest (c3_mf_probe.xml: 1 test, 1 error). The error isrmw_create_node: failed to create domain, afterselected interface "lo" is not multicast-capable. The runner container has onlylo, and the default CycloneDDS configuration needs multicast.autoware_ground_filtertests on HumbleRemote runner, job
core-c3-gf-tests: only the branch folder ofautoware_ground_filter,--packages-select autoware_ground_filterwithRUN_TESTS=1. The package does not use the wrapper.test_ground_filter.gtest.xml: 14 tests, 0 errors, 0 failures,test_sanity_check.gtest.xml: 5 tests, 0 errors, 0 failurestest_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 5 failures, again withfailed to initialize rcl nodefrom the same CycloneDDS problem.autoware_ground_filtertests with a CycloneDDS configuration fileRemote runner, job
core-c3-gf-dds, Humble and Jazzy in parallel. The source is a copy of the branch folder with one test-only change, which is not part of this PR:ENV CYCLONEDDS_URI=file://${CMAKE_CURRENT_SOURCE_DIR}/test/cyclonedds.xmlontest_ground_filter_integration. The file turns off multicast and setslocalhostas the peer.universe-devel-humble-20261201image):test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 0 failures,Summary: 58 tests, 0 errors, 0 failures, 11 skippeduniverse-devel-jazzy-20261201image):test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 0 failures,Summary: 58 tests, 0 errors, 0 failures, 11 skippeduse_indicespath that this PR changes (PublishesWhenIndicesInputIsEnabled) and the approximate sync path.autoware_agnocast_wrapperdid not run in this job. They ran in the last section.QoS probe on Humble and Jazzy
c3_mf_probeis a small local package, not part of this PR. It creates three wrapperSubscriberobjects: one withrmw_qos_profile_sensor_datain the constructor, one with the default profile throughsubscribe(), and one with depth 3 andTRANSIENT_LOCAL. It then compares the actual QoS of each subscription and joins two of them with anExactTimeSynchronizer. The test fails if a value differs or if fewer than 3 synchronized callbacks arrive within 5 s.core-c3, failed on both distros withfailed to create domain(see the first section).core-c3-probe(--packages-select autoware_agnocast_wrapper c3_mf_probe,RUN_TESTS=1), with a CycloneDDS configuration file that turns off multicast. The results below come from that job.universe-devel-humble-20261201image):Summary: 2 packages finished [1min 27s],c3_mf_probe.xml: 1 test, 0 errors, 0 failures, 0 skippeduniverse-devel-jazzy-20261201image):Summary: 2 packages finished [28.2s],c3_mf_probe.xml: 1 test, 0 errors, 0 failures, 0 skippedHumble and Jazzy tests after the runner fix
Remote runner, job
tr-c3:RUN_TESTS=1 remote-build.sh <distro> tr-c3 ... -- --packages-select autoware_agnocast_wrapper autoware_ground_filter, on the branch without any test-only change. The helper now gives every job a CycloneDDS configuration file that turns off multicast and setslocalhostas the peer.universe-devel-humble-20261201image):Summary: 226 tests, 0 errors, 0 failures, 38 skippeduniverse-devel-jazzy-20261201image):Summary: 226 tests, 0 errors, 0 failures, 38 skippedtest_autoware_agnocast_wrapper.gtest.xml: 31 tests, 0 errors, 0 failures,test_autoware_node.xunit.xml: 66 tests, 0 errors, 0 failures,test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 0 failuresLyrical
Local container, Ubuntu 26.04, GCC 15.2,
-Wno-error=deprecated-declarations.autoware_agnocast_wrapperstops withUnknown CMake command "ament_target_dependencies". It needs theament_target_dependencies()replacement of Export CMake targets from Autoware packages and replace ament_target_dependencies autoware#7412 and the header PR first.576 packages finished.ctor sensor_data: history=1 depth=5 reliability=2 durability=2,subscribe default: history=1 depth=10 reliability=1 durability=2,subscribe custom: history=1 depth=3 reliability=1 durability=1,synchronized callbacks: 3 (pairs sent: 3).ENABLE_AGNOCAST=1) on any distro.