Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
jazzy

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro lyrical showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_ndt_scan_matcher_common package from autoware_core repo

autoware_adapi_adaptors autoware_adapi_specs autoware_core_api autoware_default_adapi autoware_core autoware_agnocast_wrapper autoware_component_interface_admission autoware_component_interface_specs autoware_component_interface_utils autoware_geography_utils autoware_global_parameter_loader autoware_interface_spec_lint autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_map_height_fitter autoware_marker_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qos_utils autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_command_gate autoware_core_control autoware_simple_pure_pursuit autoware_awsim_sensor_kit_description autoware_sample_sensor_kit_description autoware_sample_vehicle_description autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_ndt_scan_matcher_common autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_test_manager autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

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-11-27
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

The NDT backend interface of autoware_ndt_scan_matcher

Maintainers

  • Yamato Ando
  • Masahiro Sakamoto
  • NGUYEN Viet Anh
  • Taiki Yamada

Authors

  • Mete Fatih Cırıt

autoware_ndt_scan_matcher_common

Purpose

This package holds the interface between autoware_ndt_scan_matcher and its NDT backends. An NDT backend is an implementation of NDT scan matching that the node loads with pluginlib. This package has headers only.

A backend package depends on this package, not on the node and its ROS dependencies.

The interface package holds NdtBackend, NdtParams, NdtResult and an ABI guard. The node calls the interface, and backend packages implement it.

Contents

  • autoware::ndt_scan_matcher::NdtBackend in autoware/ndt_scan_matcher_common/ndt_backend.hpp: the interface of a backend. Its comments state the rules for a backend: instances, threads, the order of calls, exceptions, copies and the lifetime of the library.
  • autoware::ndt_scan_matcher::NdtParams and autoware::ndt_scan_matcher::NdtResult in autoware/ndt_scan_matcher_common/ndt_types.hpp: the parameters and the result of an alignment. The comments of NdtResult state how the node uses each field and how a backend must compute the scores.

How the node uses a backend

The node has two instances of the backend: the active instance, and the instance that the map update thread builds. It calls them in three places:

  1. At startup, pluginlib makes the backend with the name in ndt.backend, and the node calls initialize().
  2. The map update thread changes the map of the second instance with add_target(), remove_target() and commit_target(). Then the node swaps the two instances under a short lock.
  3. The scan callback calls align() on the active instance for each scan. The node compares the scores of the NdtResult with its thresholds and accepts or rejects the pose.

At startup, pluginlib makes the backend and the node calls initialize(). The map update thread fills an instance and the node swaps the instances. The scan callback calls align() on the active instance.

The comments in ndt_backend.hpp state the exact rules for each of these calls.

Add a backend

Add a backend in four steps: depend, implement, build and register. Then the node loads the backend when ndt.backend has its name.

A backend package does these steps:

  1. Depend on autoware_ndt_scan_matcher_common and pluginlib in package.xml.
  2. Implement autoware::ndt_scan_matcher::NdtBackend, and export the class with PLUGINLIB_EXPORT_CLASS.
  3. Build the class into a library with add_library(), link the targets of autoware_ndt_scan_matcher_common and pluginlib with target_link_libraries(), and install the library. Do not use ament_auto_add_library(): ament_auto exports the library and links it into the packages that depend on the backend package. pluginlib loads the library at runtime, so no other library may link it. The target of autoware_ndt_scan_matcher_common gives only the common component of PCL. A backend that uses another component of PCL, for example kdtree, finds and links that component itself.
  4. Register the class with pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common <file>.xml).

CMakeLists.txt:

cmake_minimum_required(VERSION 3.14)
project(my_package)

find_package(ament_cmake REQUIRED)
find_package(autoware_ndt_scan_matcher_common REQUIRED)
find_package(pluginlib REQUIRED)

add_library(my_ndt_backend SHARED src/my_ndt_backend.cpp)
target_link_libraries(my_ndt_backend
  ${autoware_ndt_scan_matcher_common_TARGETS} ${pluginlib_TARGETS})
install(TARGETS my_ndt_backend LIBRARY DESTINATION lib)
pluginlib_export_plugin_description_file(autoware_ndt_scan_matcher_common plugins.xml)

ament_package()

plugins.xml:

<library path="my_ndt_backend">
  <class name="my" type="my_package::MyNdtBackend" base_class_type="autoware::ndt_scan_matcher::NdtBackend">
    <description>My NDT backend.</description>
  </class>
</library>

path is the name of the library. type is the class that PLUGINLIB_EXPORT_CLASS exports. name is the value of ndt.backend that selects the backend. Use a short, lowercase name that tells the implementation, for example ndt_omp or ndt_cuda. A name must be unique among all installed backends, so do not use only the name of a technology that other implementations can also use, for example cuda.

Compile options

NdtResult holds fixed-size Eigen types, which pass between the node and the backend library. Their memory layout depends on the static alignment of Eigen, which depends on the SIMD options of the compiler: AVX changes it, and SSE does not. The node also frees vectors that the backend allocated with the allocator of Eigen. Some options change this allocator, for example AVX or the address sanitizer of GCC.

The types and the interface are in an inline namespace whose name holds the version of the interface, the Eigen alignment (EIGEN_MAX_STATIC_ALIGN_BYTES) and the Eigen allocator. A backend that was built against another version of the interface, or with an alignment or an allocator that differs from the node, has other C++ symbols. Then the node loads its library but finds no factory for the backend, and it stops with an error message that names this cause. Rebuild the backend against the same version of Autoware Core, and do not enable AVX or a sanitizer in only one of the two. The name does not hold the version of Eigen or of PCL, so the node and the backend must also use the same Eigen and the same PCL. NdtBackend passes pcl::PointCloud between them.

When a declaration in ndt_types.hpp or ndt_backend.hpp changes, change the version v1 in the name of the inline namespace.

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_ndt_scan_matcher_common at Robotics Stack Exchange