Use area instead of cells count for overlapping trimmer options. (#1080)
parent
26e8ce63ba
commit
23f6de46b0
|
@ -127,7 +127,10 @@ int MapBuilder::AddTrajectoryBuilder(
|
|||
trajectory_options.overlapping_submaps_trimmer_2d();
|
||||
pose_graph_->AddTrimmer(common::make_unique<OverlappingSubmapsTrimmer2D>(
|
||||
trimmer_options.fresh_submaps_count(),
|
||||
trimmer_options.min_covered_cells_count()));
|
||||
trimmer_options.min_covered_area() /
|
||||
common::Pow2(trajectory_options.trajectory_builder_2d_options()
|
||||
.submaps_options()
|
||||
.resolution())));
|
||||
}
|
||||
}
|
||||
if (trajectory_options.pure_localization()) {
|
||||
|
|
|
@ -34,7 +34,7 @@ message TrajectoryBuilderOptions {
|
|||
|
||||
message OverlappingSubmapsTrimmerOptions2D {
|
||||
int32 fresh_submaps_count = 1;
|
||||
int32 min_covered_cells_count = 2;
|
||||
double min_covered_area = 2;
|
||||
}
|
||||
OverlappingSubmapsTrimmerOptions2D overlapping_submaps_trimmer_2d = 5;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ void PopulateOverlappingSubmapsTrimmerOptions2D(
|
|||
trajectory_builder_options->mutable_overlapping_submaps_trimmer_2d();
|
||||
options->set_fresh_submaps_count(
|
||||
options_dictionary->GetInt("fresh_submaps_count"));
|
||||
options->set_min_covered_cells_count(
|
||||
options_dictionary->GetInt("min_covered_cells_count"));
|
||||
options->set_min_covered_area(
|
||||
options_dictionary->GetDouble("min_covered_area"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in New Issue