Apollo 11.0
自动驾驶开放平台
base_barrier_recognizer.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2024 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 <string>
20
21#include "cyber/common/macros.h"
23#include "modules/common_msgs/perception_msgs/perception_obstacle.pb.h"
24#include "modules/common_msgs/sensor_msgs/pointcloud.pb.h"
28
29namespace apollo {
30namespace perception {
31namespace lidar {
32
34
36 std::string name;
37 std::vector<double> world_roi_polygon;
38};
39
40struct BarrieGate {
42 std::string id;
43 std::string type;
45};
46
47
49public:
51
52 virtual ~BaseBarrierRecognizer() = default;
53
62
71 virtual bool Recognize(
72 const BarrierRecognizerOptions& options,
73 lidar::LidarFrame* frame,
74 float& open_percent) = 0;
75
81 virtual std::string Name() const = 0;
82
83private:
85}; // class BaseBarrierRecognizer
86
88#define PERCEPTION_REGISTER_CURB_DETECTOR(name) PERCEPTION_REGISTER_CLASS(BaseBarrierRecognizer, name)
89
90} // namespace lidar
91} // namespace perception
92} // namespace apollo
virtual std::string Name() const =0
Get class name
virtual bool Init(const BarrierRecognizerInitOptions &options=BarrierRecognizerInitOptions())=0
Init base barrier detector
virtual bool Recognize(const BarrierRecognizerOptions &options, lidar::LidarFrame *frame, float &open_percent)=0
Recognize barrier gate status from point cloud.
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition macros.h:48
class register implement
Definition arena_queue.h:37
#define PERCEPTION_REGISTER_REGISTERER(base_class)
Definition registerer.h:92