diff --git a/localization/ndt_scan_matcher/src/map_update_module.cpp b/localization/ndt_scan_matcher/src/map_update_module.cpp index 3e5b6ca3b58c6..31d1c6588165f 100644 --- a/localization/ndt_scan_matcher/src/map_update_module.cpp +++ b/localization/ndt_scan_matcher/src/map_update_module.cpp @@ -153,16 +153,15 @@ bool MapUpdateModule::update_ndt(const geometry_msgs::msg::Point & position, Ndt const auto exe_start_time = std::chrono::system_clock::now(); // Perform heavy processing outside of the lock scope - + // Add pcd - for (auto& map : maps_to_add) - { + for (auto & map : maps_to_add) { auto cloud = pcl::make_shared>(); - + pcl::fromROSMsg(map.pointcloud, *cloud); ndt.addTarget(cloud, map.cell_id); } - + // Remove pcd for (const std::string & map_id_to_remove : map_ids_to_remove) { ndt.removeTarget(map_id_to_remove);