Skip to content

feat(ekf_localizer): apply agnocast_wrapper::Node to ekf_localizer#1190

Draft
Koichi98 wants to merge 26 commits into
autowarefoundation:mainfrom
Koichi98:apply_agnocast_ekf_localizer
Draft

feat(ekf_localizer): apply agnocast_wrapper::Node to ekf_localizer#1190
Koichi98 wants to merge 26 commits into
autowarefoundation:mainfrom
Koichi98:apply_agnocast_ekf_localizer

Conversation

@Koichi98

@Koichi98 Koichi98 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

Apply agnocast_wrapper::Node to autoware_ekf_localizer.
Please read autowarefoundation/autoware#7007 for the context and review guidelines of autoware_agnocast_wrapper adoption.
Also, please refer to https://github.com/autowarefoundation/autoware_core/blob/main/common/autoware_agnocast_wrapper/docs/review_guide.md for the review guide of autoware_agnocast_wrapper application PR. FYI: This node take Method2 of two integrations methods.

Node specific change

  • The trigger_node service is registered through the agnocast_wrapper::Node's create_service member function, which takes an rclcpp::QoS and absorbs the Humble-only rmw_qos_profile signature difference inside the wrapper. As a result, no per-distro / per-build (#ifdef) branch is needed at the call site.

Related Links

Related links

Parent Issue:

  • Link

How was this PR tested?

  • colcon build succeeds with both ENABLE_AGNOCAST=1 and ENABLE_AGNOCAST=0.
  • Ran Autoware based product with this change applied and confirmed it operates without any regression.

Notes for reviewers

Agnocast delivers subscription messages as read-only shared-memory objects, but pose_queue_ / twist_queue_ store mutable std::shared_ptrs that are held beyond the callback (and the twist covariance is edited in place). So each incoming message is copied into a heap-allocated std::shared_ptr before being pushed to the queue.

 auto pose_msg = std::make_shared<geometry_msgs::msg::PoseWithCovarianceStamped>(*msg);
  pose_queue_.push(pose_msg);

Interface changes

None.

Effects on system behavior

None when ENABLE_AGNOCAST is not set or set to 0 on runtime. When ENABLE_AGNOCAST=1, CPU Time used in this node for message serialization/deserialization will be reduced.

Koichi98 and others added 3 commits June 15, 2026 10:44
Signed-off-by: koichiimai <kotty.0704@gmail.com>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
@Koichi98 Koichi98 self-assigned this Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@Koichi98 Koichi98 changed the title Apply agnocast ekf localizer feat(ekf_localizer): apply agnocast_wrapper::Node to ekf_localizer Jun 18, 2026
Koichi98 and others added 8 commits June 18, 2026 18:03
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
@Koichi98 Koichi98 requested a review from Copilot June 22, 2026 23:12
@Koichi98 Koichi98 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates autoware_ekf_localizer to Method 2 of autoware_agnocast_wrapper by switching the node base class to autoware::agnocast_wrapper::Node, enabling Agnocast-backed pub/sub (and related utilities) when built with ENABLE_AGNOCAST=1.

Changes:

  • Rebased EKFLocalizer onto autoware::agnocast_wrapper::Node, converting publishers/subscribers/services/timers/tf2 usage to wrapper-compatible types and message allocation macros.
  • Updated launch to source Agnocast environment settings (including LD_PRELOAD handling).
  • Updated build configuration to depend on autoware_agnocast_wrapper, register the node with an Agnocast-only executor, and adjust test setup for Agnocast-enabled builds.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
localization/autoware_ekf_localizer/src/include/warning.hpp Switch Warning to accept agnocast_wrapper::Node* for logging/clock access.
localization/autoware_ekf_localizer/src/include/hyper_parameters.hpp Switch hyper-parameter loader signature to agnocast_wrapper::Node*.
localization/autoware_ekf_localizer/src/include/ekf_localizer.hpp Change node base class and migrate ROS entity member types to wrapper macros/types.
localization/autoware_ekf_localizer/src/hyper_parameters.cpp Update loader implementation to accept agnocast_wrapper::Node*.
localization/autoware_ekf_localizer/src/ekf_localizer.cpp Use wrapper timer, wrapper tf2, const-shared callback types, copied input messages, and allocated output messages.
localization/autoware_ekf_localizer/launch/ekf_localizer.launch.xml Include Agnocast env launch and pass LD_PRELOAD value into the node process.
localization/autoware_ekf_localizer/CMakeLists.txt Add wrapper dependency/setup, register node with Agnocast-only executor, and conditionally filter some tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread localization/autoware_ekf_localizer/CMakeLists.txt
Comment thread localization/autoware_ekf_localizer/src/ekf_localizer.cpp Outdated
Koichi98 added 2 commits June 23, 2026 08:36
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
Koichi98 added 4 commits June 24, 2026 18:03
…toware_core into apply_agnocast_ekf_localizer
Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
…toware_core into apply_agnocast_ekf_localizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants