Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <string>
00018 #include <vector>
00019
00020 #include "cartographer/common/configuration_file_resolver.h"
00021 #include "cartographer/io/points_processor_pipeline_builder.h"
00022 #include "cartographer/mapping/proto/pose_graph.pb.h"
00023 #include "cartographer/mapping/proto/trajectory_builder_options.pb.h"
00024
00025 #ifndef CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ASSETS_WRITER_H
00026 #define CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ASSETS_WRITER_H
00027
00028 namespace cartographer_ros {
00029
00030 class AssetsWriter {
00031 public:
00032 AssetsWriter(const std::string& pose_graph_filename,
00033 const std::vector<std::string>& bag_filenames,
00034 const std::string& output_file_prefix);
00035
00036
00037
00038 void RegisterPointsProcessor(
00039 const std::string& name,
00040 cartographer::io::PointsProcessorPipelineBuilder::FactoryFunction
00041 factory);
00042
00043
00044
00045 void Run(const std::string& configuration_directory,
00046 const std::string& configuration_basename,
00047 const std::string& urdf_filename, bool use_bag_transforms);
00048
00049
00050 static ::cartographer::io::FileWriterFactory CreateFileWriterFactory(
00051 const std::string& file_path);
00052
00053 private:
00054 std::vector<std::string> bag_filenames_;
00055 std::vector<::cartographer::mapping::proto::Trajectory> all_trajectories_;
00056 ::cartographer::mapping::proto::PoseGraph pose_graph_;
00057 std::unique_ptr<::cartographer::io::PointsProcessorPipelineBuilder>
00058 point_pipeline_builder_;
00059 };
00060
00061 }
00062
00063 #endif // CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ASSETS_WRITER_H