Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
e7e9d6c2
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,体验更适合开发者的 AI 搜索 >>
提交
e7e9d6c2
编写于
3月 06, 2019
作者:
J
jmtao
提交者:
Yajia Zhang
3月 06, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: intersection_cruise stage for traffic_light_unprotected_right_turn scenario
上级
fcc0447a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
27 deletion
+31
-27
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_intersection_cruise.cc
...light/unprotected_right_turn/stage_intersection_cruise.cc
+31
-27
未找到文件。
modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_intersection_cruise.cc
浏览文件 @
e7e9d6c2
...
...
@@ -17,20 +17,13 @@
/**
* @file
**/
#include <string>
#include <vector>
#include "modules/planning/scenarios/traffic_light/unprotected_right_turn/stage_intersection_cruise.h"
#include "modules/perception/proto/perception_obstacle.pb.h"
#include "cyber/common/log.h"
#include "modules/common/time/time.h"
#include "modules/common/vehicle_state/vehicle_state_provider.h"
#include "modules/planning/common/frame.h"
#include "modules/planning/common/planning_context.h"
#include "modules/planning/tasks/deciders/decider_creep.h"
#include "modules/planning/scenarios/util/util.h"
namespace
apollo
{
namespace
planning
{
...
...
@@ -38,11 +31,9 @@ namespace scenario {
namespace
traffic_light
{
using
common
::
TrajectoryPoint
;
using
hdmap
::
PathOverlap
;
Stage
::
StageStatus
TrafficLightUnprotectedRightTurnStageIntersectionCruise
::
Process
(
const
TrajectoryPoint
&
planning_init_point
,
Frame
*
frame
)
{
ADEBUG
<<
"stage: IntersectionCruise"
;
CHECK_NOTNULL
(
frame
);
...
...
@@ -50,30 +41,43 @@ TrafficLightUnprotectedRightTurnStageIntersectionCruise::Process(
bool
plan_ok
=
ExecuteTaskOnReferenceLine
(
planning_init_point
,
frame
);
if
(
!
plan_ok
)
{
AERROR
<<
"TrafficLightUnprotectedRightTurnStageIntersectionCruise "
<<
"plan error"
;
<<
"plan error"
;
}
/* TODO(all): to be fixed
const
auto
&
reference_line_info
=
frame
->
reference_line_info
().
front
();
// check if the traffic_light is still along reference_line
std::string traffic_light_overlap_id =
PlanningContext::GetScenarioInfo()->next_traffic_light_overlap.object_id;
if (CheckTrafficLightDone(reference_line_info, traffic_light_overlap_id)) {
return FinishScenario();
// check pass pnc_junction
// TODO(all): remove when pnc_junction completely available on map
const
auto
&
pnc_junction_overlaps
=
reference_line_info
.
reference_line
().
map_path
().
pnc_junction_overlaps
();
if
(
pnc_junction_overlaps
.
size
()
==
0
)
{
// pnc_junction not exist on map, use current traffic_light's end_s
if
(
PlanningContext
::
GetScenarioInfo
()
->
current_traffic_light_overlaps
.
size
()
==
0
)
{
return
FinishStage
();
}
constexpr
double
kIntersectionPassDist
=
20.0
;
// unit: m
const
double
adc_back_edge_s
=
reference_line_info
.
AdcSlBoundary
().
start_s
();
const
double
traffic_light_end_s
=
PlanningContext
::
GetScenarioInfo
()
->
current_traffic_light_overlaps
[
0
].
end_s
;
const
double
distance_adc_pass_traffic_light
=
adc_back_edge_s
-
traffic_light_end_s
;
ADEBUG
<<
"distance_adc_pass_traffic_light["
<<
distance_adc_pass_traffic_light
<<
"] traffic_light_end_s["
<<
traffic_light_end_s
<<
"]"
;
if
(
distance_adc_pass_traffic_light
>=
kIntersectionPassDist
)
{
return
FinishStage
();
}
else
{
return
Stage
::
RUNNING
;
}
}
// check pass intersection
// TODO(all): update when pnc-junction is ready
constexpr double kIntersectionLength = 10.0; // unit: m
const double adc_back_edge_s = reference_line_info.AdcSlBoundary().start_s();
const double distance_adc_pass_traffic_light =
adc_back_edge_s -
PlanningContext::GetScenarioInfo()->next_traffic_light_overlap.end_s;
if (distance_adc_pass_traffic_light > kIntersectionLength) {
if
(
!
scenario
::
CheckInsidePnCJunction
(
reference_line_info
))
{
return
FinishStage
();
}
*/
return
Stage
::
RUNNING
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录