Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
d654e82d
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,发现更多精彩内容 >>
提交
d654e82d
编写于
5月 21, 2019
作者:
Q
Qi Luo
提交者:
Xiangquan Xiao
5月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: Add combine path/speed profile for Hybrid Astar results
上级
10d9ee85
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
62 addition
and
0 deletion
+62
-0
modules/planning/open_space/coarse_trajectory_generator/hybrid_a_star.cc
...g/open_space/coarse_trajectory_generator/hybrid_a_star.cc
+59
-0
modules/planning/open_space/coarse_trajectory_generator/hybrid_a_star.h
...ng/open_space/coarse_trajectory_generator/hybrid_a_star.h
+3
-0
未找到文件。
modules/planning/open_space/coarse_trajectory_generator/hybrid_a_star.cc
浏览文件 @
d654e82d
...
...
@@ -438,6 +438,56 @@ bool HybridAStar::GenerateSCurveSpeedAcceleration(HybridAStartResult* result) {
return
true
;
}
bool
HybridAStar
::
CombinePathAndSpeedProfile
(
const
PathData
&
path_data
,
const
SpeedData
&
speed_data
,
HybridAStartResult
*
result
)
{
CHECK
(
result
!=
nullptr
);
// Clear the result
result
->
x
.
clear
();
result
->
y
.
clear
();
result
->
phi
.
clear
();
result
->
v
.
clear
();
result
->
a
.
clear
();
result
->
steer
.
clear
();
result
->
accumulated_s
.
clear
();
if
(
path_data
.
discretized_path
().
empty
())
{
AWARN
<<
"path data is empty"
;
return
false
;
}
// TODO(QiL): load 0.05 from configs
for
(
double
cur_rel_time
=
0.0
;
cur_rel_time
<
speed_data
.
TotalTime
();
cur_rel_time
+=
0.05
)
{
common
::
SpeedPoint
speed_point
;
if
(
!
speed_data
.
EvaluateByTime
(
cur_rel_time
,
&
speed_point
))
{
AERROR
<<
"Fail to get speed point with relative time "
<<
cur_rel_time
;
return
false
;
}
if
(
speed_point
.
s
()
>
path_data
.
discretized_path
().
Length
())
{
break
;
}
common
::
PathPoint
path_point
;
if
(
!
path_data
.
GetPathPointWithPathS
(
speed_point
.
s
(),
&
path_point
))
{
AERROR
<<
"Fail to get path data with s "
<<
speed_point
.
s
()
<<
"path total length "
<<
path_data
.
discretized_path
().
Length
();
return
false
;
}
path_point
.
set_s
(
path_point
.
s
());
result
->
x
.
push_back
(
path_point
.
x
());
result
->
y
.
push_back
(
path_point
.
y
());
result
->
phi
.
push_back
(
path_point
.
theta
());
result
->
v
.
push_back
(
speed_point
.
v
());
result
->
a
.
push_back
(
speed_point
.
a
());
// TODO(QiL): update steer.
result
->
accumulated_s
.
push_back
(
speed_point
.
s
());
}
return
true
;
}
bool
HybridAStar
::
TrajectoryPartition
(
const
HybridAStartResult
&
result
,
std
::
vector
<
HybridAStartResult
>*
partitioned_result
)
{
...
...
@@ -490,6 +540,15 @@ bool HybridAStar::TrajectoryPartition(
AERROR
<<
"GenerateSCurveSpeedAcceleration fail"
;
return
false
;
}
// TODO: generate PathData and SpeedData from results and combine
// profiles.
PathData
path_data
;
SpeedData
speed_data
;
DiscretizedTrajectory
discretized_trajectory
;
if
(
!
CombinePathAndSpeedProfile
(
path_data
,
speed_data
,
&
result
))
{
return
false
;
}
}
else
{
if
(
!
GenerateSpeedAcceleration
(
&
result
))
{
AERROR
<<
"GenerateSpeedAcceleration fail"
;
...
...
modules/planning/open_space/coarse_trajectory_generator/hybrid_a_star.h
浏览文件 @
d654e82d
...
...
@@ -93,6 +93,9 @@ class HybridAStar {
bool
GetTemporalProfile
(
HybridAStartResult
*
result
);
bool
GenerateSpeedAcceleration
(
HybridAStartResult
*
result
);
bool
GenerateSCurveSpeedAcceleration
(
HybridAStartResult
*
result
);
bool
CombinePathAndSpeedProfile
(
const
PathData
&
path_data
,
const
SpeedData
&
speed_data
,
HybridAStartResult
*
result
);
private:
PlannerOpenSpaceConfig
planner_open_space_config_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录