Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
c19048cb
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,发现更多精彩内容 >>
提交
c19048cb
编写于
8月 08, 2017
作者:
Z
Zhang Liangliang
提交者:
Dong Li
8月 08, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: record frame history in planning.cc
上级
18d188b2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
16 deletion
+17
-16
modules/planning/common/frame.cc
modules/planning/common/frame.cc
+9
-10
modules/planning/common/frame.h
modules/planning/common/frame.h
+2
-2
modules/planning/common/indexed_queue.h
modules/planning/common/indexed_queue.h
+1
-1
modules/planning/planning.cc
modules/planning/planning.cc
+2
-0
modules/planning/reference_line/reference_line_smoother.cc
modules/planning/reference_line/reference_line_smoother.cc
+2
-2
modules/planning/reference_line/reference_line_smoother.h
modules/planning/reference_line/reference_line_smoother.h
+1
-1
未找到文件。
modules/planning/common/frame.cc
浏览文件 @
c19048cb
...
...
@@ -130,12 +130,12 @@ const PlanningData &Frame::planning_data() const { return _planning_data; }
PlanningData
*
Frame
::
mutable_planning_data
()
{
return
&
_planning_data
;
}
void
Frame
::
set_computed_t
rajectory
(
const
PublishableTrajectory
&
trajectory
)
{
_computed_trajectory
=
trajectory
;
void
Frame
::
SetComputedT
rajectory
(
const
PublishableTrajectory
&
trajectory
)
{
computed_trajectory_
=
trajectory
;
}
const
PublishableTrajectory
&
Frame
::
computed_trajectory
()
const
{
return
_computed_trajectory
;
return
computed_trajectory_
;
}
const
ReferenceLine
&
Frame
::
reference_line
()
const
{
return
reference_line_
;
}
...
...
@@ -199,17 +199,16 @@ void Frame::AlignPredictionTime(const double trajectory_header_time) {
double
prediction_header_time
=
prediction_
.
header
().
timestamp_sec
();
for
(
int
i
=
0
;
i
<
prediction_
.
prediction_obstacle_size
();
i
++
)
{
prediction
::
PredictionObstacle
*
obstacle
=
prediction
::
PredictionObstacle
*
obstacle
=
prediction_
.
mutable_prediction_obstacle
(
i
);
for
(
int
j
=
0
;
j
<
obstacle
->
trajectory_size
();
j
++
)
{
prediction
::
Trajectory
*
trajectory
=
obstacle
->
mutable_trajectory
(
j
);
prediction
::
Trajectory
*
trajectory
=
obstacle
->
mutable_trajectory
(
j
);
for
(
int
k
=
0
;
k
<
trajectory
->
trajectory_point_size
();
k
++
)
{
common
::
TrajectoryPoint
*
point
=
trajectory
->
mutable_trajectory_point
(
k
);
common
::
TrajectoryPoint
*
point
=
trajectory
->
mutable_trajectory_point
(
k
);
double
abs_relative_time
=
point
->
relative_time
();
point
->
set_relative_time
(
prediction_header_time
+
abs_relative_time
-
trajectory_header_time
);
point
->
set_relative_time
(
prediction_header_time
+
abs_relative_time
-
trajectory_header_time
);
}
}
}
...
...
modules/planning/common/frame.h
浏览文件 @
c19048cb
...
...
@@ -69,7 +69,7 @@ class Frame {
const
ADCTrajectory
&
GetADCTrajectory
()
const
;
ADCTrajectory
*
MutableADCTrajectory
();
void
set_computed_t
rajectory
(
const
PublishableTrajectory
&
trajectory
);
void
SetComputedT
rajectory
(
const
PublishableTrajectory
&
trajectory
);
const
PublishableTrajectory
&
computed_trajectory
()
const
;
const
localization
::
Pose
&
VehicleInitPose
()
const
;
...
...
@@ -131,7 +131,7 @@ class Frame {
std
::
unique_ptr
<
PathDecision
>
path_decision_
;
uint32_t
sequence_num_
=
0
;
localization
::
Pose
init_pose_
;
PublishableTrajectory
_computed_trajectory
;
PublishableTrajectory
computed_trajectory_
;
ReferenceLine
reference_line_
;
PlanningData
_planning_data
;
static
const
hdmap
::
PncMap
*
pnc_map_
;
...
...
modules/planning/common/indexed_queue.h
浏览文件 @
c19048cb
...
...
@@ -32,7 +32,7 @@ template <typename I, typename T>
class
IndexedQueue
{
public:
IndexedQueue
(
std
::
size_t
max_queue_size
)
:
max_queue_size_
(
max_queue_size
){};
T
*
Find
(
const
I
id
)
const
{
const
T
*
Find
(
const
I
id
)
const
{
auto
iter
=
map_
.
find
(
id
);
if
(
iter
==
map_
.
end
())
{
return
nullptr
;
...
...
modules/planning/planning.cc
浏览文件 @
c19048cb
...
...
@@ -139,6 +139,7 @@ Status Planning::Start() {
static
ros
::
Rate
loop_rate
(
FLAGS_planning_loop_rate
);
while
(
ros
::
ok
())
{
RunOnce
();
FrameHistory
::
instance
()
->
Add
(
frame_
->
sequence_num
(),
std
::
move
(
frame_
));
ros
::
spinOnce
();
loop_rate
.
sleep
();
}
...
...
@@ -253,6 +254,7 @@ bool Planning::Plan(const bool is_on_auto_mode, const double current_time_stamp,
// update last publishable trajectory;
last_publishable_trajectory_
=
std
::
move
(
publishable_trajectory
);
return
true
;
}
...
...
modules/planning/reference_line/reference_line_smoother.cc
浏览文件 @
c19048cb
...
...
@@ -70,7 +70,7 @@ bool ReferenceLineSmoother::smooth(
return
false
;
}
if
(
!
apply_k
ernel
())
{
if
(
!
ApplyK
ernel
())
{
AERROR
<<
"Add kernel for spline smoother failed."
;
return
false
;
}
...
...
@@ -177,7 +177,7 @@ bool ReferenceLineSmoother::apply_constraint(
return
true
;
}
bool
ReferenceLineSmoother
::
apply_k
ernel
()
{
bool
ReferenceLineSmoother
::
ApplyK
ernel
()
{
Spline2dKernel
*
kernel
=
spline_solver_
->
mutable_kernel
();
// add spline kernel
...
...
modules/planning/reference_line/reference_line_smoother.h
浏览文件 @
c19048cb
...
...
@@ -49,7 +49,7 @@ class ReferenceLineSmoother {
bool
apply_constraint
(
const
ReferenceLine
&
raw_reference_line
);
bool
apply_k
ernel
();
bool
ApplyK
ernel
();
bool
solve
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录