Apollo
11.0
自动驾驶开放平台
pointcloud_ground_detection_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
17
#pragma once
18
19
#include <memory>
20
#include <string>
21
22
#include "modules/perception/pointcloud_ground_detection/proto/pointcloud_ground_detection_component_config.pb.h"
23
24
#include "
cyber/common/log.h
"
25
#include "
cyber/component/component.h
"
26
#include "
modules/perception/common/onboard/inner_component_messages/lidar_inner_component_messages.h
"
27
#include "
modules/perception/pointcloud_ground_detection/ground_detector/spatio_temporal_ground_detector/spatio_temporal_ground_detector.h
"
28
29
namespace
apollo
{
30
namespace
perception {
31
namespace
lidar {
32
33
using
onboard::LidarFrameMessage;
34
35
class
PointCloudGroundDetectComponent
36
:
public
cyber::Component
<LidarFrameMessage> {
37
public
:
38
PointCloudGroundDetectComponent
() =
default
;
39
virtual
~PointCloudGroundDetectComponent
() =
default
;
46
bool
Init
()
override
;
54
bool
Proc
(
const
std::shared_ptr<LidarFrameMessage>& message)
override
;
55
56
private
:
57
bool
InternalProc(
const
std::shared_ptr<LidarFrameMessage>& message);
58
59
private
:
60
std::shared_ptr<apollo::cyber::Writer<onboard::LidarFrameMessage>> writer_;
61
std::string output_channel_name_;
62
BaseGroundDetector
* ground_detector_;
63
};
64
65
CYBER_REGISTER_COMPONENT
(
PointCloudGroundDetectComponent
);
66
67
}
// namespace lidar
68
}
// namespace perception
69
}
// namespace apollo
apollo::cyber::Component
Definition
component.h:60
apollo::perception::lidar::BaseGroundDetector
Definition
base_ground_detector.h:36
apollo::perception::lidar::PointCloudGroundDetectComponent
Definition
pointcloud_ground_detection_component.h:36
apollo::perception::lidar::PointCloudGroundDetectComponent::Init
bool Init() override
Init pointcloud ground detection
Definition
pointcloud_ground_detection_component.cc:27
apollo::perception::lidar::PointCloudGroundDetectComponent::Proc
bool Proc(const std::shared_ptr< LidarFrameMessage > &message) override
Process of pointcloud ground detection
Definition
pointcloud_ground_detection_component.cc:54
apollo::perception::lidar::PointCloudGroundDetectComponent::~PointCloudGroundDetectComponent
virtual ~PointCloudGroundDetectComponent()=default
apollo::perception::lidar::PointCloudGroundDetectComponent::PointCloudGroundDetectComponent
PointCloudGroundDetectComponent()=default
component.h
CYBER_REGISTER_COMPONENT
#define CYBER_REGISTER_COMPONENT(name)
Definition
component.h:657
lidar_inner_component_messages.h
log.h
apollo
class register implement
Definition
arena_queue.h:37
spatio_temporal_ground_detector.h
modules
perception
pointcloud_ground_detection
pointcloud_ground_detection_component.h