Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
e83d4634
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,发现更多精彩内容 >>
提交
e83d4634
编写于
9月 06, 2020
作者:
S
Shu Jiang
提交者:
Jinyun Zhou
9月 10, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: added stitching to path reference
上级
980786c6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
28 deletion
+9
-28
modules/planning/tasks/deciders/path_reference_decider/path_reference_decider.cc
...deciders/path_reference_decider/path_reference_decider.cc
+9
-28
未找到文件。
modules/planning/tasks/deciders/path_reference_decider/path_reference_decider.cc
浏览文件 @
e83d4634
...
...
@@ -23,13 +23,14 @@
#include <utility>
#include <vector>
#include "modules/planning/proto/planning_config.pb.h"
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/common/math/box2d.h"
#include "modules/common/math/line_segment2d.h"
#include "modules/planning/common/path/discretized_path.h"
#include "modules/planning/common/path_boundary.h"
#include "modules/planning/common/planning_context.h"
#include "modules/planning/proto/planning_config.pb.h"
#include "modules/planning/tasks/task.h"
namespace
apollo
{
...
...
@@ -162,7 +163,12 @@ Status PathReferenceDecider::Process(Frame *frame,
return
Status
::
OK
();
}
std
::
vector
<
PathPoint
>
path_reference
;
ConvertTrajectoryToPath
(
learning_model_trajectory
,
&
path_reference
);
// adjusting trajectory init point
DiscretizedTrajectory
stitched_learning_model_trajectory
;
reference_line_info
->
AdjustTrajectoryWhichStartsFromCurrentPos
(
frame
->
PlanningStartPoint
(),
learning_model_trajectory
,
&
stitched_learning_model_trajectory
);
ConvertTrajectoryToPath
(
stitched_learning_model_trajectory
,
&
path_reference
);
const
std
::
string
path_reference_name
=
"path_reference"
;
RecordDebugInfo
(
path_reference
,
path_reference_name
,
reference_line_info
);
...
...
@@ -439,37 +445,12 @@ void PathReferenceDecider::RecordDebugInfo(
// Sanity checks.
ACHECK
(
!
path_points
.
empty
());
CHECK_NOTNULL
(
reference_line_info
);
// Take learning model output and transform it into
// PathData so that it can be displayed in simulator.
std
::
vector
<
common
::
FrenetFramePoint
>
frenet_frame_path_points
;
for
(
const
PathPoint
&
path_point
:
path_points
)
{
common
::
SLPoint
point_sl
;
reference_line_info
->
reference_line
().
XYToSL
(
{
path_point
.
x
(),
path_point
.
y
()},
&
point_sl
);
common
::
FrenetFramePoint
frenet_frame_point
;
frenet_frame_point
.
set_s
(
point_sl
.
s
());
frenet_frame_point
.
set_dl
(
0.0
);
frenet_frame_point
.
set_ddl
(
0.0
);
// get l from reference line
frenet_frame_point
.
set_l
(
point_sl
.
l
());
frenet_frame_path_points
.
push_back
(
frenet_frame_point
);
}
auto
frenet_frame_path_reference
=
FrenetFramePath
(
std
::
move
(
frenet_frame_path_points
));
PathData
path_reference_data
;
path_reference_data
.
SetReferenceLine
(
&
(
reference_line_info
->
reference_line
()));
path_reference_data
.
SetFrenetPath
(
std
::
move
(
frenet_frame_path_reference
));
// Insert the transformed PathData into the simulator display.
auto
*
ptr_display_path
=
reference_line_info
->
mutable_debug
()
->
mutable_planning_data
()
->
add_path
();
ptr_display_path
->
set_name
(
path_name
);
ptr_display_path
->
mutable_path_point
()
->
CopyFrom
(
{
path_reference_data
.
discretized_path
().
begin
(),
path_reference_data
.
discretized_path
().
end
()});
{
path_points
.
begin
(),
path_points
.
end
()});
}
}
// namespace planning
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录