Skip to content

Commit

Permalink
Merge pull request uzh-rpg#139 from kartikmohta/fix/svo_info_keyframes
Browse files Browse the repository at this point in the history
visualizer: Use reserve not resize for keyframes vector in msg_info
  • Loading branch information
cfo committed Feb 19, 2016
2 parents 35a137c + 245547d commit 3697e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svo_ros/src/visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void Visualizer::publishMinimal(
svo_msgs::Info msg_info;
msg_info.header = header_msg;
msg_info.processing_time = slam.lastProcessingTime();
msg_info.keyframes.resize(slam.map().keyframes_.size());
msg_info.keyframes.reserve(slam.map().keyframes_.size());
for(list<FramePtr>::const_iterator it=slam.map().keyframes_.begin(); it!=slam.map().keyframes_.end(); ++it)
msg_info.keyframes.push_back((*it)->id_);
msg_info.stage = static_cast<int>(slam.stage());
Expand Down

0 comments on commit 3697e55

Please sign in to comment.