Apollo  6.0
Open source self driving car software
conti_ars_preprocessor.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 <string>
19 #include <unordered_map>
20 
21 #include "cyber/common/macros.h"
23 
24 namespace apollo {
25 namespace perception {
26 namespace radar {
27 
29  public:
30  ContiArsPreprocessor() : BasePreprocessor(), delay_time_(0.0) {}
31  virtual ~ContiArsPreprocessor() {}
32 
33  bool Init() override;
34 
35  bool Preprocess(const drivers::ContiRadar& raw_obstacles,
36  const PreprocessorOptions& options,
37  drivers::ContiRadar* corrected_obstacles) override;
38 
39  std::string Name() const override;
40 
41  inline double GetDelayTime() { return delay_time_; }
42 
43  private:
44  void SkipObjects(const drivers::ContiRadar& raw_obstacles,
45  drivers::ContiRadar* corrected_obstacles);
46  void ExpandIds(drivers::ContiRadar* corrected_obstacles);
47  void CorrectTime(drivers::ContiRadar* corrected_obstacles);
48  int GetNextId();
49 
50  float delay_time_ = 0.0f;
51  static int current_idx_;
52  static std::unordered_map<int, int> local2global_;
53 
55 
57 };
58 
59 } // namespace radar
60 } // namespace perception
61 } // namespace apollo
Definition: base_preprocessor.h:75
double GetDelayTime()
Definition: conti_ars_preprocessor.h:41
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: base_preprocessor.h:71
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition: macros.h:48
bool Preprocess(const drivers::ContiRadar &raw_obstacles, const PreprocessorOptions &options, drivers::ContiRadar *corrected_obstacles) override
ContiArsPreprocessor()
Definition: conti_ars_preprocessor.h:30
friend class ContiArsPreprocessorTest
Definition: conti_ars_preprocessor.h:54
Definition: conti_ars_preprocessor.h:28
virtual ~ContiArsPreprocessor()
Definition: conti_ars_preprocessor.h:31