Apollo 11.0
自动驾驶开放平台
base_detector.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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 <string>
19
20#include "Eigen/Core"
21
22#include "modules/common_msgs/sensor_msgs/conti_radar.pb.h"
23
24#include "cyber/common/macros.h"
29
30namespace apollo {
31namespace perception {
32namespace radar {
33
35
37 Eigen::Matrix4d* radar2world_pose = nullptr;
38 Eigen::Matrix4d* radar2novatel_trans = nullptr;
39 Eigen::Vector3f car_linear_speed = Eigen::Vector3f::Zero();
40 Eigen::Vector3f car_angular_speed = Eigen::Vector3f::Zero();
42
43 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
44};
45
47 public:
52 BaseDetector() = default;
53 virtual ~BaseDetector() = default;
54
62 virtual bool Init(const DetectorInitOptions& options) = 0;
63
73 virtual bool Detect(const drivers::ContiRadar& corrected_obstacles,
74 const DetectorOptions& options,
75 base::FramePtr detected_frame) = 0;
76
82 virtual std::string Name() const = 0;
83
84 private:
86};
87
89#define PERCEPTION_REGISTER_DETECTOR(name) \
90 PERCEPTION_REGISTER_CLASS(BaseDetector, name)
91
92} // namespace radar
93} // namespace perception
94} // namespace apollo
virtual bool Init(const DetectorInitOptions &options)=0
Init base detector object configs.
BaseDetector()=default
Construct a new Base Detector object
virtual bool Detect(const drivers::ContiRadar &corrected_obstacles, const DetectorOptions &options, base::FramePtr detected_frame)=0
Detect the objects from the corrected obstacles
virtual std::string Name() const =0
The name of the radar base Detector
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition macros.h:48
std::shared_ptr< HdmapStruct > HdmapStructPtr
std::shared_ptr< Frame > FramePtr
Definition frame.h:60
class register implement
Definition arena_queue.h:37
#define PERCEPTION_REGISTER_REGISTERER(base_class)
Definition registerer.h:92