Apollo
11.0
自动驾驶开放平台
barrier_recognition_bank.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
#include <map>
21
22
#include "
cyber/common/log.h
"
23
#include "
cyber/common/file.h
"
24
25
#include "
modules/perception/common/util.h
"
26
#include "
modules/perception/barrier_recognition/interface/base_barrier_recognizer.h
"
27
28
namespace
apollo
{
29
namespace
perception {
30
namespace
lidar {
31
32
class
BarrierRecognizerBank
{
33
public
:
34
BarrierRecognizerBank
() =
default
;
35
virtual
~BarrierRecognizerBank
() =
default
;
36
44
bool
Init
(
const
BarrierRecognizerInitOptions
& options =
BarrierRecognizerInitOptions
());
45
56
bool
Recognize
(
const
BarrierRecognizerOptions
& options,
57
LidarFrame
*frame,
float
& open_percent);
58
64
std::string
Name
()
const
{
return
"BarrierRecognizer"
; }
65
71
std::size_t
Size
()
const
{
return
barrier_bank_map_.size(); }
72
73
private
:
74
std::map<std::string, std::shared_ptr<BaseBarrierRecognizer>>
75
barrier_bank_map_;
76
77
DISALLOW_COPY_AND_ASSIGN
(
BarrierRecognizerBank
);
78
};
79
80
}
// namespace lidar
81
}
// namespace perception
82
}
// namespace apollo
base_barrier_recognizer.h
apollo::perception::lidar::BarrierRecognizerBank
Definition
barrier_recognition_bank.h:32
apollo::perception::lidar::BarrierRecognizerBank::Init
bool Init(const BarrierRecognizerInitOptions &options=BarrierRecognizerInitOptions())
Init of BarrierRecognizerBank object
Definition
barrier_recognition_bank.cc:27
apollo::perception::lidar::BarrierRecognizerBank::Size
std::size_t Size() const
Number of recognizer banks
Definition
barrier_recognition_bank.h:71
apollo::perception::lidar::BarrierRecognizerBank::~BarrierRecognizerBank
virtual ~BarrierRecognizerBank()=default
apollo::perception::lidar::BarrierRecognizerBank::BarrierRecognizerBank
BarrierRecognizerBank()=default
apollo::perception::lidar::BarrierRecognizerBank::Name
std::string Name() const
Name of the class
Definition
barrier_recognition_bank.h:64
apollo::perception::lidar::BarrierRecognizerBank::Recognize
bool Recognize(const BarrierRecognizerOptions &options, LidarFrame *frame, float &open_percent)
calculate the relative position of the vehicle based on the reflector
Definition
barrier_recognition_bank.cc:57
DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition
macros.h:48
file.h
log.h
util.h
apollo
class register implement
Definition
arena_queue.h:37
apollo::perception::lidar::BarrierRecognizerInitOptions
Definition
base_barrier_recognizer.h:33
apollo::perception::lidar::BarrierRecognizerOptions
Definition
base_barrier_recognizer.h:35
apollo::perception::lidar::LidarFrame
Definition
lidar_frame.h:33
modules
perception
barrier_recognition
detector
barrier_recognition_bank.h