parent
1a9b18db69
commit
32583e0c5d
|
@ -128,8 +128,8 @@ void SparsePoseGraph::AddScan(
|
|||
: nullptr;
|
||||
|
||||
// Make sure we have a sampler for this trajectory.
|
||||
if (!global_localization_samplers_[trajectory]) {
|
||||
global_localization_samplers_[trajectory] =
|
||||
if (!global_localization_samplers_[trajectory_id]) {
|
||||
global_localization_samplers_[trajectory_id] =
|
||||
common::make_unique<common::FixedRatioSampler>(
|
||||
options_.global_sampling_ratio());
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void SparsePoseGraph::ComputeConstraint(const int scan_index,
|
|||
|
||||
// Only globally match against submaps not in this trajectory.
|
||||
if (scan_trajectory_id != submap_trajectory_id &&
|
||||
global_localization_samplers_[scan_trajectory]->Pulse()) {
|
||||
global_localization_samplers_[scan_trajectory_id]->Pulse()) {
|
||||
constraint_builder_.MaybeAddGlobalConstraint(
|
||||
submap_id, submap_states_[submap_index].submap, scan_index,
|
||||
scan_trajectory_id, &trajectory_connectivity_,
|
||||
|
|
|
@ -179,8 +179,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
|||
mapping::TrajectoryConnectivity trajectory_connectivity_ GUARDED_BY(mutex_);
|
||||
|
||||
// We globally localize a fraction of the scans from each trajectory.
|
||||
std::unordered_map<const mapping::Submaps*,
|
||||
std::unique_ptr<common::FixedRatioSampler>>
|
||||
std::unordered_map<int, std::unique_ptr<common::FixedRatioSampler>>
|
||||
global_localization_samplers_ GUARDED_BY(mutex_);
|
||||
|
||||
// Number of scans added since last loop closure.
|
||||
|
|
|
@ -123,8 +123,8 @@ void SparsePoseGraph::AddScan(
|
|||
insertion_submaps.front()->finished ? insertion_submaps.front() : nullptr;
|
||||
|
||||
// Make sure we have a sampler for this trajectory.
|
||||
if (!global_localization_samplers_[trajectory]) {
|
||||
global_localization_samplers_[trajectory] =
|
||||
if (!global_localization_samplers_[trajectory_id]) {
|
||||
global_localization_samplers_[trajectory_id] =
|
||||
common::make_unique<common::FixedRatioSampler>(
|
||||
options_.global_sampling_ratio());
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void SparsePoseGraph::ComputeConstraint(const int scan_index,
|
|||
|
||||
// Only globally match against submaps not in this trajectory.
|
||||
if (scan_trajectory_id != submap_trajectory_id &&
|
||||
global_localization_samplers_[scan_trajectory]->Pulse()) {
|
||||
global_localization_samplers_[scan_trajectory_id]->Pulse()) {
|
||||
constraint_builder_.MaybeAddGlobalConstraint(
|
||||
submap_id, submap_states_[submap_index].submap, scan_index,
|
||||
scan_trajectory_id, &trajectory_connectivity_, trajectory_nodes_);
|
||||
|
|
|
@ -179,8 +179,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
|||
mapping::TrajectoryConnectivity trajectory_connectivity_ GUARDED_BY(mutex_);
|
||||
|
||||
// We globally localize a fraction of the scans from each trajectory.
|
||||
std::unordered_map<const mapping::Submaps*,
|
||||
std::unique_ptr<common::FixedRatioSampler>>
|
||||
std::unordered_map<int, std::unique_ptr<common::FixedRatioSampler>>
|
||||
global_localization_samplers_ GUARDED_BY(mutex_);
|
||||
|
||||
// Number of scans added since last loop closure.
|
||||
|
|
Loading…
Reference in New Issue