-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move GetSubmapData from GlobalTrajectoryBuilder into SparsePoseGraph. #352
Move GetSubmapData from GlobalTrajectoryBuilder into SparsePoseGraph. #352
Conversation
SirVer
commented
Jun 21, 2017
- Adds a function to query all SubmapData from the SparsePoseGraph.
- Changes MapBuilder::SubmapToProto to take a SubmapId.
- Adds a function to query all SubmapData from the SparsePoseGraph. - Changes MapBuilder::SubmapToProto to take a SubmapId.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nits.
// 'submap_id'. | ||
virtual SubmapData GetSubmapData(const SubmapId& submap_id) = 0; | ||
|
||
// Returns all SubmapData for all Submaps, by trajectory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the for all Submaps,
?
std::vector<std::vector<mapping::SparsePoseGraph::SubmapData>> | ||
SparsePoseGraph::GetAllSubmapsData() { | ||
std::vector<std::vector<mapping::SparsePoseGraph::SubmapData>> | ||
all_submaps_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all_submap_data
and GetAllSubmapData
?
common::MutexLocker locker(&mutex_); | ||
for (int trajectory_id = 0; trajectory_id < submap_data_.num_trajectories(); | ||
++trajectory_id) { | ||
all_submaps_data.emplace_back(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialize to the correct size?
submap_id.submap_index < static_cast<int>(optimized_submap_transforms_ | ||
.at(submap_id.trajectory_id) | ||
.size())) { | ||
submap_data.pose = optimized_submap_transforms_.at(submap_id.trajectory_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the temporary, directly return {...
?