Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
b41b2899
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,发现更多精彩内容 >>
提交
b41b2899
编写于
1月 18, 2019
作者:
K
kechxu
提交者:
PAN Jiacheng
1月 19, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: implement correct predicted on lane
上级
06d3d60b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
1 deletion
+28
-1
modules/prediction/common/prediction_gflags.cc
modules/prediction/common/prediction_gflags.cc
+4
-0
modules/prediction/common/prediction_gflags.h
modules/prediction/common/prediction_gflags.h
+3
-0
modules/prediction/evaluate_prediction_output.cc
modules/prediction/evaluate_prediction_output.cc
+21
-1
未找到文件。
modules/prediction/common/prediction_gflags.cc
浏览文件 @
b41b2899
...
...
@@ -239,3 +239,7 @@ DEFINE_double(lane_distance_threshold, 3.0,
DEFINE_double
(
lane_angle_difference_threshold
,
M_PI
*
0.25
,
"The threshold for distance to ego/neighbor lane "
"in feature extraction"
);
// Trajectory evaluation
DEFINE_double
(
distance_threshold_on_lane
,
1.5
,
"The threshold of distance in on-lane situation"
);
modules/prediction/common/prediction_gflags.h
浏览文件 @
b41b2899
...
...
@@ -143,3 +143,6 @@ DECLARE_int32(road_graph_max_search_horizon);
// scenario feature extraction
DECLARE_double
(
lane_distance_threshold
);
DECLARE_double
(
lane_angle_difference_threshold
);
// Trajectory evaluation
DECLARE_double
(
distance_threshold_on_lane
);
modules/prediction/evaluate_prediction_output.cc
浏览文件 @
b41b2899
...
...
@@ -63,7 +63,27 @@ void Initialize() {
bool
IsCorrectlyPredictedOnLane
(
const
PredictionTrajectoryPoint
&
future_point
,
const
PredictionObstacle
&
prediction_obstacle
)
{
// TODO(kechxu) implement
double
future_relative_time
=
future_point
.
timestamp
()
-
prediction_obstacle
.
timestamp
();
const
auto
&
predicted_trajectories
=
prediction_obstacle
.
trajectory
();
for
(
const
auto
&
predicted_traj
:
predicted_trajectories
)
{
// find an index, TODO(kechxu) use binary search to speed up
int
i
=
0
;
while
(
i
+
1
<
predicted_traj
.
trajectory_point_size
()
&&
predicted_traj
.
trajectory_point
(
i
+
1
).
relative_time
()
<
future_relative_time
)
{
++
i
;
}
// TODO(kechxu) consider interpolation
double
predicted_x
=
predicted_traj
.
trajectory_point
(
i
).
path_point
().
x
();
double
predicted_y
=
predicted_traj
.
trajectory_point
(
i
).
path_point
().
y
();
double
diff_x
=
std
::
abs
(
predicted_x
-
future_point
.
path_point
().
x
());
double
diff_y
=
std
::
abs
(
predicted_y
-
future_point
.
path_point
().
y
());
if
(
diff_x
<
FLAGS_distance_threshold_on_lane
&&
diff_y
<
FLAGS_distance_threshold_on_lane
)
{
return
true
;
}
}
return
false
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录