diff --git a/cartographer/mapping/detect_floors.cc b/cartographer/mapping/detect_floors.cc index 87fa1ea..ad402ac 100644 --- a/cartographer/mapping/detect_floors.cc +++ b/cartographer/mapping/detect_floors.cc @@ -37,7 +37,7 @@ using Levels = std::map; constexpr double kMaxShortSpanLengthMeters = 25.; constexpr double kLevelHeightMeters = 2.5; -constexpr double kMinLevelSeparationMeters = 1.0; +constexpr double kMinLevelSeparationMeters = 1.; // Indices into 'trajectory.node', so that 'start_index' <= i < 'end_index'. struct Span { diff --git a/cartographer/mapping_2d/scan_matching/fast_correlative_scan_matcher_test.cc b/cartographer/mapping_2d/scan_matching/fast_correlative_scan_matcher_test.cc index f774a29..d04d447 100644 --- a/cartographer/mapping_2d/scan_matching/fast_correlative_scan_matcher_test.cc +++ b/cartographer/mapping_2d/scan_matching/fast_correlative_scan_matcher_test.cc @@ -187,7 +187,7 @@ TEST(FastCorrelativeScanMatcherTest, FullSubmapMatching) { unperturbed_point_cloud.emplace_back(0.f, 0.5f, 0.f); unperturbed_point_cloud.emplace_back(0.25f, 1.6f, 0.f); unperturbed_point_cloud.emplace_back(2.5f, 0.5f, 0.f); - unperturbed_point_cloud.emplace_back(2.0f, 1.8f, 0.f); + unperturbed_point_cloud.emplace_back(2.f, 1.8f, 0.f); for (int i = 0; i != 20; ++i) { const transform::Rigid2f perturbation( diff --git a/cartographer/mapping_2d/scan_matching/fast_global_localizer.h b/cartographer/mapping_2d/scan_matching/fast_global_localizer.h index c9544d9..6fec202 100644 --- a/cartographer/mapping_2d/scan_matching/fast_global_localizer.h +++ b/cartographer/mapping_2d/scan_matching/fast_global_localizer.h @@ -35,7 +35,7 @@ namespace scan_matching { // // Returns true in the case of successful localization. The output parameters // should not be trusted if the function returns false. The 'cutoff' and -// 'best_score' are in the range [0.0, 1.0]. +// 'best_score' are in the range [0., 1.]. bool PerformGlobalLocalization( float cutoff, const cartographer::sensor::AdaptiveVoxelFilter& voxel_filter, const std::vector< diff --git a/cartographer/mapping_2d/sparse_pose_graph.h b/cartographer/mapping_2d/sparse_pose_graph.h index 1060742..965cb60 100644 --- a/cartographer/mapping_2d/sparse_pose_graph.h +++ b/cartographer/mapping_2d/sparse_pose_graph.h @@ -99,9 +99,6 @@ class SparsePoseGraph : public mapping::SparsePoseGraph { std::vector> GetTrajectoryNodes() override EXCLUDES(mutex_); std::vector constraints() override EXCLUDES(mutex_); - common::Time GetLatestScanTime(const mapping::NodeId& node_id, - const mapping::SubmapId& submap_id) const - REQUIRES(mutex_); private: // The current state of the submap in the background threads. When this @@ -156,11 +153,6 @@ class SparsePoseGraph : public mapping::SparsePoseGraph { // optimization being run at a time. void RunOptimization() EXCLUDES(mutex_); - // Updates the trajectory connectivity structure with the new constraints. - void UpdateTrajectoryConnectivity( - const sparse_pose_graph::ConstraintBuilder::Result& result) - REQUIRES(mutex_); - // Computes the local to global frame transform based on the given optimized // 'submap_transforms'. transform::Rigid3d ComputeLocalToGlobalTransform( @@ -171,6 +163,15 @@ class SparsePoseGraph : public mapping::SparsePoseGraph { mapping::SparsePoseGraph::SubmapData GetSubmapDataUnderLock( const mapping::SubmapId& submap_id) REQUIRES(mutex_); + common::Time GetLatestScanTime(const mapping::NodeId& node_id, + const mapping::SubmapId& submap_id) const + REQUIRES(mutex_); + + // Updates the trajectory connectivity structure with the new constraints. + void UpdateTrajectoryConnectivity( + const sparse_pose_graph::ConstraintBuilder::Result& result) + REQUIRES(mutex_); + const mapping::proto::SparsePoseGraphOptions options_; common::Mutex mutex_;