Make SPG::AddScan return the inserted node id. (#617)
parent
e10650910e
commit
c57641f917
|
@ -93,7 +93,7 @@ std::vector<mapping::SubmapId> SparsePoseGraph::GrowSubmapTransformsAsNeeded(
|
||||||
return {front_submap_id, last_submap_id};
|
return {front_submap_id, last_submap_id};
|
||||||
}
|
}
|
||||||
|
|
||||||
void SparsePoseGraph::AddScan(
|
mapping::NodeId SparsePoseGraph::AddScan(
|
||||||
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
||||||
const int trajectory_id,
|
const int trajectory_id,
|
||||||
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps) {
|
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps) {
|
||||||
|
@ -124,6 +124,7 @@ void SparsePoseGraph::AddScan(
|
||||||
ComputeConstraintsForScan(node_id, insertion_submaps,
|
ComputeConstraintsForScan(node_id, insertion_submaps,
|
||||||
newly_finished_submap);
|
newly_finished_submap);
|
||||||
});
|
});
|
||||||
|
return node_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SparsePoseGraph::AddWorkItem(const std::function<void()>& work_item) {
|
void SparsePoseGraph::AddWorkItem(const std::function<void()>& work_item) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
// 'insertion_submaps.front()' and the scan was inserted into the
|
// 'insertion_submaps.front()' and the scan was inserted into the
|
||||||
// 'insertion_submaps'. If 'insertion_submaps.front().finished()' is
|
// 'insertion_submaps'. If 'insertion_submaps.front().finished()' is
|
||||||
// 'true', this submap was inserted into for the last time.
|
// 'true', this submap was inserted into for the last time.
|
||||||
void AddScan(
|
mapping::NodeId AddScan(
|
||||||
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
||||||
int trajectory_id,
|
int trajectory_id,
|
||||||
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps)
|
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps)
|
||||||
|
|
|
@ -90,7 +90,7 @@ std::vector<mapping::SubmapId> SparsePoseGraph::GrowSubmapTransformsAsNeeded(
|
||||||
return {front_submap_id, last_submap_id};
|
return {front_submap_id, last_submap_id};
|
||||||
}
|
}
|
||||||
|
|
||||||
void SparsePoseGraph::AddScan(
|
mapping::NodeId SparsePoseGraph::AddScan(
|
||||||
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
||||||
const int trajectory_id,
|
const int trajectory_id,
|
||||||
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps) {
|
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps) {
|
||||||
|
@ -121,6 +121,7 @@ void SparsePoseGraph::AddScan(
|
||||||
ComputeConstraintsForScan(node_id, insertion_submaps,
|
ComputeConstraintsForScan(node_id, insertion_submaps,
|
||||||
newly_finished_submap);
|
newly_finished_submap);
|
||||||
});
|
});
|
||||||
|
return node_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SparsePoseGraph::AddWorkItem(const std::function<void()>& work_item) {
|
void SparsePoseGraph::AddWorkItem(const std::function<void()>& work_item) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
// 'insertion_submaps.front()' and the scan was inserted into the
|
// 'insertion_submaps.front()' and the scan was inserted into the
|
||||||
// 'insertion_submaps'. If 'insertion_submaps.front().finished()' is
|
// 'insertion_submaps'. If 'insertion_submaps.front().finished()' is
|
||||||
// 'true', this submap was inserted into for the last time.
|
// 'true', this submap was inserted into for the last time.
|
||||||
void AddScan(
|
mapping::NodeId AddScan(
|
||||||
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
std::shared_ptr<const mapping::TrajectoryNode::Data> constant_data,
|
||||||
int trajectory_id,
|
int trajectory_id,
|
||||||
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps)
|
const std::vector<std::shared_ptr<const Submap>>& insertion_submaps)
|
||||||
|
|
Loading…
Reference in New Issue