Apollo 10.0
自动驾驶开放平台
oculii_radar_component.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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
17#pragma once
18
19#include <atomic>
20#include <future>
21#include <memory>
22#include <vector>
23
24#include "cyber/cyber.h"
25#include "modules/common_msgs/sensor_msgs/oculii_radar.pb.h"
26#include "modules/drivers/radar/oculii_radar/proto/oculii_radar_conf.pb.h"
28
29namespace apollo {
30namespace drivers {
31namespace radar {
32
37
39 public:
44 bool Init() override;
46
47 private:
51 void run();
52
53 std::shared_ptr<Writer<OculiiPointCloud>> writer_ = nullptr;
54 std::unique_ptr<OculiiRadarUdpParser> parser_;
55 std::shared_ptr<OculiiRadarConf> config_;
56
57 std::future<void> async_result_;
58 std::atomic<bool> running_ = {false};
59
60 float frame_drop_interval_;
61 uint64_t last_process_time_;
62};
63
65} // namespace radar
66} // namespace drivers
67} // namespace apollo
bool Init() override
initialize OculiiRadarComponent
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:656
class register implement
Definition arena_queue.h:37