ros_map_writing_points_processor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ROS_MAP_WRITING_POINTS_PROCESSOR_H
18 #define CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ROS_MAP_WRITING_POINTS_PROCESSOR_H
19 
25 #include "cartographer/mapping/proto/2d/probability_grid_range_data_inserter_options_2d.pb.h"
26 
27 namespace cartographer_ros {
28 
29 // Very similar to Cartographer's ProbabilityGridPointsProcessor, but writes
30 // out a PGM and YAML suitable for ROS map server to consume.
33  public:
34  constexpr static const char* kConfigurationFileActionName = "write_ros_map";
36  double resolution,
37  const ::cartographer::mapping::proto::
38  ProbabilityGridRangeDataInserterOptions2D&
39  range_data_inserter_options,
40  ::cartographer::io::FileWriterFactory file_writer_factory,
41  const std::string& filestem, PointsProcessor* next);
44  delete;
45 
46  static std::unique_ptr<RosMapWritingPointsProcessor> FromDictionary(
47  ::cartographer::io::FileWriterFactory file_writer_factory,
49  PointsProcessor* next);
50 
52 
53  void Process(std::unique_ptr<::cartographer::io::PointsBatch> batch) override;
54  FlushResult Flush() override;
55 
56  private:
57  const std::string filestem_;
63 };
64 
65 } // namespace cartographer_ros
66 
67 #endif // CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ROS_MAP_WRITING_POINTS_PROCESSOR_H
std::function< std::unique_ptr< FileWriter >(const std::string &filename)> FileWriterFactory
::cartographer::mapping::ProbabilityGrid probability_grid_
static std::unique_ptr< RosMapWritingPointsProcessor > FromDictionary(::cartographer::io::FileWriterFactory file_writer_factory, ::cartographer::common::LuaParameterDictionary *dictionary, PointsProcessor *next)
::cartographer::mapping::ProbabilityGridRangeDataInserter2D range_data_inserter_
::cartographer::io::FileWriterFactory file_writer_factory_
void Process(std::unique_ptr<::cartographer::io::PointsBatch > batch) override
RosMapWritingPointsProcessor & operator=(const RosMapWritingPointsProcessor &)=delete
RosMapWritingPointsProcessor(double resolution, const ::cartographer::mapping::proto::ProbabilityGridRangeDataInserterOptions2D &range_data_inserter_options, ::cartographer::io::FileWriterFactory file_writer_factory, const std::string &filestem, PointsProcessor *next)


cartographer_ros
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:06:05