Apollo 11.0
自动驾驶开放平台
lidar_segmentation_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 <atomic>
20#include <limits>
21#include <memory>
22#include <string>
23
24#include "modules/perception/lidar_segmentation/proto/lidar_segmentation_component_config.pb.h"
25
26#include "cyber/common/log.h"
32
33namespace apollo {
34namespace perception {
35namespace lidar {
36
37class LidarSegmentationComponent : public cyber::Component<onboard::LidarFrameMessage> {
38public:
40 virtual ~LidarSegmentationComponent() = default;
47 bool Init() override;
55 bool Proc(const std::shared_ptr<onboard::LidarFrameMessage>& message) override;
56
57private:
58 bool InternalProc(const std::shared_ptr<onboard::LidarFrameMessage>& message);
59
60private:
61 std::string output_channel_name_;
62 std::string segmentor_name_;
63 std::shared_ptr<apollo::cyber::Writer<onboard::LidarFrameMessage>> writer_;
64
65 // segmentation
66 std::shared_ptr<BaseLidarDetector> segmentor_;
67 // semantic builder
68 SemanticBuilder semantic_builder_;
69};
70
72
73} // namespace lidar
74} // namespace perception
75} // namespace apollo
bool Proc(const std::shared_ptr< onboard::LidarFrameMessage > &message) override
Process of lidar segmentation
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:657
class register implement
Definition arena_queue.h:37