Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
8333ac3a
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,发现更多精彩内容 >>
提交
8333ac3a
编写于
11月 16, 2018
作者:
J
jmtao
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: add GetDrivingWidth() to ReferenceLine
上级
566fff40
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
33 deletion
+23
-33
modules/planning/reference_line/reference_line.cc
modules/planning/reference_line/reference_line.cc
+12
-0
modules/planning/reference_line/reference_line.h
modules/planning/reference_line/reference_line.h
+2
-0
modules/planning/scenarios/side_pass/side_pass_scenario.cc
modules/planning/scenarios/side_pass/side_pass_scenario.cc
+3
-11
modules/planning/scenarios/side_pass/side_pass_stage.cc
modules/planning/scenarios/side_pass/side_pass_stage.cc
+6
-22
未找到文件。
modules/planning/reference_line/reference_line.cc
浏览文件 @
8333ac3a
...
...
@@ -475,6 +475,18 @@ void ReferenceLine::GetLaneFromS(
}
}
double
ReferenceLine
::
GetDrivingWidth
(
const
SLBoundary
&
sl_boundary
)
const
{
double
lane_left_width
=
0.0
;
double
lane_right_width
=
0.0
;
GetLaneWidth
(
sl_boundary
.
start_s
(),
&
lane_left_width
,
&
lane_right_width
);
double
driving_width
=
std
::
max
(
lane_left_width
-
sl_boundary
.
end_l
(),
lane_right_width
+
sl_boundary
.
start_l
());
driving_width
=
std
::
min
(
lane_left_width
+
lane_right_width
,
driving_width
);
ADEBUG
<<
"driving_width["
<<
driving_width
<<
"]"
;
return
driving_width
;
}
bool
ReferenceLine
::
IsOnLane
(
const
common
::
math
::
Vec2d
&
vec2d_point
)
const
{
common
::
SLPoint
sl_point
;
if
(
!
XYToSL
(
vec2d_point
,
&
sl_point
))
{
...
...
modules/planning/reference_line/reference_line.h
浏览文件 @
8333ac3a
...
...
@@ -123,6 +123,8 @@ class ReferenceLine {
void
GetLaneFromS
(
const
double
s
,
std
::
vector
<
hdmap
::
LaneInfoConstPtr
>*
lanes
)
const
;
double
GetDrivingWidth
(
const
SLBoundary
&
sl_boundary
)
const
;
/**
* @brief: check if a box/point is on lane along reference line
*/
...
...
modules/planning/scenarios/side_pass/side_pass_scenario.cc
浏览文件 @
8333ac3a
...
...
@@ -188,19 +188,11 @@ bool SidePassScenario::HasBlockingObstacle(const Frame& frame) {
continue
;
}
// check
l
// check
driving_width
constexpr
double
kLBufferThreshold
=
0.3
;
// unit: m
const
auto
&
reference_line
=
reference_line_info
.
reference_line
();
double
lane_left_width
=
0.0
;
double
lane_right_width
=
0.0
;
reference_line
.
GetLaneWidth
(
obstacle
->
PerceptionSLBoundary
().
start_s
(),
&
lane_left_width
,
&
lane_right_width
);
double
driving_width
=
std
::
max
(
lane_left_width
-
obstacle
->
PerceptionSLBoundary
().
end_l
(),
lane_right_width
+
obstacle
->
PerceptionSLBoundary
().
start_l
());
driving_width
=
std
::
min
(
lane_left_width
+
lane_right_width
,
driving_width
);
ADEBUG
<<
"driving_width["
<<
driving_width
<<
"]"
;
const
double
driving_width
=
reference_line
.
GetDrivingWidth
(
obstacle
->
PerceptionSLBoundary
());
const
double
adc_width
=
VehicleConfigHelper
::
GetConfig
().
vehicle_param
().
width
();
if
(
driving_width
-
adc_width
-
FLAGS_static_decision_nudge_l_buffer
>
...
...
modules/planning/scenarios/side_pass/side_pass_stage.cc
浏览文件 @
8333ac3a
...
...
@@ -73,20 +73,12 @@ Stage::StageStatus SidePassBackup::Process(
continue
;
}
// check
l
// check
driving_width
constexpr
double
kLBufferThreshold
=
0.3
;
// unit: m
const
auto
&
reference_line
=
frame
->
reference_line_info
().
front
().
reference_line
();
double
lane_left_width
=
0.0
;
double
lane_right_width
=
0.0
;
reference_line
.
GetLaneWidth
(
obstacle
->
PerceptionSLBoundary
().
start_s
(),
&
lane_left_width
,
&
lane_right_width
);
double
driving_width
=
std
::
max
(
lane_left_width
-
obstacle
->
PerceptionSLBoundary
().
end_l
(),
lane_right_width
+
obstacle
->
PerceptionSLBoundary
().
start_l
());
driving_width
=
std
::
min
(
lane_left_width
+
lane_right_width
,
driving_width
);
ADEBUG
<<
"driving_width["
<<
driving_width
<<
"]"
;
const
double
driving_width
=
reference_line
.
GetDrivingWidth
(
obstacle
->
PerceptionSLBoundary
());
const
double
adc_width
=
VehicleConfigHelper
::
GetConfig
().
vehicle_param
().
width
();
if
(
driving_width
-
adc_width
-
FLAGS_static_decision_nudge_l_buffer
>
...
...
@@ -146,20 +138,12 @@ Stage::StageStatus SidePassApproachObstacle::Process(
continue
;
}
// check
l
// check
driving_width
constexpr
double
kLBufferThreshold
=
0.3
;
// unit: m
const
auto
&
reference_line
=
frame
->
reference_line_info
().
front
().
reference_line
();
double
lane_left_width
=
0.0
;
double
lane_right_width
=
0.0
;
reference_line
.
GetLaneWidth
(
obstacle
->
PerceptionSLBoundary
().
start_s
(),
&
lane_left_width
,
&
lane_right_width
);
double
driving_width
=
std
::
max
(
lane_left_width
-
obstacle
->
PerceptionSLBoundary
().
end_l
(),
lane_right_width
+
obstacle
->
PerceptionSLBoundary
().
start_l
());
driving_width
=
std
::
min
(
lane_left_width
+
lane_right_width
,
driving_width
);
ADEBUG
<<
"driving_width["
<<
driving_width
<<
"]"
;
const
double
driving_width
=
reference_line
.
GetDrivingWidth
(
obstacle
->
PerceptionSLBoundary
());
const
double
adc_width
=
VehicleConfigHelper
::
GetConfig
().
vehicle_param
().
width
();
if
(
driving_width
-
adc_width
-
FLAGS_static_decision_nudge_l_buffer
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录