Apollo 10.0
自动驾驶开放平台
object.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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
18
19namespace apollo {
20namespace perception {
21namespace base {
22
24 center_uncertainty << 0.0f, 0, 0, 0, 0.0f, 0, 0, 0, 0.0f;
25 velocity_uncertainty << 0.0f, 0, 0, 0, 0.0f, 0, 0, 0, 0.0f;
26 acceleration_uncertainty << 0.0f, 0, 0, 0, 0.0f, 0, 0, 0, 0.0f;
27 type_probs.resize(static_cast<int>(ObjectType::MAX_OBJECT_TYPE), 0);
28 sub_type_probs.resize(static_cast<int>(ObjectSubType::MAX_OBJECT_TYPE), 0.0f);
29 b_cipv = false;
30// feature.reset();
31}
32
34 id = -1;
35 polygon.clear();
36 direction = Eigen::Vector3f(1.0f, 0.0f, 0.0f);
37 theta = 0.0f;
38 theta_variance = 0.0f;
39 center = Eigen::Vector3d(0.0, 0.0, 0.0);
40 center_uncertainty << 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f;
41
42 size = Eigen::Vector3f(0.0f, 0.0f, 0.0f);
43 size_variance = Eigen::Vector3f(0.0f, 0.0f, 0.0f);
44 anchor_point = Eigen::Vector3d(0.0, 0.0, 0.0);
46 type_probs.assign(static_cast<int>(ObjectType::MAX_OBJECT_TYPE), 0.0f);
48 sub_type_probs.assign(static_cast<int>(ObjectSubType::MAX_OBJECT_TYPE), 0.0f);
49
50 confidence = 1.0f;
51
52 is_front_critical = false;
53
54 track_id = -1;
55 velocity = Eigen::Vector3f(0.0f, 0.0f, 0.0f);
56 velocity_uncertainty << 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f;
57 velocity_converged = true;
59 acceleration = Eigen::Vector3f(0.0f, 0.0f, 0.0f);
60 acceleration_uncertainty << 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
61 0.0f;
62
63 tracking_time = 0.0;
65
68
74// feature.reset();
75}
76
77std::string Object::ToString() const {
78 std::ostringstream oss;
79 oss << "Object [id: " << id << ", track_id: " << track_id << ", direction: ("
80 << direction[0] << "," << direction[1] << "," << direction[2]
81 << "), theta: " << theta << ", theta_variance: " << theta_variance
82 << ", center: (" << center[0] << "," << center[1] << "," << center[2]
83 << ")"
84 << ", center_uncertainty: (" << center_uncertainty(0, 0) << ","
85 << center_uncertainty(0, 1) << "," << center_uncertainty(0, 2) << ","
86 << center_uncertainty(1, 0) << "," << center_uncertainty(1, 1) << ","
87 << center_uncertainty(1, 2) << "," << center_uncertainty(2, 0) << ","
88 << center_uncertainty(2, 1) << "," << center_uncertainty(2, 2)
89 << "), size: (" << size[0] << "," << size[1] << "," << size[2]
90 << "), size_variance: (" << size_variance[0] << "," << size_variance[1]
91 << "," << size_variance[2] << "), anchor_point: (" << anchor_point[0]
92 << "," << anchor_point[1] << "," << anchor_point[2]
93 << "), type: " << static_cast<int>(type) << ", confidence: " << confidence
94 << ", track_id: " << track_id << ", velocity: (" << velocity[0] << ","
95 << velocity[1] << "," << velocity[2]
96 << "), velocity_confidence: " << velocity_confidence
97 << ", acceleration: (" << acceleration[0] << "," << acceleration[1] << ","
98 << acceleration[2] << "), tracking_time: " << tracking_time
99 << ", latest_tracked_time: " << latest_tracked_time;
100 return oss.str();
101}
102
103} // namespace base
104} // namespace perception
105} // namespace apollo
class register implement
Definition arena_queue.h:37
Eigen::Matrix3f velocity_uncertainty
Definition object.h:90
std::vector< float > sub_type_probs
Definition object.h:76
CameraObjectSupplement camera_supplement
Definition object.h:118
Eigen::Vector3f acceleration
Definition object.h:96
Eigen::Vector3f direction
Definition object.h:47
std::vector< float > type_probs
Definition object.h:71
PointCloud< PointD > polygon
Definition object.h:43
Eigen::Vector3f size_variance
Definition object.h:64
FusionObjectSupplement fusion_supplement
Definition object.h:119
Eigen::Matrix3f acceleration_uncertainty
Definition object.h:98
RadarObjectSupplement radar_supplement
Definition object.h:117
Radar4dObjectSupplement radar4d_supplement
Definition object.h:116
LidarObjectSupplement lidar_supplement
Definition object.h:115
Eigen::Matrix3f center_uncertainty
Definition object.h:58
Eigen::Vector3d anchor_point
Definition object.h:66
std::string ToString() const
Definition object.cc:77