frame_id_filtering_points_processor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 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_IO_FRAME_ID_FILTERING_POINTS_PROCESSOR_H_
18 #define CARTOGRAPHER_IO_FRAME_ID_FILTERING_POINTS_PROCESSOR_H_
19 
20 #include <unordered_set>
21 
24 
25 namespace cartographer {
26 namespace io {
27 
28 // Filters all points with blacklisted frame id or a non-whitelisted frame id.
29 // Note that you can either specify the whitelist or the blacklist, but not both
30 // at the same time.
32  public:
33  constexpr static const char* kConfigurationFileActionName = "frame_id_filter";
35  const std::unordered_set<std::string>& keep_frame_ids,
36  const std::unordered_set<std::string>& drop_frame_ids,
37  PointsProcessor* next);
38  static std::unique_ptr<FrameIdFilteringPointsProcessor> FromDictionary(
41 
43  delete;
45  const FrameIdFilteringPointsProcessor&) = delete;
46 
47  void Process(std::unique_ptr<PointsBatch> batch) override;
48  FlushResult Flush() override;
49 
50  private:
51  const std::unordered_set<std::string> keep_frame_ids_;
52  const std::unordered_set<std::string> drop_frame_ids_;
54 };
55 
56 } // namespace io
57 } // namespace cartographer
58 
59 #endif // CARTOGRAPHER_IO_FRAME_ID_FILTERING_POINTS_PROCESSOR_H_
static std::unique_ptr< FrameIdFilteringPointsProcessor > FromDictionary(common::LuaParameterDictionary *dictionary, PointsProcessor *next)
FrameIdFilteringPointsProcessor(const std::unordered_set< std::string > &keep_frame_ids, const std::unordered_set< std::string > &drop_frame_ids, PointsProcessor *next)
FrameIdFilteringPointsProcessor & operator=(const FrameIdFilteringPointsProcessor &)=delete
void Process(std::unique_ptr< PointsBatch > batch) override


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58