Fix bug in ToProto introduced in #275.

master
Holger Rapp 2017-05-11 14:02:04 +02:00 committed by GitHub
parent e6a6bab351
commit 7b1915b906
2 changed files with 2 additions and 4 deletions

View File

@ -98,9 +98,8 @@ int TrajectoryConnectivity::ConnectionCount(const int trajectory_id_a,
proto::TrajectoryConnectivity ToProto(
std::vector<std::vector<int>> connected_components) {
proto::TrajectoryConnectivity proto;
for (const auto& connected_component : connected_components) {
std::sort(connected_components.back().begin(),
connected_components.back().end());
for (auto& connected_component : connected_components) {
std::sort(connected_component.begin(), connected_component.end());
}
std::sort(connected_components.begin(), connected_components.end());
for (const auto& connected_component : connected_components) {

View File

@ -30,7 +30,6 @@
#include "cartographer/common/math.h"
#include "cartographer/common/thread_pool.h"
#include "cartographer/kalman_filter/pose_tracker.h"
#include "cartographer/mapping/submaps.h"
#include "cartographer/mapping_3d/scan_matching/proto/ceres_scan_matcher_options.pb.h"
#include "cartographer/mapping_3d/scan_matching/proto/fast_correlative_scan_matcher_options.pb.h"
#include "cartographer/transform/transform.h"