Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
9dce46c1
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,发现更多精彩内容 >>
提交
9dce46c1
编写于
11月 01, 2018
作者:
P
panjiacheng
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: cruise feature refactor (modified .cc)
上级
a4805b2a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
20 deletion
+32
-20
modules/prediction/evaluator/vehicle/cruise_mlp_evaluator.cc
modules/prediction/evaluator/vehicle/cruise_mlp_evaluator.cc
+30
-18
modules/prediction/evaluator/vehicle/cruise_mlp_evaluator.h
modules/prediction/evaluator/vehicle/cruise_mlp_evaluator.h
+1
-1
modules/tools/prediction/mlp_train/common/configure.py
modules/tools/prediction/mlp_train/common/configure.py
+1
-1
未找到文件。
modules/prediction/evaluator/vehicle/cruise_mlp_evaluator.cc
浏览文件 @
9dce46c1
...
...
@@ -383,30 +383,42 @@ void CruiseMLPEvaluator::SetLaneFeatureValues
double
diff_x
=
lane_point
.
position
().
x
()
-
feature
.
position
().
x
();
double
diff_y
=
lane_point
.
position
().
y
()
-
feature
.
position
().
y
();
double
angle
=
std
::
atan2
(
diff_y
,
diff_x
);
feature_values
->
push_back
(
lane_point
.
kappa
());
double
deviation_angle
=
angle
-
heading
;
double
relative_l
=
std
::
sqrt
(
diff_x
*
diff_x
+
diff_y
*
diff_y
)
*
std
::
sin
(
deviation_angle
);
// The lateral deviation of the lane-point from vehicle facing:
feature_values
->
push_back
(
relative_l
);
// The extrapolated normal acceleration:
feature_values
->
push_back
(
speed
*
speed
*
lane_point
.
kappa
());
feature_values
->
push_back
(
std
::
sin
(
angle
-
heading
));
feature_values
->
push_back
(
lane_point
.
relative_l
());
feature_values
->
push_back
(
lane_point
.
heading
());
feature_values
->
push_back
(
lane_point
.
angle_diff
());
// The lane-point's heading w.r.t. vehicle's facing direction:
feature_values
->
push_back
(
common
::
math
::
AngleDiff
(
heading
,
lane_pont
.
heading
()));
feature_values
->
push_back
(
diff_x
);
feature_values
->
push_back
(
diff_y
);
}
}
// If the lane points are not sufficient, apply a linear extrapolation.
std
::
size_t
size
=
feature_values
->
size
();
while
(
size
>=
6
&&
size
<
LANE_FEATURE_SIZE
)
{
double
lane_kappa
=
feature_values
->
operator
[](
size
-
6
);
double
centri_acc
=
feature_values
->
operator
[](
size
-
5
);
double
heading_diff
=
feature_values
->
operator
[](
size
-
4
);
double
lane_l_diff
=
feature_values
->
operator
[](
size
-
3
);
double
heading
=
feature_values
->
operator
[](
size
-
2
);
double
angle_diff
=
feature_values
->
operator
[](
size
-
1
);
feature_values
->
push_back
(
lane_kappa
);
feature_values
->
push_back
(
centri_acc
);
feature_values
->
push_back
(
heading_diff
);
feature_values
->
push_back
(
lane_l_diff
);
feature_values
->
push_back
(
heading
);
feature_values
->
push_back
(
angle_diff
);
while
(
size
>=
10
&&
size
<
LANE_FEATURE_SIZE
)
{
double
diff_x_new
=
2
*
feature_values
->
operator
[](
size
-
2
)
-
feature_values
->
operator
[](
size
-
7
);
double
diff_y_new
=
2
*
feature_values
->
operator
[](
size
-
1
)
-
feature_values
->
operator
[](
size
-
6
);
double
angle_new
=
std
::
atan2
(
diff_y_new
,
diff_x_new
);
double
deviation_angle_new
=
angle_new
-
heading
;
double
relative_l_new
=
std
::
sqrt
(
diff_x_new
*
diff_x_new
+
diff_y_new
*
diff_y_new
)
*
std
::
sin
(
deviation_angle_new
);
double
centri_acc_new
=
0.0
;
double
angle_diff_new
=
feature_values
->
operator
[](
size
-
3
);
feature_values
->
push_back
(
relative_l_new
);
feature_values
->
push_back
(
centri_acc_new
);
feature_values
->
push_back
(
angle_diff_new
);
feature_values
->
push_back
(
diff_x_new
);
feature_values
->
push_back
(
diff_y_new
);
size
=
feature_values
->
size
();
}
}
...
...
modules/prediction/evaluator/vehicle/cruise_mlp_evaluator.h
浏览文件 @
9dce46c1
...
...
@@ -109,7 +109,7 @@ class CruiseMLPEvaluator : public Evaluator {
private:
static
const
size_t
OBSTACLE_FEATURE_SIZE
=
23
;
static
const
size_t
INTERACTION_FEATURE_SIZE
=
8
;
static
const
size_t
LANE_FEATURE_SIZE
=
1
8
0
;
static
const
size_t
LANE_FEATURE_SIZE
=
1
5
0
;
std
::
unique_ptr
<
FnnVehicleModel
>
model_ptr_
;
};
...
...
modules/tools/prediction/mlp_train/common/configure.py
浏览文件 @
9dce46c1
...
...
@@ -27,7 +27,7 @@ parameters = {
'dim_output'
:
1
},
'cruise_mlp'
:
{
'dim_input'
:
23
+
8
+
1
8
0
,
'dim_input'
:
23
+
8
+
1
5
0
,
'dim_hidden_1'
:
50
,
'dim_hidden_2'
:
18
,
'dim_output'
:
2
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录