Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
0856de6b
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,发现更多精彩内容 >>
提交
0856de6b
编写于
1月 15, 2019
作者:
J
Jiaming Tao
提交者:
Liangliang Zhang
1月 15, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: naming changes for traffic-light-protected-right-turn scenario
上级
8836ff61
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
26 deletion
+26
-26
modules/planning/scenarios/scenario_manager.cc
modules/planning/scenarios/scenario_manager.cc
+1
-1
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_creep.h
...narios/traffic_light/unprotected_right_turn/stage_creep.h
+3
-3
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_intersection_cruise.h
..._light/unprotected_right_turn/stage_intersection_cruise.h
+3
-3
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_stop.h
...enarios/traffic_light/unprotected_right_turn/stage_stop.h
+3
-3
modules/planning/scenarios/traffic_light/unprotected_right_turn/traffic_light_unprotected_right_turn_scenario.cc
...ght_turn/traffic_light_unprotected_right_turn_scenario.cc
+6
-6
modules/planning/scenarios/traffic_light/unprotected_right_turn/traffic_light_unprotected_right_turn_scenario.h
...ight_turn/traffic_light_unprotected_right_turn_scenario.h
+5
-5
modules/planning/scenarios/traffic_light/unprotected_right_turn/traffic_light_unprotected_right_turn_scenario_test.cc
...urn/traffic_light_unprotected_right_turn_scenario_test.cc
+5
-5
未找到文件。
modules/planning/scenarios/scenario_manager.cc
浏览文件 @
0856de6b
...
...
@@ -68,7 +68,7 @@ std::unique_ptr<Scenario> ScenarioManager::CreateScenario(
break
;
case
ScenarioConfig
::
TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN
:
ptr
.
reset
(
new
scenario
::
traffic_light
::
TrafficLight
RightTurnUnprotected
Scenario
(
new
scenario
::
traffic_light
::
TrafficLight
UnprotectedRightTurn
Scenario
(
config_map_
[
scenario_type
],
&
scenario_context_
));
break
;
default:
...
...
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_creep.h
浏览文件 @
0856de6b
...
...
@@ -30,7 +30,7 @@ namespace planning {
namespace
scenario
{
namespace
traffic_light
{
struct
TrafficLight
RightTurnUnprotected
Context
;
struct
TrafficLight
UnprotectedRightTurn
Context
;
class
StageCreep
:
public
Stage
{
public:
...
...
@@ -41,8 +41,8 @@ class StageCreep : public Stage {
Stage
::
StageStatus
Process
(
const
common
::
TrajectoryPoint
&
planning_init_point
,
Frame
*
frame
)
override
;
TrafficLight
RightTurnUnprotected
Context
*
GetContext
()
{
return
Stage
::
GetContextAs
<
TrafficLight
RightTurnUnprotected
Context
>
();
TrafficLight
UnprotectedRightTurn
Context
*
GetContext
()
{
return
Stage
::
GetContextAs
<
TrafficLight
UnprotectedRightTurn
Context
>
();
}
private:
...
...
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_intersection_cruise.h
浏览文件 @
0856de6b
...
...
@@ -30,7 +30,7 @@ namespace planning {
namespace
scenario
{
namespace
traffic_light
{
struct
TrafficLight
RightTurnUnprotected
Context
;
struct
TrafficLight
UnprotectedRightTurn
Context
;
class
StageIntersectionCruise
:
public
Stage
{
public:
...
...
@@ -41,8 +41,8 @@ class StageIntersectionCruise : public Stage {
Stage
::
StageStatus
Process
(
const
common
::
TrajectoryPoint
&
planning_init_point
,
Frame
*
frame
)
override
;
TrafficLight
RightTurnUnprotected
Context
*
GetContext
()
{
return
GetContextAs
<
TrafficLight
RightTurnUnprotected
Context
>
();
TrafficLight
UnprotectedRightTurn
Context
*
GetContext
()
{
return
GetContextAs
<
TrafficLight
UnprotectedRightTurn
Context
>
();
}
private:
...
...
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_stop.h
浏览文件 @
0856de6b
...
...
@@ -32,7 +32,7 @@ namespace planning {
namespace
scenario
{
namespace
traffic_light
{
struct
TrafficLight
RightTurnUnprotected
Context
;
struct
TrafficLight
UnprotectedRightTurn
Context
;
class
StageStop
:
public
Stage
{
public:
...
...
@@ -43,8 +43,8 @@ class StageStop : public Stage {
Stage
::
StageStatus
Process
(
const
common
::
TrajectoryPoint
&
planning_init_point
,
Frame
*
frame
)
override
;
TrafficLight
RightTurnUnprotected
Context
*
GetContext
()
{
return
GetContextAs
<
TrafficLight
RightTurnUnprotected
Context
>
();
TrafficLight
UnprotectedRightTurn
Context
*
GetContext
()
{
return
GetContextAs
<
TrafficLight
UnprotectedRightTurn
Context
>
();
}
private:
...
...
modules/planning/scenarios/traffic_light/unprotected_right_turn/traffic_light_unprotected_right_turn_scenario.cc
浏览文件 @
0856de6b
...
...
@@ -41,7 +41,7 @@ namespace traffic_light {
using
hdmap
::
HDMapUtil
;
using
perception
::
TrafficLight
;
void
TrafficLight
RightTurnUnprotected
Scenario
::
Init
()
{
void
TrafficLight
UnprotectedRightTurn
Scenario
::
Init
()
{
if
(
init_
)
{
return
;
}
...
...
@@ -73,9 +73,9 @@ void TrafficLightRightTurnUnprotectedScenario::Init() {
apollo
::
common
::
util
::
Factory
<
ScenarioConfig
::
StageType
,
Stage
,
Stage
*
(
*
)(
const
ScenarioConfig
::
StageConfig
&
stage_config
)
>
TrafficLight
RightTurnUnprotected
Scenario
::
s_stage_factory_
;
TrafficLight
UnprotectedRightTurn
Scenario
::
s_stage_factory_
;
void
TrafficLight
RightTurnUnprotected
Scenario
::
RegisterStages
()
{
void
TrafficLight
UnprotectedRightTurn
Scenario
::
RegisterStages
()
{
if
(
!
s_stage_factory_
.
Empty
())
{
s_stage_factory_
.
Clear
();
}
...
...
@@ -96,7 +96,7 @@ void TrafficLightRightTurnUnprotectedScenario::RegisterStages() {
});
}
std
::
unique_ptr
<
Stage
>
TrafficLight
RightTurnUnprotected
Scenario
::
CreateStage
(
std
::
unique_ptr
<
Stage
>
TrafficLight
UnprotectedRightTurn
Scenario
::
CreateStage
(
const
ScenarioConfig
::
StageConfig
&
stage_config
)
{
if
(
s_stage_factory_
.
Empty
())
{
RegisterStages
();
...
...
@@ -109,7 +109,7 @@ std::unique_ptr<Stage> TrafficLightRightTurnUnprotectedScenario::CreateStage(
return
ptr
;
}
bool
TrafficLight
RightTurnUnprotected
Scenario
::
IsTransferable
(
bool
TrafficLight
UnprotectedRightTurn
Scenario
::
IsTransferable
(
const
Scenario
&
current_scenario
,
const
common
::
TrajectoryPoint
&
ego_point
,
const
Frame
&
frame
)
{
...
...
@@ -167,7 +167,7 @@ bool TrafficLightRightTurnUnprotectedScenario::IsTransferable(
/*
* read scenario specific configs and set in context_ for stages to read
*/
bool
TrafficLight
RightTurnUnprotected
Scenario
::
GetScenarioConfig
()
{
bool
TrafficLight
UnprotectedRightTurn
Scenario
::
GetScenarioConfig
()
{
if
(
!
config_
.
has_traffic_light_unprotected_right_turn_config
())
{
AERROR
<<
"miss scenario specific config"
;
return
false
;
...
...
modules/planning/scenarios/traffic_light/unprotected_right_turn/traffic_light_unprotected_right_turn_scenario.h
浏览文件 @
0856de6b
...
...
@@ -35,16 +35,16 @@ namespace scenario {
namespace
traffic_light
{
// stage context
struct
TrafficLight
RightTurnUnprotected
Context
{
struct
TrafficLight
UnprotectedRightTurn
Context
{
ScenarioTrafficLightUnprotectedRightTurnConfig
scenario_config
;
std
::
string
traffic_light_id
;
double
stop_start_time
=
0.0
;
double
creep_start_time
;
};
class
TrafficLight
RightTurnUnprotected
Scenario
:
public
Scenario
{
class
TrafficLight
UnprotectedRightTurn
Scenario
:
public
Scenario
{
public:
explicit
TrafficLight
RightTurnUnprotected
Scenario
(
explicit
TrafficLight
UnprotectedRightTurn
Scenario
(
const
ScenarioConfig
&
config
,
const
ScenarioContext
*
context
)
:
Scenario
(
config
,
context
)
{}
...
...
@@ -57,7 +57,7 @@ class TrafficLightRightTurnUnprotectedScenario : public Scenario {
const
common
::
TrajectoryPoint
&
ego_point
,
const
Frame
&
frame
)
override
;
TrafficLight
RightTurnUnprotected
Context
*
GetContext
()
{
return
&
context_
;
}
TrafficLight
UnprotectedRightTurn
Context
*
GetContext
()
{
return
&
context_
;
}
private:
static
void
RegisterStages
();
...
...
@@ -65,7 +65,7 @@ class TrafficLightRightTurnUnprotectedScenario : public Scenario {
private:
bool
init_
=
false
;
TrafficLight
RightTurnUnprotected
Context
context_
;
TrafficLight
UnprotectedRightTurn
Context
context_
;
hdmap
::
SignalInfoConstPtr
traffic_light_
=
nullptr
;
...
...
modules/planning/scenarios/traffic_light/unprotected_right_turn/traffic_light_unprotected_right_turn_scenario_test.cc
浏览文件 @
0856de6b
...
...
@@ -33,15 +33,15 @@ namespace planning {
namespace
scenario
{
namespace
traffic_light
{
class
TrafficLight
RightTurnUnprotected
ScenarioTest
:
public
::
testing
::
Test
{
class
TrafficLight
UnprotectedRightTurn
ScenarioTest
:
public
::
testing
::
Test
{
public:
virtual
void
SetUp
()
{}
protected:
std
::
unique_ptr
<
TrafficLight
RightTurnUnprotected
Scenario
>
scenario_
;
std
::
unique_ptr
<
TrafficLight
UnprotectedRightTurn
Scenario
>
scenario_
;
};
TEST_F
(
TrafficLight
RightTurnUnprotected
ScenarioTest
,
VerifyConf
)
{
TEST_F
(
TrafficLight
UnprotectedRightTurn
ScenarioTest
,
VerifyConf
)
{
FLAGS_scenario_traffic_light_unprotected_right_turn_config_file
=
"/apollo/modules/planning/conf/"
"scenario/traffic_light_unprotected_right_turn_config.pb.txt"
;
...
...
@@ -52,7 +52,7 @@ TEST_F(TrafficLightRightTurnUnprotectedScenarioTest, VerifyConf) {
&
config
));
}
TEST_F
(
TrafficLight
RightTurnUnprotected
ScenarioTest
,
Init
)
{
TEST_F
(
TrafficLight
UnprotectedRightTurn
ScenarioTest
,
Init
)
{
FLAGS_scenario_traffic_light_unprotected_right_turn_config_file
=
"/apollo/modules/planning/testdata/conf/"
"scenario/traffic_light_unprotected_right_turn_config.pb.txt"
;
...
...
@@ -63,7 +63,7 @@ TEST_F(TrafficLightRightTurnUnprotectedScenarioTest, Init) {
&
config
));
ScenarioContext
context
;
scenario_
.
reset
(
new
TrafficLight
RightTurnUnprotected
Scenario
(
config
,
scenario_
.
reset
(
new
TrafficLight
UnprotectedRightTurn
Scenario
(
config
,
&
context
));
EXPECT_EQ
(
scenario_
->
scenario_type
(),
ScenarioConfig
::
TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录