Apollo 11.0
自动驾驶开放平台
camera_location_refinement_component.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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 <map>
19#include <memory>
20#include <string>
21
22#include "modules/perception/camera_location_refinement/proto/camera_location_refinement.pb.h"
23
24#include "cyber/cyber.h"
29
30namespace apollo {
31namespace perception {
32namespace camera {
33
35 : public cyber::Component<onboard::CameraFrame> {
36 public:
43 bool Init() override;
51 bool Proc(const std::shared_ptr<onboard::CameraFrame>& msg) override;
52
53 private:
54 void InitCalibrationService(
55 const CameraLocationRefinement& location_refinement_param);
56
57 void InitPostprocessor(
58 const CameraLocationRefinement& location_refinement_param);
59
60 void SetCameraHeightAndPitch(
61 const std::map<std::string, float>& name_camera_ground_height_map,
62 const std::map<std::string, float>& name_camera_pitch_angle_diff_map,
63 const float& pitch_angle_calibrator_working_sensor);
64
65 private:
66 std::shared_ptr<BasePostprocessor> postprocessor_;
67 std::shared_ptr<BaseCalibrationService> calibration_service_;
68
69 std::shared_ptr<cyber::Writer<onboard::CameraFrame>> writer_;
70
72};
73
75
76} // namespace camera
77} // namespace perception
78} // namespace apollo
bool Proc(const std::shared_ptr< onboard::CameraFrame > &msg) override
Process of camera location refinement component.
bool Init() override
Init for camera location refinement component.
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:657
std::map< T, EigenType, std::less< T >, Eigen::aligned_allocator< std::pair< const T, EigenType > > > EigenMap
Definition eigen_defs.h:40
class register implement
Definition arena_queue.h:37