Apollo 10.0
自动驾驶开放平台
lidar_driver_factory.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2020 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
22#pragma once
23
24#include <memory>
25#include <unordered_map>
26
27#include "modules/drivers/lidar/proto/config.pb.h"
28#include "modules/drivers/lidar/proto/lidar_parameter.pb.h"
29
30#include "cyber/common/macros.h"
31#include "cyber/cyber.h"
34// #include "modules/drivers/lidar/hesai/parser/parser.h"
35
41namespace apollo {
42namespace drivers {
43namespace lidar {
44
47 LidarParameter::LidarBrand, LidarDriver,
48 LidarDriver* (*)(const std::shared_ptr<::apollo::cyber::Node>& node,
49 const apollo::drivers::lidar::config& config)> {
50 public:
58
65 std::unique_ptr<LidarDriver> CreateLidarDriver(
66 const std::shared_ptr<::apollo::cyber::Node>& node,
67 const apollo::drivers::lidar::config& parameter);
68
69 protected:
70 private:
72};
73
74} // namespace lidar
75} // namespace drivers
76} // namespace apollo
Implements a Factory design pattern with Register and Create methods
Definition factory.h:60
void RegisterLidarClients()
Register the lidar driver of all brands.
std::unique_ptr< LidarDriver > CreateLidarDriver(const std::shared_ptr<::apollo::cyber::Node > &node, const apollo::drivers::lidar::config &parameter)
Create a pointer to a specified brand of lidar.
#define DECLARE_SINGLETON(classname)
Definition macros.h:52
Defines the CanFrame struct and CanClient interface.
Defines the Factory class.
class register implement
Definition arena_queue.h:37