Apollo 9.0
自动驾驶开放平台
livox_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 <deque>
19#include <memory>
20
21#include <boost/format.hpp>
22
23#include "livox_lidar_api.h" //NOLINT
24#include "livox_lidar_def.h" //NOLINT
25
26#include "modules/drivers/lidar/livox/proto/livox.pb.h"
27
32
33namespace apollo {
34namespace drivers {
35namespace lidar {
36
37class LivoxLidarComponent final : public LidarComponentBase<livox::LivoxScan> {
38 public:
40 const unsigned char* data,
41 int data_type,
42 int point_size,
43 uint64_t pkt_timestamp,
44 uint32_t time_interval);
45
47 uint32_t handle,
48 const uint8_t dev_type,
49 LivoxLidarEthernetPacket* data,
50 void* client_data);
51
52 size_t GetEthPacketByteSize(LivoxLidarEthernetPacket* data);
53
55
56 bool Init() override;
57
59 const std::shared_ptr<livox::LivoxScan>& scan_message) override;
60
62
64 std::deque<PointXYZIT> integral_queue_;
65
67 double pointcloud_freq_ = {10.0}; // Hz
68 double integral_time_ = {0.4}; // second
69};
70CYBER_REGISTER_COMPONENT(LivoxLidarComponent)
71
72} // namespace lidar
73} // namespace drivers
74} // namespace apollo
void ReadScanCallback(const std::shared_ptr< livox::LivoxScan > &scan_message) override
void BinaryDataProcess(const unsigned char *data, int data_type, int point_size, uint64_t pkt_timestamp, uint32_t time_interval)
size_t GetEthPacketByteSize(LivoxLidarEthernetPacket *data)
void PointCloudCallback(uint32_t handle, const uint8_t dev_type, LivoxLidarEthernetPacket *data, void *client_data)
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:657
class register implement