Fix some nits. ()

Most importantly makes mapping_2d::SparsePoseGraph::GetLatestScanTime()
private.
master
Wolfgang Hess 2017-09-28 09:21:07 +02:00 committed by Damon Kohler
parent 4fca78368d
commit 7d0e72dac2
4 changed files with 12 additions and 11 deletions

View File

@ -37,7 +37,7 @@ using Levels = std::map<int, int>;
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 {

View File

@ -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(

View File

@ -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<

View File

@ -99,9 +99,6 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
std::vector<std::vector<mapping::TrajectoryNode>> GetTrajectoryNodes()
override EXCLUDES(mutex_);
std::vector<Constraint> 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_;