Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
a21215a9
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,发现更多精彩内容 >>
提交
a21215a9
编写于
12月 04, 2018
作者:
L
Liangliang Zhang
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: fixed offroad detection during sampling.
上级
72d26908
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
3263 addition
and
3244 deletion
+3263
-3244
modules/planning/testdata/garage_test/result_follow_0.pb.txt
modules/planning/testdata/garage_test/result_follow_0.pb.txt
+790
-790
modules/planning/testdata/sunnyvale_big_loop_test/result_crosswalk_02_0.pb.txt
...data/sunnyvale_big_loop_test/result_crosswalk_02_0.pb.txt
+4
-4
modules/planning/testdata/sunnyvale_big_loop_test/result_crosswalk_02_1.pb.txt
...data/sunnyvale_big_loop_test/result_crosswalk_02_1.pb.txt
+4
-4
modules/planning/testdata/sunnyvale_big_loop_test/result_keep_clear_02_0.pb.txt
...ata/sunnyvale_big_loop_test/result_keep_clear_02_0.pb.txt
+2
-2
modules/planning/testdata/sunnyvale_loop_test/result_cruise_0.pb.txt
...nning/testdata/sunnyvale_loop_test/result_cruise_0.pb.txt
+666
-666
modules/planning/testdata/sunnyvale_loop_test/result_qp_path_failure_0.pb.txt
...tdata/sunnyvale_loop_test/result_qp_path_failure_0.pb.txt
+882
-882
modules/planning/testdata/sunnyvale_loop_test/result_slowdown_01_0.pb.txt
.../testdata/sunnyvale_loop_test/result_slowdown_01_0.pb.txt
+884
-884
modules/planning/toolkits/optimizers/road_graph/trajectory_cost.cc
...lanning/toolkits/optimizers/road_graph/trajectory_cost.cc
+29
-12
modules/planning/toolkits/optimizers/road_graph/trajectory_cost.h
...planning/toolkits/optimizers/road_graph/trajectory_cost.h
+2
-0
未找到文件。
modules/planning/testdata/garage_test/result_follow_0.pb.txt
浏览文件 @
a21215a9
此差异已折叠。
点击以展开。
modules/planning/testdata/sunnyvale_big_loop_test/result_crosswalk_02_0.pb.txt
浏览文件 @
a21215a9
...
...
@@ -24,8 +24,8 @@ decision {
follow {
distance_s: -3
fence_point {
x: 586260.
3021870852
7
y: 4141284.
1751651387
x: 586260.
2776963745
7
y: 4141284.
2721197936
z: 0
}
fence_heading: -1.3299784970826325
...
...
@@ -39,8 +39,8 @@ decision {
follow {
distance_s: -3
fence_point {
x: 586260.2
5445978157
y: 4141284.
3693824667
x: 586260.2
4285396188
y: 4141284.
4180168672
z: 0
}
fence_heading: -1.3430782827827037
...
...
modules/planning/testdata/sunnyvale_big_loop_test/result_crosswalk_02_1.pb.txt
浏览文件 @
a21215a9
...
...
@@ -17,8 +17,8 @@ decision {
follow {
distance_s: -3
fence_point {
x: 586260.
3021870852
7
y: 4141284.
1751651387
x: 586260.
2776963745
7
y: 4141284.
2721197936
z: 0
}
fence_heading: -1.3299784970826325
...
...
@@ -32,8 +32,8 @@ decision {
follow {
distance_s: -3
fence_point {
x: 586260.2
5445978157
y: 4141284.
3693824667
x: 586260.2
4285396188
y: 4141284.
4180168672
z: 0
}
fence_heading: -1.3430782827827037
...
...
modules/planning/testdata/sunnyvale_big_loop_test/result_keep_clear_02_0.pb.txt
浏览文件 @
a21215a9
...
...
@@ -24,8 +24,8 @@ decision {
follow {
distance_s: -5.4097223281860352
fence_point {
x: 586426.497
58902891
y: 4140685.46
10236813
x: 586426.497
39531986
y: 4140685.46
01982441
z: 0
}
fence_heading: 1.3398228192102641
...
...
modules/planning/testdata/sunnyvale_loop_test/result_cruise_0.pb.txt
浏览文件 @
a21215a9
此差异已折叠。
点击以展开。
modules/planning/testdata/sunnyvale_loop_test/result_qp_path_failure_0.pb.txt
浏览文件 @
a21215a9
此差异已折叠。
点击以展开。
modules/planning/testdata/sunnyvale_loop_test/result_slowdown_01_0.pb.txt
浏览文件 @
a21215a9
此差异已折叠。
点击以展开。
modules/planning/toolkits/optimizers/road_graph/trajectory_cost.cc
浏览文件 @
a21215a9
...
...
@@ -118,27 +118,17 @@ ComparableCost TrajectoryCost::CalculatePathCost(
return
(
b
+
std
::
exp
(
-
k
*
(
x
-
l0
)))
/
(
1.0
+
std
::
exp
(
-
k
*
(
x
-
l0
)));
};
const
auto
&
vehicle_config
=
common
::
VehicleConfigHelper
::
Instance
()
->
GetConfig
();
const
double
width
=
vehicle_config
.
vehicle_param
().
width
();
for
(
double
curve_s
=
0.0
;
curve_s
<
(
end_s
-
start_s
);
curve_s
+=
config_
.
path_resolution
())
{
const
double
l
=
curve
.
Evaluate
(
0
,
curve_s
);
path_cost
+=
l
*
l
*
config_
.
path_l_cost
()
*
quasi_softmax
(
std
::
fabs
(
l
));
double
left_width
=
0.0
;
double
right_width
=
0.0
;
reference_line_
->
GetLaneWidth
(
curve_s
+
start_s
,
&
left_width
,
&
right_width
);
constexpr
double
kBuff
=
0.2
;
if
(
!
is_change_lane_path_
&&
(
l
+
width
/
2.0
+
kBuff
>
left_width
||
l
-
width
/
2.0
-
kBuff
<
-
right_width
))
{
const
double
dl
=
std
::
fabs
(
curve
.
Evaluate
(
1
,
curve_s
));
if
(
!
is_change_lane_path_
&&
IsOffRoad
(
curve_s
+
start_s
,
l
,
dl
))
{
cost
.
cost_items
[
ComparableCost
::
OUT_OF_BOUNDARY
]
=
true
;
}
const
double
dl
=
std
::
fabs
(
curve
.
Evaluate
(
1
,
curve_s
));
path_cost
+=
dl
*
dl
*
config_
.
path_dl_cost
();
const
double
ddl
=
std
::
fabs
(
curve
.
Evaluate
(
2
,
curve_s
));
...
...
@@ -155,6 +145,33 @@ ComparableCost TrajectoryCost::CalculatePathCost(
return
cost
;
}
bool
TrajectoryCost
::
IsOffRoad
(
const
double
ref_s
,
const
double
l
,
const
double
dl
)
{
Vec2d
position
(
ref_s
,
l
);
const
auto
&
param
=
common
::
VehicleConfigHelper
::
GetConfig
().
vehicle_param
();
Vec2d
vec_to_center
(
(
param
.
front_edge_to_center
()
-
param
.
back_edge_to_center
())
/
2.0
,
(
param
.
left_edge_to_center
()
-
param
.
right_edge_to_center
())
/
2.0
);
Vec2d
center
(
position
+
vec_to_center
.
rotate
(
std
::
atan
(
dl
)));
const
double
buffer
=
0.1
;
// in meters
const
auto
ego_box
=
Box2d
(
center
,
std
::
atan
(
dl
),
param
.
length
()
+
buffer
,
param
.
width
()
+
buffer
);
double
left_width
=
0.0
;
double
right_width
=
0.0
;
reference_line_
->
GetLaneWidth
(
ref_s
,
&
left_width
,
&
right_width
);
for
(
const
auto
&
corner
:
ego_box
.
GetAllCorners
())
{
if
(
corner
.
y
()
>
left_width
||
corner
.
y
()
<
-
right_width
)
{
return
true
;
}
}
return
false
;
}
ComparableCost
TrajectoryCost
::
CalculateStaticObstacleCost
(
const
QuinticPolynomialCurve1d
&
curve
,
const
double
start_s
,
const
double
end_s
)
{
...
...
modules/planning/toolkits/optimizers/road_graph/trajectory_cost.h
浏览文件 @
a21215a9
...
...
@@ -73,6 +73,8 @@ class TrajectoryCost {
common
::
math
::
Box2d
GetBoxFromSLPoint
(
const
common
::
SLPoint
&
sl
,
const
double
dl
)
const
;
bool
IsOffRoad
(
const
double
ref_s
,
const
double
l
,
const
double
dl
);
const
DpPolyPathConfig
config_
;
const
ReferenceLine
*
reference_line_
=
nullptr
;
bool
is_change_lane_path_
=
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录