Apollo  v5.5.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 
20 #include "cyber/common/macros.h"
22 
23 namespace apollo {
24 namespace perception {
25 namespace radar {
26 
28  public:
29  ContiArsPreprocessor() : BasePreprocessor(), delay_time_(0.0) {}
30  virtual ~ContiArsPreprocessor() {}
31 
32  bool Init() override;
33 
34  bool Preprocess(const drivers::ContiRadar& raw_obstacles,
35  const PreprocessorOptions& options,
36  drivers::ContiRadar* corrected_obstacles) override;
37 
38  std::string Name() const override;
39 
40  inline double GetDelayTime() { return delay_time_; }
41 
42  private:
43  void SkipObjects(const drivers::ContiRadar& raw_obstacles,
44  drivers::ContiRadar* corrected_obstacles);
45  void ExpandIds(drivers::ContiRadar* corrected_obstacles);
46  void CorrectTime(drivers::ContiRadar* corrected_obstacles);
47  int GetNextId();
48 
49  float delay_time_ = 0.0f;
50  static int current_idx_;
51  static int local2global_[ORIGIN_CONTI_MAX_ID_NUM];
52 
54 
55  DISALLOW_COPY_AND_ASSIGN(ContiArsPreprocessor);
56 };
57 
58 } // namespace radar
59 } // namespace perception
60 } // namespace apollo
Definition: base_preprocessor.h:75
double GetDelayTime()
Definition: conti_ars_preprocessor.h:40
Definition: blob.h:72
Definition: base_preprocessor.h:71
const int ORIGIN_CONTI_MAX_ID_NUM
Definition: types.h:25
bool Preprocess(const drivers::ContiRadar &raw_obstacles, const PreprocessorOptions &options, drivers::ContiRadar *corrected_obstacles) override
ContiArsPreprocessor()
Definition: conti_ars_preprocessor.h:29
friend class ContiArsPreprocessorTest
Definition: conti_ars_preprocessor.h:53
Definition: conti_ars_preprocessor.h:27
virtual ~ContiArsPreprocessor()
Definition: conti_ars_preprocessor.h:30