Apollo  6.0
Open source self driving car software
evaluator_manager.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 
22 #pragma once
23 
24 #include <list>
25 #include <map>
26 #include <memory>
27 #include <unordered_map>
28 #include <vector>
29 
30 #include "cyber/common/macros.h"
32 
37 namespace apollo {
38 namespace perception {
39 
41 using apollo::prediction::ObstacleHistory;
45 
47  public:
48  EvaluatorManager() = default;
52  virtual ~EvaluatorManager() = default;
53 
54  /* initialize
55  */
56  void Init();
60  void Run(ObstaclesContainer* obstacles_container);
61 
62  void EvaluateObstacle(Obstacle* obstacle,
63  ObstaclesContainer* obstacles_container,
64  std::vector<Obstacle*> dynamic_env);
65 
66  void EvaluateObstacle(Obstacle* obstacle,
67  ObstaclesContainer* obstacles_container);
68 
69  private:
70  void BuildObstacleIdHistoryMap(ObstaclesContainer* obstacles_container);
71 
72  std::unordered_map<int, ObstacleHistory> obstacle_id_history_map_;
73  std::unique_ptr<SemanticMap> semantic_map_;
74  std::unique_ptr<SemanticLSTMEvaluator> evaluator_;
75 };
76 
77 } // namespace perception
78 } // namespace apollo
Prediction obstacle.
Definition: obstacle.h:52
Definition: obstacles_container.h:39
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: semantic_map.h:30
void EvaluateObstacle(Obstacle *obstacle, ObstaclesContainer *obstacles_container, std::vector< Obstacle *> dynamic_env)
virtual ~EvaluatorManager()=default
Destructor.
Definition: semantic_lstm_evaluator.h:31
Definition: evaluator_manager.h:46
void Run(ObstaclesContainer *obstacles_container)
Run evaluators.