diff --git a/cartographer_ros/cartographer_ros/rosbag_validate_main.cc b/cartographer_ros/cartographer_ros/rosbag_validate_main.cc index 572dcb6..91c4f34 100644 --- a/cartographer_ros/cartographer_ros/rosbag_validate_main.cc +++ b/cartographer_ros/cartographer_ros/rosbag_validate_main.cc @@ -173,8 +173,9 @@ class RangeDataChecker { template RangeChecksum ComputeRangeChecksum(const MessageType& message) { + auto point_cloud_with_intensities = ToPointCloudWithIntensities(message); const cartographer::sensor::TimedPointCloud& point_cloud = - std::get<0>(ToPointCloudWithIntensities(message)).points; + std::get<0>(point_cloud_with_intensities).points; Eigen::Vector4f points_sum = Eigen::Vector4f::Zero(); for (const auto& point : point_cloud) { points_sum += point;