Remove the 'also_match_to_new_submaps' option. (#29)
Instead, using a different constraint_builder.sampling_ratio is preferred.master
parent
092b020c15
commit
d2962c004f
|
@ -24,9 +24,6 @@ message SparsePoseGraphOptions {
|
||||||
// is built.
|
// is built.
|
||||||
optional int32 optimize_every_n_scans = 1;
|
optional int32 optimize_every_n_scans = 1;
|
||||||
|
|
||||||
// If true, constraints between old scans and new submaps will be computed.
|
|
||||||
optional bool also_match_to_new_submaps = 2;
|
|
||||||
|
|
||||||
// Options for the constraint builder.
|
// Options for the constraint builder.
|
||||||
optional mapping.sparse_pose_graph.proto.ConstraintBuilderOptions
|
optional mapping.sparse_pose_graph.proto.ConstraintBuilderOptions
|
||||||
constraint_builder_options = 3;
|
constraint_builder_options = 3;
|
||||||
|
|
|
@ -45,8 +45,6 @@ proto::SparsePoseGraphOptions CreateSparsePoseGraphOptions(
|
||||||
proto::SparsePoseGraphOptions options;
|
proto::SparsePoseGraphOptions options;
|
||||||
options.set_optimize_every_n_scans(
|
options.set_optimize_every_n_scans(
|
||||||
parameter_dictionary->GetInt("optimize_every_n_scans"));
|
parameter_dictionary->GetInt("optimize_every_n_scans"));
|
||||||
options.set_also_match_to_new_submaps(
|
|
||||||
parameter_dictionary->GetBool("also_match_to_new_submaps"));
|
|
||||||
*options.mutable_constraint_builder_options() =
|
*options.mutable_constraint_builder_options() =
|
||||||
sparse_pose_graph::CreateConstraintBuilderOptions(
|
sparse_pose_graph::CreateConstraintBuilderOptions(
|
||||||
parameter_dictionary->GetDictionary("constraint_builder").get());
|
parameter_dictionary->GetDictionary("constraint_builder").get());
|
||||||
|
|
|
@ -226,11 +226,9 @@ void SparsePoseGraph::ComputeConstraintsForScan(
|
||||||
const int finished_submap_index = GetSubmapIndex(finished_submap);
|
const int finished_submap_index = GetSubmapIndex(finished_submap);
|
||||||
SubmapState& finished_submap_state = submap_states_[finished_submap_index];
|
SubmapState& finished_submap_state = submap_states_[finished_submap_index];
|
||||||
CHECK(!finished_submap_state.finished);
|
CHECK(!finished_submap_state.finished);
|
||||||
if (options_.also_match_to_new_submaps()) {
|
|
||||||
// We have a new completed submap, so we look into adding constraints for
|
// We have a new completed submap, so we look into adding constraints for
|
||||||
// old scans.
|
// old scans.
|
||||||
ComputeConstraintsForOldScans(finished_submap);
|
ComputeConstraintsForOldScans(finished_submap);
|
||||||
}
|
|
||||||
finished_submap_state.finished = true;
|
finished_submap_state.finished = true;
|
||||||
}
|
}
|
||||||
constraint_builder_.NotifyEndOfScan(scan_index);
|
constraint_builder_.NotifyEndOfScan(scan_index);
|
||||||
|
|
|
@ -68,7 +68,6 @@ class SparsePoseGraphTest : public ::testing::Test {
|
||||||
auto parameter_dictionary = common::MakeDictionary(R"text(
|
auto parameter_dictionary = common::MakeDictionary(R"text(
|
||||||
return {
|
return {
|
||||||
optimize_every_n_scans = 1000,
|
optimize_every_n_scans = 1000,
|
||||||
also_match_to_new_submaps = true,
|
|
||||||
constraint_builder = {
|
constraint_builder = {
|
||||||
sampling_ratio = 1.,
|
sampling_ratio = 1.,
|
||||||
max_constraint_distance = 6.,
|
max_constraint_distance = 6.,
|
||||||
|
|
|
@ -234,11 +234,9 @@ void SparsePoseGraph::ComputeConstraintsForScan(
|
||||||
const int finished_submap_index = GetSubmapIndex(finished_submap);
|
const int finished_submap_index = GetSubmapIndex(finished_submap);
|
||||||
SubmapState& finished_submap_state = submap_states_[finished_submap_index];
|
SubmapState& finished_submap_state = submap_states_[finished_submap_index];
|
||||||
CHECK(!finished_submap_state.finished);
|
CHECK(!finished_submap_state.finished);
|
||||||
if (options_.also_match_to_new_submaps()) {
|
|
||||||
// We have a new completed submap, so we look into adding constraints for
|
// We have a new completed submap, so we look into adding constraints for
|
||||||
// old scans.
|
// old scans.
|
||||||
ComputeConstraintsForOldScans(finished_submap);
|
ComputeConstraintsForOldScans(finished_submap);
|
||||||
}
|
|
||||||
finished_submap_state.finished = true;
|
finished_submap_state.finished = true;
|
||||||
}
|
}
|
||||||
constraint_builder_.NotifyEndOfScan(scan_index);
|
constraint_builder_.NotifyEndOfScan(scan_index);
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
SPARSE_POSE_GRAPH = {
|
SPARSE_POSE_GRAPH = {
|
||||||
optimize_every_n_scans = 90,
|
optimize_every_n_scans = 90,
|
||||||
also_match_to_new_submaps = true,
|
|
||||||
constraint_builder = {
|
constraint_builder = {
|
||||||
sampling_ratio = 0.3,
|
sampling_ratio = 0.3,
|
||||||
max_constraint_distance = 15.,
|
max_constraint_distance = 15.,
|
||||||
|
|
Loading…
Reference in New Issue