Apollo
11.0
自动驾驶开放平台
camera_location_estimation_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 <memory>
19
20
#include "modules/perception/camera_location_estimation/proto/camera_location_estimation.pb.h"
21
22
#include "
cyber/cyber.h
"
23
#include "
modules/perception/camera_location_estimation/interface/base_transformer.h
"
24
#include "
modules/perception/common/onboard/inner_component_messages/camera_detection_component_messages.h
"
25
26
namespace
apollo
{
27
namespace
perception {
28
namespace
camera {
29
30
class
CameraLocationEstimationComponent
final
31
:
public
cyber::Component
<onboard::CameraFrame> {
32
public
:
39
bool
Init
()
override
;
47
bool
Proc
(
const
std::shared_ptr<onboard::CameraFrame>& msg)
override
;
48
49
private
:
50
void
InitTransformer(
51
const
CameraLocationEstimation
& location_estimation_param);
52
53
private
:
54
std::shared_ptr<BaseTransformer> transformer_;
55
56
std::shared_ptr<cyber::Writer<onboard::CameraFrame>> writer_;
57
};
58
59
CYBER_REGISTER_COMPONENT
(
CameraLocationEstimationComponent
);
60
61
}
// namespace camera
62
}
// namespace perception
63
}
// namespace apollo
base_transformer.h
camera_detection_component_messages.h
apollo::cyber::Component
Definition
component.h:60
apollo::perception::camera::CameraLocationEstimationComponent
Definition
camera_location_estimation_component.h:31
apollo::perception::camera::CameraLocationEstimationComponent::Proc
bool Proc(const std::shared_ptr< onboard::CameraFrame > &msg) override
Process of camera location estimatation component.
Definition
camera_location_estimation_component.cc:53
apollo::perception::camera::CameraLocationEstimationComponent::Init
bool Init() override
Init for camera location estimatation component.
Definition
camera_location_estimation_component.cc:39
CYBER_REGISTER_COMPONENT
#define CYBER_REGISTER_COMPONENT(name)
Definition
component.h:657
cyber.h
apollo
class register implement
Definition
arena_queue.h:37
apollo::perception::camera::CameraLocationEstimation
Definition
camera_location_estimation.proto:7
modules
perception
camera_location_estimation
camera_location_estimation_component.h