motion_filter.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_MAPPING_3D_MOTION_FILTER_H_
18 #define CARTOGRAPHER_MAPPING_3D_MOTION_FILTER_H_
19 
20 #include <limits>
21 
24 #include "cartographer/mapping_3d/proto/motion_filter_options.pb.h"
26 
27 namespace cartographer {
28 namespace mapping_3d {
29 
30 proto::MotionFilterOptions CreateMotionFilterOptions(
31  common::LuaParameterDictionary* parameter_dictionary);
32 
33 // Takes poses as input and filters them to get fewer poses.
34 class MotionFilter {
35  public:
36  explicit MotionFilter(const proto::MotionFilterOptions& options);
37 
38  // If the accumulated motion (linear, rotational, or time) is above the
39  // threshold, returns false. Otherwise the relative motion is accumulated and
40  // true is returned.
42 
43  private:
44  const proto::MotionFilterOptions options_;
45  int num_total_ = 0;
46  int num_different_ = 0;
49 };
50 
51 } // namespace mapping_3d
52 } // namespace cartographer
53 
54 #endif // CARTOGRAPHER_MAPPING_3D_MOTION_FILTER_H_
bool IsSimilar(common::Time time, const transform::Rigid3d &pose)
UniversalTimeScaleClock::time_point Time
Definition: time.h:44
transform::Rigid3d pose
const proto::MotionFilterOptions options_
Definition: motion_filter.h:44
MotionFilter(const proto::MotionFilterOptions &options)
proto::MotionFilterOptions CreateMotionFilterOptions(common::LuaParameterDictionary *const parameter_dictionary)


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:39