Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]
Messages
Services
Plugins
Recent questions tagged autoware_ndt_scan_matcher at Robotics Stack Exchange
Package Summary
| Version | 1.10.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Yamato Ando
- Masahiro Sakamoto
- NGUYEN Viet Anh
- Taiki Yamada
Authors
- Yamato Ando
autoware_ndt_scan_matcher
Purpose
autoware_ndt_scan_matcher is a package for position estimation using the NDT scan matching method.
There are two main functions in this package:
- estimate position by scan matching
- estimate initial position via the ROS service using the Monte Carlo method
One optional function is regularization. Please see the regularization chapter in the back for details. It is disabled by default.
Inputs / Outputs
Input
| Name | Type | Description |
|---|---|---|
ekf_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
initial pose |
points_raw |
sensor_msgs::msg::PointCloud2 |
sensor pointcloud |
sensing/gnss/pose_with_covariance |
sensor_msgs::msg::PoseWithCovarianceStamped |
base position for regularization term |
sensing/gnss/pose_with_covarianceis required only when regularization is enabled.
Output
| Name | Type | Description |
|---|---|---|
ndt_pose |
geometry_msgs::msg::PoseStamped |
estimated pose |
ndt_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
estimated pose with covariance |
/diagnostics |
diagnostic_msgs::msg::DiagnosticArray |
diagnostics |
points_aligned |
sensor_msgs::msg::PointCloud2 |
[debug topic] pointcloud aligned by scan matching |
points_aligned_no_ground |
sensor_msgs::msg::PointCloud2 |
[debug topic] no ground pointcloud aligned by scan matching |
initial_pose_with_covariance |
geometry_msgs::msg::PoseWithCovarianceStamped |
[debug topic] initial pose used in scan matching |
multi_ndt_pose |
geometry_msgs::msg::PoseArray |
[debug topic] estimated poses from multiple initial poses in real-time covariance estimation |
multi_initial_pose |
geometry_msgs::msg::PoseArray |
[debug topic] initial poses for real-time covariance estimation |
exe_time_ms |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] execution time for scan matching [ms] |
transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching |
no_ground_transform_probability |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] score of scan matching based on no ground LiDAR scan |
iteration_num |
autoware_internal_debug_msgs::msg::Int32Stamped |
[debug topic] number of scan matching iterations |
initial_to_result_relative_pose |
geometry_msgs::msg::PoseStamped |
[debug topic] relative pose between the initial point and the convergence point |
initial_to_result_distance |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the initial point and the convergence point [m] |
initial_to_result_distance_old |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the older of the two initial points used in linear interpolation and the convergence point [m] |
initial_to_result_distance_new |
autoware_internal_debug_msgs::msg::Float32Stamped |
[debug topic] distance difference between the newer of the two initial points used in linear interpolation and the convergence point [m] |
ndt_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] markers for debugging |
monte_carlo_initial_pose_marker |
visualization_msgs::msg::MarkerArray |
[debug topic] particles used in initial position estimation |
Service
| Name | Type | Description |
|---|---|---|
ndt_align_srv |
autoware_internal_localization_msgs::srv::PoseWithCovarianceStamped |
service to estimate initial pose |
Parameters
Core Parameters
Frame
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/frame.json”) }}
Sensor Points
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/sensor_points.json”) }}
Ndt
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/ndt.json”) }}
Initial Pose Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/initial_pose_estimation.json”) }}
Validation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/validation.json”) }}
Score Estimation
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/score_estimation.json”) }}
Covariance
{{ json_to_markdown(“localization/autoware_ndt_scan_matcher/schema/sub/covariance.json”) }}
Regularization
Abstract
This is a function that adds the regularization term to the NDT optimization problem as follows.
$$ \begin{align} \min_{\mathbf{R},\mathbf{t}} \mathrm{NDT}(\mathbf{R},\mathbf{t}) +\mathrm{scale\ factor}\cdot \left| \mathbf{R}^\top (\mathbf{t_{base}-\mathbf{t}}) \cdot
File truncated at 100 lines see the full file
Changelog for package autoware_ndt_scan_matcher
1.10.0 (2026-09-28)
-
Merge remote-tracking branch 'origin/main' into tmp/bot/bump_version_base
-
feat([ndt_scan_matcher]{.title-ref}): add tests for scan path, based on the \@takam5f2's branch (#1446)
- add: tests for scan path, based on the following \@takam5f2's branch
- https://github.com/takam5f2/autoware_core/blob/5268228fadf9d74804178f8d698172a11364314b/localization/autoware_ndt_scan_matcher/test/test_ndt_scan_matcher_characteristics.cpp
- fix: wordy comments
- cosmetic bug: fix wrong comment
- bug: fix wrong dependency
- fix: simplify comments
- fix: error log and comment, applying the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1446#discussion_r4043894171
* style(pre-commit): autofix ---------Co-authored-by: Tran Huu Nhat Huy <<29034232+TranHuuNhatHuy@users.noreply.github.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
feat(ndt_scan_matcher): apply [agnocast_wrapper::Node]{.title-ref} to [ndt_scan_matcher]{.title-ref} (#1215)
- apply agnocast_wrapper::Node
- style(pre-commit): autofix
- fix tests and source
- style(pre-commit): autofix
- use wrapper tf2 and ok()
- delete unnecessary comments and avoid ALLOCATE
- fix
- fix(ndt_scan_matcher): add missing <utility> include for std::move
- fix(ndt_scan_matcher): remove includes made redundant by the agnocast wrapper
- fix(ndt_scan_matcher): take the client response directly
- fix(ndt_scan_matcher): drop the duplicate <utility> include
* test(ndt_scan_matcher): add the node to the executor through its base interface ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kobayu858 <<yutaro.kobayashi.2@tier4.jp>>
-
test(autoware_ndt_scan_matcher): add characterization harness and sensor-gate tests (#1348) Add a harness that drives NDTScanMatcher deterministically (diagnostics correlation, TF readiness, a differential stub map loader) and twelve cases that pin the sensor-points gates and the initial-pose subscriber ahead of extracting the hot path into a ROS-free core. Node-level tests move to ament_add_ros_isolated_gtest with their test dependencies declared. No production code changes. Co-authored-by: Junya Sasaki <<j2sasaki1990@gmail.com>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
refactor([ndt_scan_matcher]{.title-ref}): make map update module ROS-node free (#1322)
- refactor: make map update module ROS-node free
* Move the pcd loader client, debug publisher, and [loaded_map_]{.title-ref} to the node; inject the service call (PcdLoaderFunction) and diagnostics (DiagnosticsHandlingFunction).
- style(pre-commit): autofix
- fix: by [pre-commit]{.title-ref}
- style(pre-commit): autofix
- cosmetic: fix noisy-long comments
- refactor: avoid doing hard diag task via callback
- Apply the following review comment
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- refactor: simplify [loaded_pcd_map]{.title-ref} publish logic
- Apply the following review comment:
- https://github.com/autowarefoundation/autoware_core/pull/1322#pullrequestreview-4852039689
- style(pre-commit): autofix
- sorry: forgot applying [pre-commit]{.title-ref}
- style(pre-commit): autofix
- bug: fix infinitely growing map, this is caused by my stupid mis-refactoring
- refactor: move minor diagnostics handling into ROS-node
- style(pre-commit): autofix
- refactor([autoware_ndt_scan_matcher]{.title-ref}): simplify map update state handling
- Extract distance_from_last_update() to remove the duplicated distance calculation
- Drop the BuilderState struct and its need_rebuild flag by deriving the rebuild decision from out_of_map_range(position).
* A failed rebuild no longer advances [last_update_position_]{.title-ref}, so it retries next tick. Co-Authored-By: Claude Opus 4.8 <<noreply@anthropic.com>>
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| autoware_core_localization |
Launch files
- launch/ndt_scan_matcher.launch.xml
-
- param_file [default: $(find-pkg-share autoware_ndt_scan_matcher)/config/ndt_scan_matcher.param.yaml]
- input_pointcloud [default: points_raw]
- input_initial_pose_topic [default: ekf_pose_with_covariance]
- input_regularization_pose_topic [default: regularization_pose_with_covariance]
- input_service_trigger_node [default: trigger_node]
- output_pose_topic [default: ndt_pose]
- output_pose_with_covariance_topic [default: ndt_pose_with_covariance]
- client_map_loader [default: pcd_loader_service]
- node_name [default: ndt_scan_matcher]