Apollo 10.0
自动驾驶开放平台
static_align.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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 <vector>
20
23
24namespace apollo {
25namespace hdmap {
26
31
32typedef struct Point3d {
33 Point3d() : x(0.0), y(0.0), z(0.0) {}
34 double x, y, z;
35} Point3d;
36
37typedef struct Centroid3D {
38 Centroid3D() : count(0), start_time(0.0), end_time(0.0) {}
40 int count;
42} Centroid3D;
43
44class StaticAlign : public Alignment {
45 public:
46 explicit StaticAlign(std::shared_ptr<JsonConf> sp_conf);
47 ErrorCode Process(const std::vector<FramePose>& poses);
48
49 private:
50 void Reset();
51 double GetStaticAlignProgress(const std::vector<FramePose>& poses);
52 double StaticAlignRansac(const std::vector<FramePose>& poses);
53 double StaticAlignDynamicCentroid(const std::vector<FramePose>& poses);
54 double GetCentroidTimeDuring();
55 void UpdateDynamicCentroid(const FramePose& pose);
56 bool IsStaticPose(const FramePose& pose);
57 void UpdateGoodPoseInfo(const FramePose& pose);
58
59 private:
60 StaticAlignDetectMethod static_align_detect_method_;
61 Centroid3D dynamic_centroid_;
62};
63
64} // namespace hdmap
65} // namespace apollo
ErrorCode Process(const std::vector< FramePose > &poses)
class register implement
Definition arena_queue.h:37