Apollo  6.0
Open source self driving car software
driver_base.h
Go to the documentation of this file.
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 <cstdint>
25 #include <cstring>
26 #include <memory>
27 #include <sstream>
28 #include <string>
29 #include <vector>
30 
31 #include "cyber/common/log.h"
32 #include "cyber/cyber.h"
37 namespace apollo {
38 namespace drivers {
39 namespace lidar {
40 
45 class LidarDriver {
46  public:
51  explicit LidarDriver(const std::shared_ptr<::apollo::cyber::Node>& node)
52  : node_(node) {}
53 
57  virtual ~LidarDriver() = default;
58 
63  virtual bool Init() = 0;
64 
65  protected:
66  std::shared_ptr<cyber::Node> node_;
67 };
68 
69 } // namespace lidar
70 } // namespace drivers
71 } // namespace apollo
std::shared_ptr< cyber::Node > node_
Definition: driver_base.h:66
virtual ~LidarDriver()=default
Destructor.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
LidarDriver(const std::shared_ptr<::apollo::cyber::Node > &node)
Definition: driver_base.h:51
LidarDriver()
Constructor.
Definition: driver_base.h:50
The class which defines the lidar driver .
Definition: driver_base.h:45
virtual bool Init()=0
Initialize the lidar driver.