Track googlecartographer/cartographer#421. (#441)

master
Holger Rapp 2017-07-25 14:32:21 +02:00 committed by Wolfgang Hess
parent e6d214c51d
commit d022b8182f
1 changed files with 6 additions and 2 deletions

View File

@ -162,9 +162,13 @@ void Run(const string& pose_graph_filename,
return carto::common::make_unique<carto::io::StreamFileWriter>(filename);
};
// This vector must outlive the pipeline.
std::vector<::cartographer::mapping::proto::Trajectory> all_trajectories(
pose_graph_proto.trajectory().begin(),
pose_graph_proto.trajectory().end());
carto::io::PointsProcessorPipelineBuilder builder;
// TODO(hrapp): Pass all trajectories to the PointsProcessors.
carto::io::RegisterBuiltInPointsProcessors(pose_graph_proto.trajectory(0),
carto::io::RegisterBuiltInPointsProcessors(all_trajectories,
file_writer_factory, &builder);
std::vector<std::unique_ptr<carto::io::PointsProcessor>> pipeline =
builder.CreatePipeline(