Apollo 10.0
自动驾驶开放平台
seyond_component.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#pragma once
17
18#include <memory>
19
21#include "modules/drivers/lidar/seyond/proto/seyond.pb.h"
22#include "modules/drivers/lidar/seyond/proto/seyond_config.pb.h"
23
27
28namespace apollo {
29namespace drivers {
30namespace lidar {
31
33 : public LidarComponentBase<seyond::SeyondScan> {
34 public:
35 bool Init() override;
36
38 const std::shared_ptr<seyond::SeyondScan>& scan_message) override;
39
40 void SeyondCloudCallback(std::shared_ptr<PointCloud> cloud);
41
42 void SeyondPacketCallback(const InnoDataPacket *pkt, bool is_next_frame);
43
44 std::shared_ptr<PointCloud> SeyondCloudAllocateCallback();
45
46 static void SeyondLogCallback(int32_t level, const char *header,
47 const char *msg);
48
49 private:
50 std::shared_ptr<SeyondDriver> driver_ptr_;
52
53 std::shared_ptr<seyond::SeyondScan> scan_packets_ptr_{nullptr};
54
55 uint32_t table_send_hz_{10};
56 uint32_t frame_count_{0};
57};
58CYBER_REGISTER_COMPONENT(SeyondComponent)
59
60} // namespace lidar
61} // namespace drivers
62} // namespace apollo
void SeyondCloudCallback(std::shared_ptr< PointCloud > cloud)
std::shared_ptr< PointCloud > SeyondCloudAllocateCallback()
static void SeyondLogCallback(int32_t level, const char *header, const char *msg)
void ReadScanCallback(const std::shared_ptr< seyond::SeyondScan > &scan_message) override
void SeyondPacketCallback(const InnoDataPacket *pkt, bool is_next_frame)
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:656
class register implement
Definition arena_queue.h:37