Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
5bc1d2ac
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,发现更多精彩内容 >>
提交
5bc1d2ac
编写于
8月 31, 2017
作者:
Z
Zhang Liangliang
提交者:
Dong Li
8月 31, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: use init planning point on last planning trajectory.
上级
2854fbe1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
12 deletion
+29
-12
modules/planning/common/frame.cc
modules/planning/common/frame.cc
+4
-4
modules/planning/common/reference_line_info.cc
modules/planning/common/reference_line_info.cc
+21
-6
modules/planning/common/reference_line_info.h
modules/planning/common/reference_line_info.h
+2
-0
modules/planning/planner/rtk/rtk_replay_planner_test.cc
modules/planning/planner/rtk/rtk_replay_planner_test.cc
+2
-2
未找到文件。
modules/planning/common/frame.cc
浏览文件 @
5bc1d2ac
...
...
@@ -94,8 +94,8 @@ bool Frame::InitReferenceLineInfo(
const
std
::
vector
<
ReferenceLine
>
&
reference_lines
)
{
reference_line_info_
.
clear
();
for
(
const
auto
&
reference_line
:
reference_lines
)
{
reference_line_info_
.
emplace_back
(
p
nc_map_
,
reference_line
,
smoother_config_
);
reference_line_info_
.
emplace_back
(
p
lanning_start_point_
,
pnc_map_
,
reference_line
,
smoother_config_
);
if
(
!
reference_line_info_
.
back
().
Init
())
{
AERROR
<<
"Failed to init reference line info"
;
return
false
;
...
...
@@ -122,8 +122,8 @@ bool Frame::Init(const PlanningConfig &config,
return
false
;
}
smoother_config_
=
config
.
reference_line_smoother_config
();
auto
reference_lines
=
CreateReferenceLineFromRouting
(
init_pose_
.
position
(),
routing_response_
);
auto
reference_lines
=
CreateReferenceLineFromRouting
(
init_pose_
.
position
(),
routing_response_
);
if
(
reference_lines
.
empty
())
{
AERROR
<<
"Failed to create reference line from position: "
<<
init_pose_
.
DebugString
();
...
...
modules/planning/common/reference_line_info.cc
浏览文件 @
5bc1d2ac
...
...
@@ -34,10 +34,16 @@
namespace
apollo
{
namespace
planning
{
using
TrajectoryPoint
=
apollo
::
common
::
TrajectoryPoint
;
using
Vec2d
=
apollo
::
common
::
math
::
Vec2d
;
using
SLPoint
=
apollo
::
common
::
SLPoint
;
ReferenceLineInfo
::
ReferenceLineInfo
(
const
hdmap
::
PncMap
*
pnc_map
,
const
ReferenceLine
&
reference_line
,
const
TrajectoryPoint
&
init_adc_point
,
const
hdmap
::
PncMap
*
pnc_map
,
const
ReferenceLine
&
reference_line
,
const
ReferenceLineSmootherConfig
&
smoother_config
)
:
pnc_map_
(
pnc_map
),
:
init_adc_point_
(
init_adc_point
),
pnc_map_
(
pnc_map
),
reference_line_
(
reference_line
),
smoother_config_
(
smoother_config
)
{}
...
...
@@ -58,14 +64,23 @@ bool ReferenceLineInfo::Init() {
}
bool
ReferenceLineInfo
::
CalculateAdcSmoothReferenLinePoint
()
{
SLPoint
adc_sl_on_raw_ref
;
if
(
!
reference_line_
.
XYToSL
(
Vec2d
(
init_adc_point_
.
path_point
().
x
(),
init_adc_point_
.
path_point
().
y
()),
&
adc_sl_on_raw_ref
))
{
AERROR
<<
"Fail to get sl point for init_adc_point. init_adc_point: "
<<
init_adc_point_
.
DebugString
();
return
false
;
}
const
double
backward_s
=
-
5.0
;
const
double
forward_s
=
10.0
;
const
double
delta_s
=
2.0
;
double
s
=
backward_s
+
adc_sl_
boundary_
.
start_
s
();
double
s
=
backward_s
+
adc_sl_
on_raw_ref
.
s
();
std
::
vector
<
ReferencePoint
>
local_ref_points
;
while
(
s
<=
forward_s
+
adc_sl_
boundary_
.
end_
s
())
{
while
(
s
<=
forward_s
+
adc_sl_
on_raw_ref
.
s
())
{
local_ref_points
.
push_back
(
reference_line_
.
GetReferencePoint
(
s
));
s
+=
delta_s
;
}
...
...
@@ -78,8 +93,8 @@ bool ReferenceLineInfo::CalculateAdcSmoothReferenLinePoint() {
AERROR
<<
"Failed to smooth reference line"
;
return
false
;
}
adc_smooth_ref_point_
=
smoothed_segment
.
GetReferencePoint
(
adc_sl_boundary_
.
end_s
());
adc_smooth_ref_point_
=
smoothed_segment
.
GetReferencePoint
(
init_adc_point_
.
path_point
().
x
(),
init_adc_point_
.
path_point
().
y
());
return
true
;
}
...
...
modules/planning/common/reference_line_info.h
浏览文件 @
5bc1d2ac
...
...
@@ -43,6 +43,7 @@ namespace planning {
class
ReferenceLineInfo
{
public:
explicit
ReferenceLineInfo
(
const
common
::
TrajectoryPoint
&
init_adc_point
,
const
hdmap
::
PncMap
*
pnc_map
,
const
ReferenceLine
&
reference_line
,
const
ReferenceLineSmootherConfig
&
smoother_config
);
...
...
@@ -112,6 +113,7 @@ class ReferenceLineInfo {
bool
InitPerceptionSLBoundary
(
PathObstacle
*
path_obstacle
);
bool
CalculateAdcSmoothReferenLinePoint
();
const
common
::
TrajectoryPoint
&
init_adc_point_
;
const
hdmap
::
PncMap
*
pnc_map_
=
nullptr
;
/**
...
...
modules/planning/planner/rtk/rtk_replay_planner_test.cc
浏览文件 @
5bc1d2ac
...
...
@@ -52,7 +52,7 @@ TEST_F(RTKReplayPlannerTest, ComputeTrajectory) {
localization
.
mutable_pose
()
->
mutable_linear_acceleration
()
->
set_z
(
0.0
);
common
::
VehicleState
::
instance
()
->
Update
(
localization
,
chassis
);
ReferenceLineSmootherConfig
smooth_config
;
ReferenceLineInfo
info
(
nullptr
,
reference_line
,
smooth_config
);
ReferenceLineInfo
info
(
start_point
,
nullptr
,
reference_line
,
smooth_config
);
auto
status
=
planner
.
Plan
(
start_point
,
nullptr
,
&
info
);
const
auto
&
trajectory
=
info
.
trajectory
();
...
...
@@ -93,7 +93,7 @@ TEST_F(RTKReplayPlannerTest, ErrorTest) {
common
::
VehicleState
::
instance
()
->
Update
(
localization
,
chassis
);
ReferenceLine
ref
;
ReferenceLineSmootherConfig
smooth_config
;
ReferenceLineInfo
info
(
nullptr
,
ref
,
smooth_config
);
ReferenceLineInfo
info
(
start_point
,
nullptr
,
ref
,
smooth_config
);
EXPECT_TRUE
(
!
(
planner_with_error_csv
.
Plan
(
start_point
,
nullptr
,
&
info
)).
ok
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录