Skip to content
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

Merged
merged 4 commits into from
Jun 21, 2017

Conversation

SirVer
Copy link
Contributor

@SirVer 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.
@SirVer SirVer requested a review from wohe June 21, 2017 10:50
Copy link
Member

@wohe wohe left a 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.
Copy link
Member

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;
Copy link
Member

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();
Copy link
Member

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)
Copy link
Member

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 {...?

SirVer added a commit to SirVer/cartographer_ros that referenced this pull request Jun 21, 2017
@SirVer SirVer merged commit 9646b31 into cartographer-project:master Jun 21, 2017
@SirVer SirVer deleted the 02_change_interface_spa branch June 21, 2017 12:21
SirVer added a commit to cartographer-project/cartographer_ros that referenced this pull request Jun 21, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_superbuild that referenced this pull request Sep 10, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 11, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 11, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 11, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Sep 14, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Oct 2, 2017
ojura pushed a commit to larics/cartographer_combined that referenced this pull request Oct 21, 2017
damienrg pushed a commit to damienrg/cartographer that referenced this pull request Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants