Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
54186493
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,发现更多精彩内容 >>
提交
54186493
编写于
12月 22, 2017
作者:
K
kechxu
提交者:
Kecheng Xu
12月 23, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: trim prediction trajectory by junction
上级
154c56e8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
20 deletion
+15
-20
modules/prediction/common/prediction_gflags.cc
modules/prediction/common/prediction_gflags.cc
+3
-1
modules/prediction/common/prediction_gflags.h
modules/prediction/common/prediction_gflags.h
+1
-0
modules/prediction/predictor/predictor.cc
modules/prediction/predictor/predictor.cc
+11
-19
未找到文件。
modules/prediction/common/prediction_gflags.cc
浏览文件 @
54186493
...
...
@@ -93,7 +93,7 @@ DEFINE_bool(enable_adjust_velocity_heading, true,
"adjust velocity heading to lane heading"
);
DEFINE_double
(
heading_diff_thred
,
M_PI
/
6.0
,
"Threshold for adjusting on-lane obstacle heading"
);
DEFINE_bool
(
enable_rnn_acc
,
tru
e
,
"If use acceleration from RNN model."
);
DEFINE_bool
(
enable_rnn_acc
,
fals
e
,
"If use acceleration from RNN model."
);
// Obstacle trajectory
DEFINE_double
(
lane_sequence_threshold
,
0.5
,
...
...
@@ -110,6 +110,8 @@ DEFINE_double(distance_to_adc_trajectory_thred, 5.0,
"ADC planning trajectory"
);
DEFINE_double
(
time_to_adc_trajectory_thred
,
2.0
,
"Time threshold to trim prediction trajectory"
);
DEFINE_double
(
junction_distance_thred
,
0.25
,
"Threshold of radius to search junction."
);
// move sequence prediction
DEFINE_double
(
time_upper_bound_to_lane_center
,
5.0
,
...
...
modules/prediction/common/prediction_gflags.h
浏览文件 @
54186493
...
...
@@ -78,6 +78,7 @@ DECLARE_bool(enable_trim_prediction_trajectory);
DECLARE_double
(
adc_time_step
);
DECLARE_double
(
distance_to_adc_trajectory_thred
);
DECLARE_double
(
time_to_adc_trajectory_thred
);
DECLARE_double
(
junction_distance_thred
);
// move sequence prediction
DECLARE_double
(
time_upper_bound_to_lane_center
);
...
...
modules/prediction/predictor/predictor.cc
浏览文件 @
54186493
...
...
@@ -66,23 +66,21 @@ bool Predictor::TrimTrajectory(
const
ADCTrajectoryContainer
*
adc_trajectory_container
,
Trajectory
*
trajectory
)
{
int
num_point
=
trajectory
->
trajectory_point_size
();
// Get the index at intersect
if
(
num_point
==
0
)
{
return
false
;
}
double
start_x
=
trajectory
->
trajectory_point
(
0
).
path_point
().
x
();
double
start_y
=
trajectory
->
trajectory_point
(
0
).
path_point
().
y
();
if
(
PredictionMap
::
instance
()
->
NearJunction
(
{
start_x
,
start_y
},
FLAGS_junction_distance_thred
))
{
return
false
;
}
int
index
=
0
;
bool
has_intersect
=
false
;
while
(
index
<
num_point
)
{
double
x
=
trajectory
->
trajectory_point
(
index
).
path_point
().
x
();
double
y
=
trajectory
->
trajectory_point
(
index
).
path_point
().
y
();
Eigen
::
Vector2d
point
(
x
,
y
);
std
::
vector
<
std
::
string
>
lane_ids
=
PredictionMap
::
instance
()
->
NearbyLaneIds
(
point
,
FLAGS_distance_to_adc_trajectory_thred
);
for
(
const
std
::
string
&
lane_id
:
lane_ids
)
{
if
(
adc_trajectory_container
->
ContainsLaneId
(
lane_id
))
{
has_intersect
=
true
;
break
;
}
}
if
(
has_intersect
)
{
if
(
PredictionMap
::
instance
()
->
NearJunction
(
{
x
,
y
},
FLAGS_junction_distance_thred
))
{
break
;
}
++
index
;
...
...
@@ -93,12 +91,6 @@ bool Predictor::TrimTrajectory(
return
false
;
}
double
index_time
=
trajectory
->
trajectory_point
(
index
).
relative_time
();
// if early intersect occurs
if
(
index_time
<
FLAGS_time_to_adc_trajectory_thred
)
{
return
false
;
}
for
(
int
i
=
index
;
i
<
num_point
;
++
i
)
{
trajectory
->
mutable_trajectory_point
()
->
RemoveLast
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录