From 449a2914111a04c50f10a36919acae6d144f42f7 Mon Sep 17 00:00:00 2001 From: Kevin Daun Date: Thu, 26 Apr 2018 10:20:38 +0200 Subject: [PATCH] Follow up on https://github.com/googlecartographer/cartographer/pull/1108 (#838) --- .../ros_map_writing_points_processor.cc | 6 +++--- .../ros_map_writing_points_processor.h | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.cc b/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.cc index 0f8a632..c25cb3b 100644 --- a/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.cc +++ b/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.cc @@ -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( dictionary->GetDouble("resolution"), - ::cartographer::mapping::CreateRangeDataInserterOptions2D( + ::cartographer::mapping::CreateProbabilityGridRangeDataInserterOptions2D( dictionary->GetDictionary("range_data_inserter").get()), file_writer_factory, dictionary->GetString("filestem"), next); } diff --git a/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.h b/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.h index 79a143c..b9e396c 100644 --- a/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.h +++ b/cartographer_ros/cartographer_ros/ros_map_writing_points_processor.h @@ -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_; };