Apollo 11.0
自动驾驶开放平台
radar_frame.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#pragma once
17
18#include <memory>
19#include <string>
20#include <vector>
21
22#include "Eigen/Dense"
23
27
28namespace apollo {
29namespace perception {
30namespace radar4d {
31
32struct RadarFrame {
33 // point cloud
34 std::shared_ptr<base::AttributeRadarPointCloud<base::RadarPointF>> cloud;
35 // world point cloud
36 std::shared_ptr<base::AttributeRadarPointCloud<base::RadarPointD>>
38 // timestamp
39 double timestamp = 0.0;
40 // radar to world pose
41 Eigen::Affine3d radar2world_pose = Eigen::Affine3d::Identity();
42 // radar to world pose
43 Eigen::Affine3d novatel2world_pose = Eigen::Affine3d::Identity();
44 // radar to
45 Eigen::Affine3d radar2novatel_extrinsics = Eigen::Affine3d::Identity();
46 // segmented objects
47 std::vector<std::shared_ptr<base::Object>> segmented_objects;
48 // tracked objects
49 std::vector<std::shared_ptr<base::Object>> tracked_objects;
50 // point cloud roi indices
52 // sensor info
54 // reserve string
55 std::string reserve;
56
57 void Reset() {
58 if (cloud) {
59 cloud->clear();
60 }
61 if (world_cloud) {
62 world_cloud->clear();
63 }
64 timestamp = 0.0;
65 radar2world_pose = Eigen::Affine3d::Identity();
66 novatel2world_pose = Eigen::Affine3d::Identity();
67 segmented_objects.clear();
68 tracked_objects.clear();
69 roi_indices.indices.clear();
70 }
71
74 const std::vector<uint32_t> &indices) {
75 if (cloud && filtered_cloud) {
76 filtered_cloud->CopyRadarPointCloudExclude(*cloud, indices);
77 }
78 }
79
80 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
81}; // struct RadarFrame
82
83} // namespace radar4d
84} // namespace perception
85} // namespace apollo
void CopyRadarPointCloudExclude(const RadarPointCloud< RadarPointT > &rhs, const std::vector< IndexType > &indices)
class register implement
Definition arena_queue.h:37
std::vector< std::shared_ptr< base::Object > > tracked_objects
Definition radar_frame.h:49
std::shared_ptr< base::AttributeRadarPointCloud< base::RadarPointD > > world_cloud
Definition radar_frame.h:37
std::vector< std::shared_ptr< base::Object > > segmented_objects
Definition radar_frame.h:47
void FilterPointCloud(base::RadarPointCloud< base::RadarPointF > *filtered_cloud, const std::vector< uint32_t > &indices)
Definition radar_frame.h:72
std::shared_ptr< base::AttributeRadarPointCloud< base::RadarPointF > > cloud
Definition radar_frame.h:34