Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
b85ea0aa
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b85ea0aa
编写于
3月 08, 2018
作者:
K
kechxu
提交者:
Kecheng Xu
3月 08, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: integrate validation checker
上级
2aee4d21
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
1 deletion
+20
-1
modules/prediction/common/prediction_gflags.cc
modules/prediction/common/prediction_gflags.cc
+2
-0
modules/prediction/common/prediction_gflags.h
modules/prediction/common/prediction_gflags.h
+1
-0
modules/prediction/common/validation_checker.cc
modules/prediction/common/validation_checker.cc
+6
-1
modules/prediction/predictor/lane_sequence/BUILD
modules/prediction/predictor/lane_sequence/BUILD
+1
-0
modules/prediction/predictor/lane_sequence/lane_sequence_predictor.cc
...iction/predictor/lane_sequence/lane_sequence_predictor.cc
+10
-0
未找到文件。
modules/prediction/common/prediction_gflags.cc
浏览文件 @
b85ea0aa
...
...
@@ -118,6 +118,8 @@ DEFINE_bool(enable_lane_sequence_acc, false,
DEFINE_bool
(
enable_trim_prediction_trajectory
,
false
,
"If trim the prediction trajectory to avoid crossing"
"protected adc planning trajectory."
);
DEFINE_bool
(
enable_trajectory_validation_check
,
false
,
"If check the validity of prediction trajectory."
);
DEFINE_double
(
distance_beyond_junction
,
0.5
,
"If the obstacle is in junction more than this threshold,"
"consider it in junction."
);
...
...
modules/prediction/common/prediction_gflags.h
浏览文件 @
b85ea0aa
...
...
@@ -86,6 +86,7 @@ DECLARE_double(lane_sequence_threshold);
DECLARE_double
(
lane_change_dist
);
DECLARE_bool
(
enable_lane_sequence_acc
);
DECLARE_bool
(
enable_trim_prediction_trajectory
);
DECLARE_bool
(
enable_trajectory_validation_check
);
DECLARE_double
(
distance_beyond_junction
);
DECLARE_double
(
adc_trajectory_search_length
);
DECLARE_double
(
virtual_lane_radius
);
...
...
modules/prediction/common/validation_checker.cc
浏览文件 @
b85ea0aa
...
...
@@ -38,8 +38,13 @@ bool ValidationChecker::ValidCentripedalAcceleration(
const
auto
&
second_point
=
trajectory_points
[
i
+
1
];
double
theta_diff
=
std
::
abs
(
second_point
.
path_point
().
theta
()
-
first_point
.
path_point
().
theta
());
double
time_diff
=
std
::
abs
(
second_point
.
relative_time
()
-
first_point
.
relative_time
());
if
(
time_diff
<
FLAGS_double_precision
)
{
continue
;
}
double
v
=
(
first_point
.
v
()
+
second_point
.
v
())
/
2.0
;
double
centripedal_acc
=
v
*
theta_diff
;
double
centripedal_acc
=
v
*
theta_diff
/
time_diff
;
max_centripedal_acc
=
std
::
max
(
max_centripedal_acc
,
centripedal_acc
);
}
return
max_centripedal_acc
<
FLAGS_centripedal_acc_threshold
;
...
...
modules/prediction/predictor/lane_sequence/BUILD
浏览文件 @
b85ea0aa
...
...
@@ -14,6 +14,7 @@ cc_library(
"//modules/prediction/common:prediction_gflags"
,
"//modules/prediction/common:prediction_map"
,
"//modules/prediction/common:prediction_util"
,
"//modules/prediction/common:validation_checker"
,
"//modules/prediction/predictor/sequence:sequence_predictor"
,
"//modules/prediction/proto:lane_graph_proto"
,
"@eigen//:eigen"
,
...
...
modules/prediction/predictor/lane_sequence/lane_sequence_predictor.cc
浏览文件 @
b85ea0aa
...
...
@@ -24,6 +24,7 @@
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/prediction/common/prediction_map.h"
#include "modules/prediction/common/prediction_util.h"
#include "modules/prediction/common/validation_checker.h"
namespace
apollo
{
namespace
prediction
{
...
...
@@ -82,6 +83,15 @@ void LaneSequencePredictor::Predict(Obstacle* obstacle) {
*
obstacle
,
sequence
,
FLAGS_prediction_duration
,
FLAGS_prediction_period
,
&
points
);
if
(
points
.
empty
())
{
continue
;
}
if
(
FLAGS_enable_trajectory_validation_check
&&
!
ValidationChecker
::
ValidCentripedalAcceleration
(
points
))
{
continue
;
}
Trajectory
trajectory
=
GenerateTrajectory
(
points
);
trajectory
.
set_probability
(
sequence
.
probability
());
trajectories_
.
push_back
(
std
::
move
(
trajectory
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录