Apollo 10.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:
39 void BinaryDataProcess(const unsigned char* data, const int& data_type,
40 const int& point_size, const uint64_t& pkt_timestamp,
41 const uint32_t& time_interval);
42
43 void PointCloudCallback(uint32_t handle, const uint8_t dev_type,
44 LivoxLidarEthernetPacket* data, void* client_data);
45
46 size_t GetEthPacketByteSize(LivoxLidarEthernetPacket* data);
47
49
50 bool Init() override;
51
53 const std::shared_ptr<livox::LivoxScan>& scan_message) override;
54
56
58 std::deque<PointXYZIT> integral_queue_;
59
61 double pointcloud_freq_ = {10.0}; // Hz
62 double integral_time_ = {0.1}; // second
63};
64CYBER_REGISTER_COMPONENT(LivoxLidarComponent)
65
66} // namespace lidar
67} // namespace drivers
68} // namespace apollo
void ReadScanCallback(const std::shared_ptr< livox::LivoxScan > &scan_message) override
void BinaryDataProcess(const unsigned char *data, const int &data_type, const int &point_size, const uint64_t &pkt_timestamp, const 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:656
class register implement
Definition arena_queue.h:37