Apollo  6.0
Open source self driving car software
base_camera_perception.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 
23 
24 namespace apollo {
25 namespace perception {
26 namespace camera {
27 
29  // TODO(Xun): modified to be configurable
30  std::string lane_calibration_working_sensor_name = "front_6mm";
31  std::string calibrator_method = "LaneLineCalibrator";
32 };
33 
35 
37  public:
38  BaseCameraPerception() = default;
39  virtual ~BaseCameraPerception() = default;
40 
41  virtual bool Init(const CameraPerceptionInitOptions &init_options) = 0;
42  virtual bool Perception(const CameraPerceptionOptions &options,
43  CameraFrame *frame) = 0;
44 
45  virtual std::string Name() const = 0;
46 
48  BaseCameraPerception &operator=(const BaseCameraPerception &) = delete;
49 };
50 
52 #define PERCEPTION_REGISTER_CAMERA_PERCEPTION(name) \
53  PERCEPTION_REGISTER_CLASS(BaseCameraPerception, name)
54 
55 } // namespace camera
56 } // namespace perception
57 } // namespace apollo
PERCEPTION_REGISTER_REGISTERER(BaseCalibrationService)
Definition: base_init_options.h:24
Definition: camera_frame.h:33
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::string lane_calibration_working_sensor_name
Definition: base_camera_perception.h:30
Definition: base_camera_perception.h:28
Definition: base_camera_perception.h:36
std::string calibrator_method
Definition: base_camera_perception.h:31
bool Init(const char *binary_name)
Definition: base_camera_perception.h:34