Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
ecd0ff56
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,发现更多精彩内容 >>
提交
ecd0ff56
编写于
9月 28, 2018
作者:
J
jmtao
提交者:
Qi Luo
9月 28, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: update planning_config proto
上级
b28a9479
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
17 deletion
+32
-17
modules/planning/conf/lane_follow_scenario_config.pb.txt
modules/planning/conf/lane_follow_scenario_config.pb.txt
+10
-5
modules/planning/proto/planning_config.proto
modules/planning/proto/planning_config.proto
+5
-4
modules/planning/scenarios/lane_follow/lane_follow_scenario.cc
...es/planning/scenarios/lane_follow/lane_follow_scenario.cc
+16
-7
modules/planning/toolkits/optimizers/dp_st_speed/dp_st_graph_test.cc
...nning/toolkits/optimizers/dp_st_speed/dp_st_graph_test.cc
+1
-1
未找到文件。
modules/planning/conf/lane_follow_scenario_config.pb.txt
浏览文件 @
ecd0ff56
scenario_type : LANE_FOLLOW
task : DP_POLY_PATH_OPTIMIZER
task : PATH_DECIDER
task : DP_ST_SPEED_OPTIMIZER
task : SPEED_DECIDER
task : QP_SPLINE_ST_SPEED_OPTIMIZER
scenario_task_config : {
task : DP_POLY_PATH_OPTIMIZER
task
_type
: DP_POLY_PATH_OPTIMIZER
dp_poly_path_config {
waypoint_sampler_config {
sample_points_num_each_level: 7
...
...
@@ -28,10 +33,10 @@ scenario_task_config : {
}
}
scenario_task_config : {
task : PATH_DECIDER
task
_type
: PATH_DECIDER
}
scenario_task_config : {
task : DP_ST_SPEED_OPTIMIZER
task
_type
: DP_ST_SPEED_OPTIMIZER
dp_st_speed_config {
total_path_length: 149
total_time: 7.0
...
...
@@ -78,7 +83,7 @@ scenario_task_config : {
}
}
scenario_task_config : {
task : SPEED_DECIDER
task
_type
: SPEED_DECIDER
dp_st_speed_config {
total_path_length: 149
total_time: 7.0
...
...
@@ -119,7 +124,7 @@ scenario_task_config : {
}
}
scenario_task_config : {
task : QP_SPLINE_ST_SPEED_OPTIMIZER
task
_type
: QP_SPLINE_ST_SPEED_OPTIMIZER
qp_st_speed_config {
total_path_length: 250.0
total_time: 7.0
...
...
modules/planning/proto/planning_config.proto
浏览文件 @
ecd0ff56
...
...
@@ -40,10 +40,8 @@ message ScenarioConfig {
INTERSECTION_TRAFFIC_LIGHT_RIGHT_TURN
=
7
;
INTERSECTION_TRAFFIC_LIGHT_GO_THROUGH
=
8
;
}
optional
ScenarioType
scenario_type
=
1
;
message
ScenarioTaskConfig
{
optional
TaskType
task
=
1
;
optional
TaskType
task
_type
=
1
;
oneof
task_config
{
DpPolyPathConfig
dp_poly_path_config
=
2
;
DpStSpeedConfig
dp_st_speed_config
=
3
;
...
...
@@ -53,7 +51,10 @@ message ScenarioConfig {
PathDeciderConfig
path_decider_config
=
7
;
}
}
repeated
ScenarioTaskConfig
scenario_task_config
=
2
;
optional
ScenarioType
scenario_type
=
1
;
repeated
TaskType
task
=
2
;
repeated
ScenarioTaskConfig
scenario_task_config
=
3
;
}
message
PlannerOnRoadConfig
{
...
...
modules/planning/scenarios/lane_follow/lane_follow_scenario.cc
浏览文件 @
ecd0ff56
...
...
@@ -87,17 +87,26 @@ bool LaneFollowScenario::Init() {
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_lane_follow_scenario_config_file
,
&
config_
));
for
(
const
auto
task_cfg
:
config_
.
scenario_task_config
())
{
tasks_
.
emplace_back
(
task_factory_
.
CreateObject
(
task_cfg
.
task
()));
AINFO
<<
"Created task:"
<<
tasks_
.
back
()
->
Name
();
// get all active tasks
std
::
vector
<
TaskType
>
tasks
;
for
(
int
i
=
0
;
i
<
config_
.
task_size
();
++
i
)
{
tasks
.
push_back
(
config_
.
task
(
i
));
}
for
(
size_t
i
=
0
;
i
<
tasks_
.
size
();
++
i
)
{
if
(
!
tasks_
[
i
]
->
Init
(
config_
.
scenario_task_config
(
i
)))
{
AERROR
<<
"Init task["
<<
tasks_
[
i
]
->
Name
()
<<
"] failed."
;
return
false
;
// init task with conf
for
(
int
i
=
0
;
i
<
config_
.
scenario_task_config_size
();
++
i
)
{
auto
task_cfg
=
config_
.
scenario_task_config
(
i
);
TaskType
task_type
=
task_cfg
.
task_type
();
if
(
std
::
find
(
tasks
.
begin
(),
tasks
.
end
(),
task_type
)
!=
tasks
.
end
())
{
tasks_
.
emplace_back
(
task_factory_
.
CreateObject
(
task_type
));
AINFO
<<
"Created task:"
<<
TaskType_Name
(
task_type
);
if
(
!
tasks_
.
back
()
->
Init
(
task_cfg
))
{
AERROR
<<
"Init task["
<<
TaskType_Name
(
task_type
)
<<
"] failed."
;
return
false
;
}
}
}
is_init_
=
true
;
return
true
;
}
...
...
modules/planning/toolkits/optimizers/dp_st_speed/dp_st_graph_test.cc
浏览文件 @
ecd0ff56
...
...
@@ -43,7 +43,7 @@ class DpStGraphTest : public ::testing::Test {
FLAGS_lane_follow_scenario_config_file
,
&
config
));
for
(
const
auto
&
cfg
:
config
.
scenario_task_config
())
{
if
(
cfg
.
task
()
==
DP_ST_SPEED_OPTIMIZER
)
{
if
(
cfg
.
task
_type
()
==
DP_ST_SPEED_OPTIMIZER
)
{
dp_config_
=
cfg
.
dp_st_speed_config
();
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录