Apollo  6.0
Open source self driving car software
fused_classifier.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
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 #pragma once
17 
18 #include <memory>
19 #include <string>
20 
21 #include "gtest/gtest_prod.h"
22 
28 
29 namespace apollo {
30 namespace perception {
31 namespace lidar {
32 
34  public:
35  FusedClassifier() = default;
36  ~FusedClassifier() = default;
37  bool Init(
38  const ClassifierInitOptions& options = ClassifierInitOptions()) override;
39 
40  bool Classify(const ClassifierOptions& options, LidarFrame* frame) override;
41 
42  std::string Name() const override { return "FusedClassifier"; }
43 
44  private:
45  FRIEND_TEST(FusedClassifierTest, test_one_shot_fusion);
46  FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion);
47  FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion_bad_timestamp);
48  ObjectSequence sequence_;
49  double temporal_window_ = 20.0;
50  bool enable_temporal_fusion_ = true;
51  bool use_tracked_objects_ = true;
52 
53  std::string one_shot_fusion_method_;
54  std::string sequence_fusion_method_;
55 
56  BaseOneShotTypeFusion* one_shot_fuser_;
57  BaseSequenceTypeFusion* sequence_fuser_;
58 
59  TypeFusionOption option_;
60  TypeFusionInitOption init_option_;
61 }; // class FusedClassifier
62 
63 } // namespace lidar
64 } // namespace perception
65 } // namespace apollo
Definition: object_sequence.h:32
Definition: base_classifier.h:30
Definition: base_classifier.h:28
Definition: fused_classifier.h:33
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::string Name() const override
Definition: fused_classifier.h:42
Definition: type_fusion_interface.h:31
Definition: type_fusion_interface.h:29
bool Init(const ClassifierInitOptions &options=ClassifierInitOptions()) override
Definition: type_fusion_interface.h:33
Definition: base_classifier.h:32
Definition: lidar_frame.h:33
bool Classify(const ClassifierOptions &options, LidarFrame *frame) override
Definition: type_fusion_interface.h:45