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
21
#include "
modules/map/tools/map_datachecker/server/alignment.h
"
22
#include "
modules/map/tools/map_datachecker/server/common.h
"
23
24
namespace
apollo
{
25
namespace
hdmap {
26
27
enum class
StaticAlignDetectMethod
{
28
RANSAC
,
29
DYNAMIC_CENTROID
,
30
};
31
32
typedef
struct
Point3d
{
33
Point3d
() :
x
(0.0),
y
(0.0),
z
(0.0) {}
34
double
x
,
y
,
z
;
35
} Point3d;
36
37
typedef
struct
Centroid3D
{
38
Centroid3D
() :
count
(0),
start_time
(0.0),
end_time
(0.0) {}
39
Point3d
center
;
40
int
count
;
41
double
start_time
,
end_time
;
42
} Centroid3D;
43
44
class
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
alignment.h
apollo::hdmap::StaticAlign::Process
ErrorCode Process(const std::vector< FramePose > &poses)
Definition
static_align.cc:141
common.h
apollo::hdmap::ErrorCode
ErrorCode
Definition
collection_error_code.proto:4
apollo::hdmap::StaticAlignDetectMethod
StaticAlignDetectMethod
Definition
static_align.h:27
apollo::hdmap::StaticAlignDetectMethod::RANSAC
@ RANSAC
apollo::hdmap::StaticAlignDetectMethod::DYNAMIC_CENTROID
@ DYNAMIC_CENTROID
apollo
class register implement
Definition
arena_queue.h:37
apollo::hdmap::Centroid3D
Definition
static_align.h:37
apollo::hdmap::Centroid3D::Centroid3D
Centroid3D()
Definition
static_align.h:38
apollo::hdmap::Centroid3D::start_time
double start_time
Definition
static_align.h:41
apollo::hdmap::Centroid3D::count
int count
Definition
static_align.h:40
apollo::hdmap::Centroid3D::end_time
double end_time
Definition
static_align.h:41
apollo::hdmap::Centroid3D::center
Point3d center
Definition
static_align.h:39
apollo::hdmap::Point3d
Definition
static_align.h:32
apollo::hdmap::Point3d::z
double z
Definition
static_align.h:34
apollo::hdmap::Point3d::y
double y
Definition
static_align.h:34
apollo::hdmap::Point3d::x
double x
Definition
static_align.h:34
apollo::hdmap::Point3d::Point3d
Point3d()
Definition
static_align.h:33
modules
map
tools
map_datachecker
server
static_align.h