Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
57c321ca
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,发现更多精彩内容 >>
提交
57c321ca
编写于
11月 03, 2017
作者:
D
Dong Li
提交者:
Jiangtao Hu
11月 03, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: fix the length in path_data generated by DP algorithm
上级
3165f71e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
21 deletion
+14
-21
modules/planning/tasks/dp_poly_path/dp_road_graph.cc
modules/planning/tasks/dp_poly_path/dp_road_graph.cc
+11
-18
modules/planning/testdata/sunnyvale_loop_test/result_follow_03_0.pb.txt
...ng/testdata/sunnyvale_loop_test/result_follow_03_0.pb.txt
+3
-3
未找到文件。
modules/planning/tasks/dp_poly_path/dp_road_graph.cc
浏览文件 @
57c321ca
...
@@ -72,8 +72,6 @@ bool DPRoadGraph::FindPathTunnel(
...
@@ -72,8 +72,6 @@ bool DPRoadGraph::FindPathTunnel(
double
accumulated_s
=
init_sl_point_
.
s
();
double
accumulated_s
=
init_sl_point_
.
s
();
const
double
path_resolution
=
config_
.
path_resolution
();
const
double
path_resolution
=
config_
.
path_resolution
();
constexpr
double
kEpsilon
=
std
::
numeric_limits
<
double
>::
epsilon
();
for
(
std
::
size_t
i
=
1
;
i
<
min_cost_path
.
size
();
++
i
)
{
for
(
std
::
size_t
i
=
1
;
i
<
min_cost_path
.
size
();
++
i
)
{
const
auto
&
prev_node
=
min_cost_path
[
i
-
1
];
const
auto
&
prev_node
=
min_cost_path
[
i
-
1
];
const
auto
&
cur_node
=
min_cost_path
[
i
];
const
auto
&
cur_node
=
min_cost_path
[
i
];
...
@@ -81,7 +79,7 @@ bool DPRoadGraph::FindPathTunnel(
...
@@ -81,7 +79,7 @@ bool DPRoadGraph::FindPathTunnel(
const
double
path_length
=
cur_node
.
sl_point
.
s
()
-
prev_node
.
sl_point
.
s
();
const
double
path_length
=
cur_node
.
sl_point
.
s
()
-
prev_node
.
sl_point
.
s
();
double
current_s
=
0.0
;
double
current_s
=
0.0
;
const
auto
&
curve
=
cur_node
.
min_cost_curve
;
const
auto
&
curve
=
cur_node
.
min_cost_curve
;
while
(
current_s
+
kEpsilon
<
path_length
)
{
while
(
current_s
+
path_resolution
/
2.0
<
path_length
)
{
const
double
l
=
curve
.
Evaluate
(
0
,
current_s
);
const
double
l
=
curve
.
Evaluate
(
0
,
current_s
);
const
double
dl
=
curve
.
Evaluate
(
1
,
current_s
);
const
double
dl
=
curve
.
Evaluate
(
1
,
current_s
);
const
double
ddl
=
curve
.
Evaluate
(
2
,
current_s
);
const
double
ddl
=
curve
.
Evaluate
(
2
,
current_s
);
...
@@ -93,7 +91,11 @@ bool DPRoadGraph::FindPathTunnel(
...
@@ -93,7 +91,11 @@ bool DPRoadGraph::FindPathTunnel(
frenet_path
.
push_back
(
std
::
move
(
frenet_frame_point
));
frenet_path
.
push_back
(
std
::
move
(
frenet_frame_point
));
current_s
+=
path_resolution
;
current_s
+=
path_resolution
;
}
}
accumulated_s
+=
path_length
;
if
(
i
==
min_cost_path
.
size
()
-
1
)
{
accumulated_s
+=
current_s
;
}
else
{
accumulated_s
+=
path_length
;
}
}
}
FrenetFramePath
tunnel
(
frenet_path
);
FrenetFramePath
tunnel
(
frenet_path
);
path_data
->
SetReferenceLine
(
&
reference_line_
);
path_data
->
SetReferenceLine
(
&
reference_line_
);
...
@@ -161,25 +163,16 @@ bool DPRoadGraph::GenerateMinCostPath(
...
@@ -161,25 +163,16 @@ bool DPRoadGraph::GenerateMinCostPath(
bool
DPRoadGraph
::
SamplePathWaypoints
(
bool
DPRoadGraph
::
SamplePathWaypoints
(
const
common
::
TrajectoryPoint
&
init_point
,
const
common
::
TrajectoryPoint
&
init_point
,
std
::
vector
<
std
::
vector
<
common
::
SLPoint
>>
*
const
points
)
{
std
::
vector
<
std
::
vector
<
common
::
SLPoint
>>
*
const
points
)
{
constexpr
double
kSamplePointLookForwardTime
=
1.0
;
CHECK
(
points
!=
nullptr
);
CHECK
(
points
!=
nullptr
);
common
::
math
::
Vec2d
init_cartesian_point
(
init_point
.
path_point
().
x
(),
const
double
reference_line_length
=
reference_line_
.
Length
();
init_point
.
path_point
().
y
());
common
::
SLPoint
init_sl_point
;
if
(
!
reference_line_
.
XYToSL
(
init_cartesian_point
,
&
init_sl_point
))
{
AERROR
<<
"Failed to get sl point from point "
<<
init_cartesian_point
.
DebugString
();
return
false
;
}
const
double
reference_line_length
=
reference_line_
.
map_path
().
accumulated_s
().
back
();
double
level_distance
=
double
level_distance
=
std
::
fmax
(
config_
.
step_length_min
(),
std
::
fmax
(
config_
.
step_length_min
(),
std
::
fmin
(
init_point
.
v
()
,
config_
.
step_length_max
()));
std
::
fmin
(
init_point
.
v
()
*
kSamplePointLookForwardTime
,
config_
.
step_length_max
()));
double
accumulated_s
=
init_sl_point
.
s
();
double
accumulated_s
=
init_sl_point
_
.
s
();
for
(
std
::
size_t
i
=
0
;
accumulated_s
<
reference_line_length
;
++
i
)
{
for
(
std
::
size_t
i
=
0
;
accumulated_s
<
reference_line_length
;
++
i
)
{
std
::
vector
<
common
::
SLPoint
>
level_points
;
std
::
vector
<
common
::
SLPoint
>
level_points
;
accumulated_s
+=
level_distance
;
accumulated_s
+=
level_distance
;
...
...
modules/planning/testdata/sunnyvale_loop_test/result_follow_03_0.pb.txt
浏览文件 @
57c321ca
...
@@ -1166,11 +1166,11 @@ decision {
...
@@ -1166,11 +1166,11 @@ decision {
follow {
follow {
distance_s: -10
distance_s: -10
fence_point {
fence_point {
x: 587257.4
6692710358
x: 587257.4
9634319346
y: 4140942.
1245008437
y: 4140942.
223678661
z: 0
z: 0
}
}
fence_heading: -1.8
60146918620373
fence_heading: -1.8
586265241375961
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录