Fix some nits. (#536)
Most importantly makes mapping_2d::SparsePoseGraph::GetLatestScanTime() private.master
parent
4fca78368d
commit
7d0e72dac2
|
@ -37,7 +37,7 @@ using Levels = std::map<int, int>;
|
||||||
|
|
||||||
constexpr double kMaxShortSpanLengthMeters = 25.;
|
constexpr double kMaxShortSpanLengthMeters = 25.;
|
||||||
constexpr double kLevelHeightMeters = 2.5;
|
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'.
|
// Indices into 'trajectory.node', so that 'start_index' <= i < 'end_index'.
|
||||||
struct Span {
|
struct Span {
|
||||||
|
|
|
@ -187,7 +187,7 @@ TEST(FastCorrelativeScanMatcherTest, FullSubmapMatching) {
|
||||||
unperturbed_point_cloud.emplace_back(0.f, 0.5f, 0.f);
|
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(0.25f, 1.6f, 0.f);
|
||||||
unperturbed_point_cloud.emplace_back(2.5f, 0.5f, 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) {
|
for (int i = 0; i != 20; ++i) {
|
||||||
const transform::Rigid2f perturbation(
|
const transform::Rigid2f perturbation(
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace scan_matching {
|
||||||
//
|
//
|
||||||
// Returns true in the case of successful localization. The output parameters
|
// Returns true in the case of successful localization. The output parameters
|
||||||
// should not be trusted if the function returns false. The 'cutoff' and
|
// 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(
|
bool PerformGlobalLocalization(
|
||||||
float cutoff, const cartographer::sensor::AdaptiveVoxelFilter& voxel_filter,
|
float cutoff, const cartographer::sensor::AdaptiveVoxelFilter& voxel_filter,
|
||||||
const std::vector<
|
const std::vector<
|
||||||
|
|
|
@ -99,9 +99,6 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
std::vector<std::vector<mapping::TrajectoryNode>> GetTrajectoryNodes()
|
std::vector<std::vector<mapping::TrajectoryNode>> GetTrajectoryNodes()
|
||||||
override EXCLUDES(mutex_);
|
override EXCLUDES(mutex_);
|
||||||
std::vector<Constraint> constraints() 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:
|
private:
|
||||||
// The current state of the submap in the background threads. When this
|
// 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.
|
// optimization being run at a time.
|
||||||
void RunOptimization() EXCLUDES(mutex_);
|
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
|
// Computes the local to global frame transform based on the given optimized
|
||||||
// 'submap_transforms'.
|
// 'submap_transforms'.
|
||||||
transform::Rigid3d ComputeLocalToGlobalTransform(
|
transform::Rigid3d ComputeLocalToGlobalTransform(
|
||||||
|
@ -171,6 +163,15 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
mapping::SparsePoseGraph::SubmapData GetSubmapDataUnderLock(
|
mapping::SparsePoseGraph::SubmapData GetSubmapDataUnderLock(
|
||||||
const mapping::SubmapId& submap_id) REQUIRES(mutex_);
|
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_;
|
const mapping::proto::SparsePoseGraphOptions options_;
|
||||||
common::Mutex mutex_;
|
common::Mutex mutex_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue