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
20
#include "
modules/drivers/lidar/seyond/src/seyond_driver.h
"
21
#include "modules/drivers/lidar/seyond/proto/seyond.pb.h"
22
#include "modules/drivers/lidar/seyond/proto/seyond_config.pb.h"
23
24
#include "
modules/drivers/lidar/common/lidar_component_base.h
"
25
#include "
modules/drivers/lidar/common/sync_buffering.h
"
26
#include "
modules/drivers/lidar/common/util.h
"
27
28
namespace
apollo
{
29
namespace
drivers {
30
namespace
lidar {
31
32
class
SeyondComponent
33
:
public
LidarComponentBase
<seyond::SeyondScan> {
34
public
:
35
bool
Init
()
override
;
36
37
void
ReadScanCallback
(
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_;
51
apollo::drivers::seyond::Config
conf_;
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
};
58
CYBER_REGISTER_COMPONENT
(SeyondComponent)
59
60
}
// namespace lidar
61
}
// namespace drivers
62
}
// namespace apollo
apollo::drivers::lidar::LidarComponentBase
Definition
lidar_component_base.h:26
apollo::drivers::lidar::SeyondComponent
Definition
seyond_component.h:33
apollo::drivers::lidar::SeyondComponent::SeyondCloudCallback
void SeyondCloudCallback(std::shared_ptr< PointCloud > cloud)
apollo::drivers::lidar::SeyondComponent::SeyondCloudAllocateCallback
std::shared_ptr< PointCloud > SeyondCloudAllocateCallback()
apollo::drivers::lidar::SeyondComponent::Init
bool Init() override
apollo::drivers::lidar::SeyondComponent::SeyondLogCallback
static void SeyondLogCallback(int32_t level, const char *header, const char *msg)
apollo::drivers::lidar::SeyondComponent::ReadScanCallback
void ReadScanCallback(const std::shared_ptr< seyond::SeyondScan > &scan_message) override
apollo::drivers::lidar::SeyondComponent::SeyondPacketCallback
void SeyondPacketCallback(const InnoDataPacket *pkt, bool is_next_frame)
CYBER_REGISTER_COMPONENT
#define CYBER_REGISTER_COMPONENT(name)
Definition
component.h:656
lidar_component_base.h
util.h
apollo
class register implement
Definition
arena_queue.h:37
seyond_driver.h
apollo::drivers::seyond::Config
Definition
seyond_config.proto:7
sync_buffering.h
modules
drivers
lidar
seyond
src
seyond_component.h