From 3215035c1cdf881e3b105872a9e1ad053981a890 Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Thu, 31 Aug 2017 12:26:31 +0200 Subject: [PATCH] Add thread annotation to LogResidualHistograms(). (#492) --- cartographer/mapping_2d/local_trajectory_builder.cc | 4 ++-- cartographer/mapping_3d/sparse_pose_graph.cc | 3 +-- cartographer/mapping_3d/sparse_pose_graph.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cartographer/mapping_2d/local_trajectory_builder.cc b/cartographer/mapping_2d/local_trajectory_builder.cc index f8b8136..248e4a9 100644 --- a/cartographer/mapping_2d/local_trajectory_builder.cc +++ b/cartographer/mapping_2d/local_trajectory_builder.cc @@ -82,8 +82,8 @@ void LocalTrajectoryBuilder::ScanMatch( } std::unique_ptr -LocalTrajectoryBuilder::AddRangeData( - const common::Time time, const sensor::RangeData& range_data) { +LocalTrajectoryBuilder::AddRangeData(const common::Time time, + const sensor::RangeData& range_data) { // Initialize extrapolator now if we do not ever use an IMU. if (!options_.use_imu_data()) { InitializeExtrapolator(time); diff --git a/cartographer/mapping_3d/sparse_pose_graph.cc b/cartographer/mapping_3d/sparse_pose_graph.cc index 37da179..5f07d81 100644 --- a/cartographer/mapping_3d/sparse_pose_graph.cc +++ b/cartographer/mapping_3d/sparse_pose_graph.cc @@ -151,8 +151,7 @@ void SparsePoseGraph::AddImuData(const int trajectory_id, } void SparsePoseGraph::AddOdometerData( - int trajectory_id, - const sensor::OdometryData& odometry_data) { + const int trajectory_id, const sensor::OdometryData& odometry_data) { // TODO(cschuet): Add support for handling OdometryData in the optimization // problem. } diff --git a/cartographer/mapping_3d/sparse_pose_graph.h b/cartographer/mapping_3d/sparse_pose_graph.h index 0d3b2d1..a128c8f 100644 --- a/cartographer/mapping_3d/sparse_pose_graph.h +++ b/cartographer/mapping_3d/sparse_pose_graph.h @@ -166,7 +166,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph { // Logs histograms for the translational and rotational residual of scan // poses. - void LogResidualHistograms(); + void LogResidualHistograms() REQUIRES(mutex_); const mapping::proto::SparsePoseGraphOptions options_; common::Mutex mutex_;