Apollo 11.0
自动驾驶开放平台
base_calibrator.h
浏览该文件的文档.
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#include <vector>
21
22#include "Eigen/Core"
23
24#include "cyber/common/macros.h"
28
29namespace apollo {
30namespace perception {
31namespace camera {
32
34 int image_width = 0;
35 int image_height = 0;
36 float focal_x = 0.0f;
37 float focal_y = 0.0f;
38 float cx = 0.0f;
39 float cy = 0.0f;
40};
41
43 std::shared_ptr<std::vector<base::LaneLine>> lane_objects;
44 std::shared_ptr<Eigen::Affine3d> camera2world_pose;
45 double *timestamp = nullptr;
46};
47
49 public:
50 BaseCalibrator() = default;
51
52 virtual ~BaseCalibrator() = default;
53
54 virtual bool Init(
55 const CalibratorInitOptions &options = CalibratorInitOptions()) = 0;
56
57 // @brief: refine 3D location of detected obstacles.
58 // @param [in]: options
59 // @param [in/out]: pitch_angle
60 virtual bool Calibrate(const CalibratorOptions &options,
61 float *pitch_angle) = 0;
62
63 virtual std::string Name() const = 0;
64
66}; // class BaseCalibrator
67
69#define REGISTER_CALIBRATOR(name) \
70 PERCEPTION_REGISTER_CLASS(BaseCalibrator, name)
71
72} // namespace camera
73} // namespace perception
74} // namespace apollo
virtual bool Calibrate(const CalibratorOptions &options, float *pitch_angle)=0
virtual bool Init(const CalibratorInitOptions &options=CalibratorInitOptions())=0
virtual std::string Name() const =0
class register implement
Definition arena_queue.h:37
#define PERCEPTION_REGISTER_REGISTERER(base_class)
Definition registerer.h:92
std::shared_ptr< std::vector< base::LaneLine > > lane_objects
std::shared_ptr< Eigen::Affine3d > camera2world_pose