Checklist
Description
This is an umbrella / tracking issue for an ongoing campaign to raise the engineering quality of autoware_core packages along four axes, one ROS package per pull request:
- Testability refactoring — extract pure, ROS-free logic out of node methods / anonymous namespaces behind additive dependency-injection and logging seams, so core algorithms can be unit-tested without spinning up a ROS graph.
- Unit-test coverage — add fast, deterministic unit tests (known-answer cases, edge/error branches, previously-untested helpers) and re-enable orphaned tests.
- Performance — apply benchmark-proven, output-identical memory/compute optimizations (e.g.
reserve, sliding-window, binary search, allocation removal).
- De-duplication into
autoware_utils — consolidate near-duplicate utility code into the canonical autoware_utils modules (moderate scope) to keep the Core codebase clean.
A hard constraint throughout: the public API/ABI stays additive-only (new ctors/overloads/free functions; [[deprecated]] shims for anything replaced; no struct-layout or extern template signature changes).
Purpose
- Make Core's foundational algorithm packages unit-testable in isolation, replacing slow/flaky integration-only coverage with fast deterministic tests.
- Increase test coverage measurably, package by package, under the existing Codecov gate.
- Deliver measured performance improvements (every perf change ships with a micro-benchmark and an output-equivalence guard — no regressions).
- Reduce duplicated utility code by consolidating it into
autoware_utils, improving maintainability across the stack.
- Do all of the above without breaking downstream consumers (additive-only API/ABI, validated with
--packages-above).
Possible approaches
Every package follows the same repeatable 6-stage playbook, shipped as a single per-package PR (plus a prerequisite PR on autoware_utils when a symbol is promoted there):
- Characterize — capture the current green baseline (
colcon test + downstream build with --packages-above); add characterization tests pinning current behavior of the code about to move.
- Seam (additive testability refactor) — add a DI ctor/overload taking the plain param struct (or injected clock/logger); keep the existing
Node& ctor as a thin forwarding shim. Extract pure logic into named, header-declared free functions.
- Cover — add deterministic unit tests for the newly-exposed logic; re-enable orphaned tests; verify the
lcov delta locally.
- Optimize — only benchmarkable, output-identical changes, each with a committed micro-benchmark (before/after numbers) and an equivalence guard test.
- Dedup (moderate) — replace near-duplicates of existing
autoware_utils symbols; promote genuinely-shared helpers into the right autoware_utils module via a separate PR; never push lanelet/PCL/msg-specific types into generic utils.
- Verify & PR — full package test +
--packages-above on the {humble, jazzy} containers; clang-tidy / cppcheck / pre-commit clean; open the per-package PR.
Execution is orchestrated so packages can progress in parallel, with each package validated by a dual-source build of autoware_core + autoware_utils together before submission.
Definition of done
Per-package PR (the bar every PR clears):
Campaign: every package below reaches the per-package DoD.
Scope & progress (per-package PRs)
All in-scope packages now have an open per-package PR (52 total). Each box is checked when its PR merges. Every PR clears the per-package DoD above and was verified green on the fork's build-and-test CI before submission.
api/
common/
control/
localization/
map/
perception/
planning/
sensing/
testing/
Related issues
Checklist
Description
This is an umbrella / tracking issue for an ongoing campaign to raise the engineering quality of
autoware_corepackages along four axes, one ROS package per pull request:reserve, sliding-window, binary search, allocation removal).autoware_utils— consolidate near-duplicate utility code into the canonicalautoware_utilsmodules (moderate scope) to keep the Core codebase clean.A hard constraint throughout: the public API/ABI stays additive-only (new ctors/overloads/free functions;
[[deprecated]]shims for anything replaced; no struct-layout orextern templatesignature changes).Purpose
autoware_utils, improving maintainability across the stack.--packages-above).Possible approaches
Every package follows the same repeatable 6-stage playbook, shipped as a single per-package PR (plus a prerequisite PR on
autoware_utilswhen a symbol is promoted there):colcon test+ downstream build with--packages-above); add characterization tests pinning current behavior of the code about to move.Node&ctor as a thin forwarding shim. Extract pure logic into named, header-declared free functions.lcovdelta locally.autoware_utilssymbols; promote genuinely-shared helpers into the rightautoware_utilsmodule via a separate PR; never push lanelet/PCL/msg-specific types into generic utils.--packages-aboveon the{humble, jazzy}containers;clang-tidy/cppcheck/pre-commitclean; open the per-package PR.Execution is orchestrated so packages can progress in parallel, with each package validated by a dual-source build of
autoware_core+autoware_utilstogether before submission.Definition of done
Per-package PR (the bar every PR clears):
lcovdelta).{humble, jazzy} × {agnocast, above}; lint clean.autoware_utilssymbol move landed as a mergedautoware_utilsPR the Core PR depends on.Campaign: every package below reaches the per-package DoD.
Scope & progress (per-package PRs)
All in-scope packages now have an open per-package PR (52 total). Each box is checked when its PR merges. Every PR clears the per-package DoD above and was verified green on the fork's build-and-test CI before submission.
api/
autoware_adapi_adaptors— refactor(autoware_adapi_adaptors): extract pure helpers and add unit tests #1147autoware_default_adapi— test(autoware_default_adapi): add gtest suite for pure conversion functions #1141common/
autoware_agnocast_wrapper— test(autoware_agnocast_wrapper): add first gtest suite and extract pure validation helpers #1132autoware_geography_utils— perf(autoware_geography_utils): cache EGM2008 geoid instance across height conversions #1097autoware_interpolation— perf(autoware_interpolation): scalar spline-eval overloads remove per-knot vector allocations #1127autoware_kalman_filter— perf(autoware_kalman_filter): use Cholesky solve in update() with full guard-branch test coverage #1094autoware_lanelet2_utils— refactor(autoware_lanelet2_utils): reuse geometry helpers, fix int-narrowing, dedup offset-bound builders #1128autoware_marker_utils— perf(autoware_marker_utils): hoist arc-length recompute and bundle internal cleanups #1130autoware_motion_utils— perf(autoware_motion_utils): avoid per-call full-container copies in trajectory offset helpers #1099autoware_object_recognition_utils— refactor(autoware_object_recognition_utils): make transform.hpp testable #1129autoware_osqp_interface— test(autoware_osqp_interface): cover uncovered branches and extract status-message builder #1110autoware_point_types— test(autoware_point_types): cover memory.hpp layout helpers and mark them inline #1131autoware_qp_interface— fix(autoware_qp_interface): report real OSQP solver status and drop redundant vector copies #1100autoware_signal_processing— test(autoware_signal_processing): cover Butterworth bilinear path and extract print* string builders #1146autoware_trajectory— test(autoware_trajectory): add Pchip interpolator unit tests #1109autoware_vehicle_info_utils— test(autoware_vehicle_info_utils): cover pure paths and reuse get_or_declare_parameter #1105control/
autoware_command_gate— refactor(autoware_command_gate): extract ROS-free mode dispatch helper #1145autoware_simple_pure_pursuit— refactor(autoware_simple_pure_pursuit): extract pure-pursuit math into testable free functions #1126localization/
autoware_ekf_localizer— test(autoware_ekf_localizer): add EKFModule unit tests via non-ROS seam #1098autoware_gyro_odometer— refactor(autoware_gyro_odometer): extract pure fusion logic and fix diagnostics level #1112autoware_localization_util— refactor(autoware_localization_util): delegate util_func helpers to autoware_utils #1106autoware_ndt_scan_matcher— test(autoware_ndt_scan_matcher): unit-test covariance/oscillation math and fix no-ground hot loop #1108autoware_pose_initializer— fix(autoware_pose_initializer): reject stale GNSS poses and deduplicate trigger modules #1095autoware_stop_filter— test(autoware_stop_filter): add deterministic node integration test and dedup filter eval #1148autoware_twist2accel— refactor(autoware_twist2accel): extract pure AccelEstimator and add unit tests #1111map/
autoware_lanelet2_map_visualizer— refactor(autoware_lanelet2_map_visualizer): extract pure marker-array builder and reuse autoware_utils_visualization #1143autoware_map_height_fitter— perf(autoware_map_height_fitter): extract testable ground-height kernel and use a cached KdTree #1107autoware_map_loader— refactor(autoware_map_loader): dedup PCD cell loader and cover selected module #1139autoware_map_projection_loader— test(autoware_map_projection_loader): add gtest for load_info_from_yaml and load_map_projector_info #1140perception/
autoware_euclidean_cluster_object_detector— perf(autoware_euclidean_cluster_object_detector): eliminate hot-loop allocations in clustering #1124autoware_ground_filter— test(autoware_ground_filter): expose grid trig + index seams and add numeric tests #1125autoware_perception_objects_converter— refactor(autoware_perception_objects_converter): extract pure convert() and reuse autoware_utils_uuid #1133planning/
autoware_behavior_velocity_planner— refactor(autoware_behavior_velocity_planner): extract node-agnostic data-ingestion helpers #1114autoware_behavior_velocity_planner_common— test(autoware_behavior_velocity_planner_common): cover pure helpers and dedup formatIds #1135autoware_behavior_velocity_stop_line_module— refactor(autoware_behavior_velocity_stop_line_module): share stop-line state machine and stop-point logic #1155autoware_mission_planner— refactor(autoware_mission_planner): extract pure check_reroute_safety free function #1113autoware_motion_velocity_obstacle_stop_module— test(autoware_motion_velocity_obstacle_stop_module): unit-test stop-decision helpers and PathLengthBuffer #1117autoware_motion_velocity_planner— refactor(autoware_motion_velocity_planner): extract pure node logic into testable free functions #1136autoware_motion_velocity_planner_common— test(autoware_motion_velocity_planner_common): cover utils pure logic and CollisionChecker #1116autoware_objects_of_interest_marker_interface— test(autoware_objects_of_interest_marker_interface): add marker/coloring gtest and inject optional stamp #1144autoware_path_generator— perf(autoware_path_generator): make goal-connection closest-point fallback lazy and hoist path length #1118autoware_planning_factor_interface— test(autoware_planning_factor_interface): add gtest suite and apply move-based perf wins #1152autoware_planning_topic_converter— refactor(autoware_planning_topic_converter): extract testable PathPoint to TrajectoryPoint conversion #1134autoware_route_handler— perf(autoware_route_handler): drop duplicate routing graph build in setMap #1119autoware_velocity_smoother— test(autoware_velocity_smoother): cover trajectory_utils pure functions and dedup getTransVector3 #1115sensing/
autoware_crop_box_filter— perf(autoware_crop_box_filter): identity transform fast-path and testable param merge #1138autoware_downsample_filters— refactor(autoware_downsample_filters): dedup layout checks via autoware_point_types and add voxel filter tests #1137autoware_gnss_poser— refactor(autoware_gnss_poser): drop dead helpers, per-instance prev_position, unit-test pure statics #1154autoware_vehicle_velocity_converter— refactor(autoware_vehicle_velocity_converter): extract pure convert() and use XYZRPY_COV_IDX #1151testing/
autoware_planning_test_manager— perf(autoware_planning_test_manager): harden planning_test_manager_utils #1150autoware_pyplot— fix(autoware_pyplot): implement declared-but-undefined Axes/Text forwarders and fix move ctors #1153autoware_test_utils— test(autoware_test_utils): cover pure factory functions and parser nullopt branches #1149Related issues
autoware_path_generator#236 Refactoring Plan forautoware_path_generatorscan_ground_filter(fromautoware.universe) package #321 Improve the package quality of copiedscan_ground_filterbehavior_velocity_plannerto Core level