diff --git a/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp b/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp index 697a9e5efed30..5d06c0bc1dbc7 100644 --- a/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp +++ b/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp @@ -1033,7 +1033,7 @@ geometry_msgs::msg::PoseWithCovarianceStamped NDTScanMatcher::align_pose( base_rpy.x, // angle_x base_rpy.y // angle_y }; - std::vector sample_stddev{stddev_x, stddev_y, stddev_z, stddev_roll, stddev_pitch}; + const std::vector sample_stddev{stddev_x, stddev_y, stddev_z, stddev_roll, stddev_pitch}; // Optimizing (x, y, z, roll, pitch, yaw) 6 dimensions. TreeStructuredParzenEstimator tpe(