Kevin Daun 2018-04-26 10:20:38 +02:00 committed by Wally B. Feed
parent bd428df38f
commit 449a291411
2 changed files with 10 additions and 8 deletions

View File

@ -25,8 +25,8 @@ namespace cartographer_ros {
RosMapWritingPointsProcessor::RosMapWritingPointsProcessor(
const double resolution,
const ::cartographer::mapping::proto::RangeDataInserterOptions2D&
range_data_inserter_options,
const ::cartographer::mapping::proto::
ProbabilityGridRangeDataInserterOptions2D& range_data_inserter_options,
::cartographer::io::FileWriterFactory file_writer_factory,
const std::string& filestem,
::cartographer::io::PointsProcessor* const next)
@ -44,7 +44,7 @@ RosMapWritingPointsProcessor::FromDictionary(
::cartographer::io::PointsProcessor* const next) {
return ::cartographer::common::make_unique<RosMapWritingPointsProcessor>(
dictionary->GetDouble("resolution"),
::cartographer::mapping::CreateRangeDataInserterOptions2D(
::cartographer::mapping::CreateProbabilityGridRangeDataInserterOptions2D(
dictionary->GetDictionary("range_data_inserter").get()),
file_writer_factory, dictionary->GetString("filestem"), next);
}

View File

@ -21,8 +21,8 @@
#include "cartographer/io/file_writer.h"
#include "cartographer/io/points_processor.h"
#include "cartographer/mapping/2d/probability_grid.h"
#include "cartographer/mapping/2d/proto/range_data_inserter_options_2d.pb.h"
#include "cartographer/mapping/2d/range_data_inserter_2d.h"
#include "cartographer/mapping/2d/probability_grid_range_data_inserter_2d.h"
#include "cartographer/mapping/2d/proto/probability_grid_range_data_inserter_options_2d.pb.h"
namespace cartographer_ros {
@ -34,8 +34,9 @@ class RosMapWritingPointsProcessor
constexpr static const char* kConfigurationFileActionName = "write_ros_map";
RosMapWritingPointsProcessor(
double resolution,
const ::cartographer::mapping::proto::RangeDataInserterOptions2D&
range_data_inserter_options,
const ::cartographer::mapping::proto::
ProbabilityGridRangeDataInserterOptions2D&
range_data_inserter_options,
::cartographer::io::FileWriterFactory file_writer_factory,
const std::string& filestem, PointsProcessor* next);
RosMapWritingPointsProcessor(const RosMapWritingPointsProcessor&) = delete;
@ -56,7 +57,8 @@ class RosMapWritingPointsProcessor
const std::string filestem_;
PointsProcessor* const next_;
::cartographer::io::FileWriterFactory file_writer_factory_;
::cartographer::mapping::RangeDataInserter2D range_data_inserter_;
::cartographer::mapping::ProbabilityGridRangeDataInserter2D
range_data_inserter_;
::cartographer::mapping::ProbabilityGrid probability_grid_;
};