Apollo 10.0
自动驾驶开放平台
oculii_radar_udp_parser.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#ifndef OCULII_RADAR_PARSER_H_
18#define OCULII_RADAR_PARSER_H_
19
20#include <atomic>
21#include <future>
22#include <utility>
23#include <memory>
24
26#include "modules/common_msgs/sensor_msgs/oculii_radar.pb.h"
28
29namespace apollo {
30namespace drivers {
31namespace radar {
32
35
37 public:
42
47
52 bool Init(uint16_t port);
53
60 int Parse(apollo::drivers::OculiiPointCloud& oculii_output);
61
62 private:
63 int socket_;
64 int64_t frame_number_;
65 std::future<void> async_result_;
66 std::atomic<bool> running_ = {false};
67 std::shared_ptr<uint8_t> raw_buffer_;
68 std::shared_ptr<BoundedQueue<
69 std::pair<int, std::shared_ptr<uint8_t>>>> queue_;
70
71 void AsyncUdpInput();
72 int ParseHeader(OculiiHeader& header, void* buffer);
73 int ParseDection(OculiiDetection& dection, void* buffer);
74 int ParseTrack(OculiiTrack& track, void* buffer);
75 int ParseFooter(OculiiFooter& footer, void* buffer);
76 bool IsMultiCastMode(float hr, float hd, float ha, float he,
77 float fr, float fd, float fa, float fe);
78};
79
80} // namespace radar
81} // namespace drivers
82} // namespace apollo
83
84#endif // OCULII_RADAR_PARSER_H_
int Parse(apollo::drivers::OculiiPointCloud &oculii_output)
compute coordinate values based on alpha, beta, doppler and range from point
bool Init(uint16_t port)
initialize radar parser instance
class register implement
Definition arena_queue.h:37