Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
43d32bc6
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,发现更多精彩内容 >>
提交
43d32bc6
编写于
10月 08, 2018
作者:
J
jmtao
提交者:
Jiangtao Hu
10月 08, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: add gflags for stage names for stop_sign_unprotected scenario
上级
6d8eb88b
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
51 addition
and
20 deletion
+51
-20
modules/planning/common/planning_gflags.cc
modules/planning/common/planning_gflags.cc
+19
-4
modules/planning/common/planning_gflags.h
modules/planning/common/planning_gflags.h
+7
-3
modules/planning/conf/scenario_stop_sign_unprotected_config.pb.txt
...lanning/conf/scenario_stop_sign_unprotected_config.pb.txt
+7
-0
modules/planning/proto/planning_config.proto
modules/planning/proto/planning_config.proto
+1
-1
modules/planning/scenarios/lane_follow/lane_follow_scenario.cc
...es/planning/scenarios/lane_follow/lane_follow_scenario.cc
+1
-1
modules/planning/scenarios/lane_follow/lane_follow_scenario_test.cc
...anning/scenarios/lane_follow/lane_follow_scenario_test.cc
+4
-3
modules/planning/scenarios/side_pass/side_pass_scenario.cc
modules/planning/scenarios/side_pass/side_pass_scenario.cc
+1
-1
modules/planning/scenarios/side_pass/side_pass_scenario_test.cc
...s/planning/scenarios/side_pass/side_pass_scenario_test.cc
+4
-3
modules/planning/scenarios/stop_sign_unprotected/stop_sign_unprotected.cc
.../scenarios/stop_sign_unprotected/stop_sign_unprotected.cc
+1
-1
modules/planning/scenarios/stop_sign_unprotected/stop_sign_unprotected_test.cc
...arios/stop_sign_unprotected/stop_sign_unprotected_test.cc
+4
-1
modules/planning/toolkits/optimizers/dp_st_speed/dp_st_graph_test.cc
...nning/toolkits/optimizers/dp_st_speed/dp_st_graph_test.cc
+2
-2
未找到文件。
modules/planning/common/planning_gflags.cc
浏览文件 @
43d32bc6
...
...
@@ -28,20 +28,35 @@ DEFINE_int32(planning_loop_rate, 10, "Loop rate for planning node");
DEFINE_bool
(
enable_collision_detection
,
false
,
"enable collision detection in planning"
);
// scenario conf
// scenario related
/// lane_follow
DEFINE_string
(
lane_follow_scenario
_config_file
,
scenario_lane_follow
_config_file
,
"/apollo/modules/planning/conf/scenario_lane_follow_config.pb.txt"
,
"The lane follow scenario configuration file"
);
/// side_pass
DEFINE_string
(
s
ide_pass_scenario
_config_file
,
s
cenario_side_pass
_config_file
,
"/apollo/modules/planning/conf/scenario_side_pass_config.pb.txt"
,
"The side pass scenario configuration file"
);
/// stop_sign_unprotected
DEFINE_string
(
s
top_sign_unprotected_scenario
_config_file
,
s
cenario_stop_sign_unprotected
_config_file
,
"/apollo/modules/planning/conf/"
"scenario_stop_sign_unprotected_config.pb.txt"
,
"The stop_sign_unprotected scenario configuration file"
);
DEFINE_string
(
scenario_stop_sign_unprotected_stage_stop
,
"SCENATIO_STOP_SIGN_UNPROTECTED_STAGE_STOP"
,
"stage 1: stop"
);
DEFINE_string
(
scenario_stop_sign_unprotected_stage_creep
,
"SCENATIO_STOP_SIGN_UNPROTECTED_STAGE_CREEP"
,
"stage 2: creep"
);
DEFINE_string
(
scenario_stop_sign_unprotected_stage_cruise
,
"SCENATIO_STOP_SIGN_UNPROTECTED_STAGE_CRUISE"
,
"stage 3: cruise"
);
DEFINE_string
(
planning_adapter_config_filename
,
"/apollo/modules/planning/conf/adapter.conf"
,
...
...
modules/planning/common/planning_gflags.h
浏览文件 @
43d32bc6
...
...
@@ -24,9 +24,13 @@ DECLARE_double(test_duration);
DECLARE_string
(
planning_config_file
);
DECLARE_string
(
lane_follow_scenario_config_file
);
DECLARE_string
(
side_pass_scenario_config_file
);
DECLARE_string
(
stop_sign_unprotected_scenario_config_file
);
// scenarios related
DECLARE_string
(
scenario_lane_follow_config_file
);
DECLARE_string
(
scenario_side_pass_config_file
);
DECLARE_string
(
scenario_stop_sign_unprotected_config_file
);
DECLARE_string
(
scenario_stop_sign_unprotected_stage_stop
);
DECLARE_string
(
scenario_stop_sign_unprotected_stage_creep
);
DECLARE_string
(
scenario_stop_sign_unprotected_stage_cruise
);
DECLARE_string
(
planning_adapter_config_filename
);
DECLARE_string
(
traffic_rule_config_filename
);
...
...
modules/planning/conf/scenario_stop_sign_unprotected_config.pb.txt
浏览文件 @
43d32bc6
scenario_type : STOP_SIGN_UNPROTECTED
stage : {
stage_name : "SCENATIO_STOP_SIGN_UNPROTECTED_STAGE_STOP"
}
stage : {
stage_name : "SCENATIO_STOP_SIGN_UNPROTECTED_STAGE_CREEP"
}
stage : {
stage_name : "SCENATIO_STOP_SIGN_UNPROTECTED_STAGE_CRUISE"
task : DP_POLY_PATH_OPTIMIZER
task : PATH_DECIDER
task : DP_ST_SPEED_OPTIMIZER
...
...
modules/planning/proto/planning_config.proto
浏览文件 @
43d32bc6
...
...
@@ -59,7 +59,7 @@ message ScenarioConfig {
}
}
message
Stage
{
optional
string
name
=
1
[
default
=
""
];
optional
string
stage_
name
=
1
[
default
=
""
];
repeated
TaskType
task
=
2
;
};
optional
ScenarioType
scenario_type
=
1
;
...
...
modules/planning/scenarios/lane_follow/lane_follow_scenario.cc
浏览文件 @
43d32bc6
...
...
@@ -89,7 +89,7 @@ bool LaneFollowScenario::Init() {
RegisterTasks
();
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_
lane_follow_scenario
_config_file
,
&
config_
));
FLAGS_
scenario_lane_follow
_config_file
,
&
config_
));
// get all active tasks
std
::
vector
<
TaskType
>
tasks
;
...
...
modules/planning/scenarios/lane_follow/lane_follow_scenario_test.cc
浏览文件 @
43d32bc6
...
...
@@ -39,14 +39,15 @@ class LaneFollowScenarioTest : public ::testing::Test {
std
::
unique_ptr
<
LaneFollowScenario
>
scenario_
;
};
TEST_F
(
LaneFollowScenarioTest
,
Simple
)
{
FLAGS_scenario_lane_follow_config_file
=
"modules/planning/conf/scenario_lane_follow_config.pb.txt"
;
scenario_
.
reset
(
new
LaneFollowScenario
());
EXPECT_EQ
(
scenario_
->
scenario_type
(),
ScenarioConfig
::
LANE_FOLLOW
);
FLAGS_lane_follow_scenario_config_file
=
"modules/planning/conf/scenario_lane_follow_config.pb.txt"
;
ScenarioConfig
config
;
EXPECT_TRUE
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_
lane_follow_scenario
_config_file
,
&
config
));
FLAGS_
scenario_lane_follow
_config_file
,
&
config
));
EXPECT_TRUE
(
scenario_
->
Init
());
}
...
...
modules/planning/scenarios/side_pass/side_pass_scenario.cc
浏览文件 @
43d32bc6
...
...
@@ -83,7 +83,7 @@ bool SidePassScenario::Init() {
RegisterTasks
();
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_s
ide_pass_scenario
_config_file
,
&
config_
));
FLAGS_s
cenario_side_pass
_config_file
,
&
config_
));
// get all active tasks
std
::
vector
<
TaskType
>
tasks
;
...
...
modules/planning/scenarios/side_pass/side_pass_scenario_test.cc
浏览文件 @
43d32bc6
...
...
@@ -39,14 +39,15 @@ class SidePassScenarioTest : public ::testing::Test {
std
::
unique_ptr
<
SidePassScenario
>
scenario_
;
};
TEST_F
(
SidePassScenarioTest
,
Simple
)
{
FLAGS_scenario_side_pass_config_file
=
"modules/planning/conf/scenario_side_pass_config.pb.txt"
;
scenario_
.
reset
(
new
SidePassScenario
());
EXPECT_EQ
(
scenario_
->
scenario_type
(),
ScenarioConfig
::
SIDE_PASS
);
FLAGS_side_pass_scenario_config_file
=
"modules/planning/conf/scenario_side_pass_config.pb.txt"
;
ScenarioConfig
config
;
EXPECT_TRUE
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_s
ide_pass_scenario
_config_file
,
&
config
));
FLAGS_s
cenario_side_pass
_config_file
,
&
config
));
EXPECT_TRUE
(
scenario_
->
Init
());
}
...
...
modules/planning/scenarios/stop_sign_unprotected/stop_sign_unprotected.cc
浏览文件 @
43d32bc6
...
...
@@ -59,7 +59,7 @@ bool StopSignUnprotectedScenario::Init() {
RegisterTasks
();
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_s
top_sign_unprotected_scenario
_config_file
,
&
config_
));
FLAGS_s
cenario_stop_sign_unprotected
_config_file
,
&
config_
));
// get all active tasks
std
::
vector
<
TaskType
>
tasks
;
...
...
modules/planning/scenarios/stop_sign_unprotected/stop_sign_unprotected_test.cc
浏览文件 @
43d32bc6
...
...
@@ -40,13 +40,16 @@ class StopSignUnprotectedScenarioTest : public ::testing::Test {
};
TEST_F
(
StopSignUnprotectedScenarioTest
,
Simple
)
{
FLAGS_scenario_stop_sign_unprotected_config_file
=
"modules/planning/conf/scenario_stop_sign_unprotected_config.pb.txt"
;
scenario_
.
reset
(
new
StopSignUnprotectedScenario
());
EXPECT_EQ
(
scenario_
->
scenario_type
(),
ScenarioConfig
::
STOP_SIGN_UNPROTECTED
);
ScenarioConfig
config
;
EXPECT_TRUE
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_s
top_sign_unprotected_scenario
_config_file
,
&
config
));
FLAGS_s
cenario_stop_sign_unprotected
_config_file
,
&
config
));
EXPECT_TRUE
(
scenario_
->
Init
());
}
...
...
modules/planning/toolkits/optimizers/dp_st_speed/dp_st_graph_test.cc
浏览文件 @
43d32bc6
...
...
@@ -36,11 +36,11 @@ class DpStGraphTest : public ::testing::Test {
public:
virtual
void
SetUp
()
{
FLAGS_enable_multi_thread_in_dp_st_graph
=
false
;
FLAGS_
lane_follow_scenario
_config_file
=
FLAGS_
scenario_lane_follow
_config_file
=
"modules/planning/conf/scenario_lane_follow_config.pb.txt"
;
ScenarioConfig
config
;
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_
lane_follow_scenario
_config_file
,
&
config
));
FLAGS_
scenario_lane_follow
_config_file
,
&
config
));
for
(
const
auto
&
cfg
:
config
.
scenario_task_config
())
{
if
(
cfg
.
task_type
()
==
DP_ST_SPEED_OPTIMIZER
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录