Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
907bd777
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,发现更多精彩内容 >>
提交
907bd777
编写于
7月 28, 2017
作者:
F
fanhaoyang01
提交者:
Dong Li
7月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature : add clear function for path data and speed data
上级
0176059b
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
17 addition
and
5 deletion
+17
-5
modules/planning/common/path/path_data.cc
modules/planning/common/path/path_data.cc
+5
-0
modules/planning/common/path/path_data.h
modules/planning/common/path/path_data.h
+2
-1
modules/planning/common/speed/speed_data.cc
modules/planning/common/speed/speed_data.cc
+4
-0
modules/planning/common/speed/speed_data.h
modules/planning/common/speed/speed_data.h
+1
-0
modules/planning/common/trajectory/publishable_trajectory.cc
modules/planning/common/trajectory/publishable_trajectory.cc
+2
-2
modules/planning/conf/planning_config.pb.txt
modules/planning/conf/planning_config.pb.txt
+2
-2
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_graph.cc
...anning/optimizer/qp_spline_st_speed/qp_spline_st_graph.cc
+1
-0
未找到文件。
modules/planning/common/path/path_data.cc
浏览文件 @
907bd777
...
@@ -90,6 +90,11 @@ bool PathData::get_path_point_with_ref_s(
...
@@ -90,6 +90,11 @@ bool PathData::get_path_point_with_ref_s(
return
true
;
return
true
;
}
}
void
PathData
::
Clear
()
{
discretized_path_
=
DiscretizedPath
();
frenet_path_
=
FrenetFramePath
();
}
std
::
string
PathData
::
DebugString
()
const
{
std
::
string
PathData
::
DebugString
()
const
{
std
::
ostringstream
sout
;
std
::
ostringstream
sout
;
sout
<<
"["
<<
std
::
endl
;
sout
<<
"["
<<
std
::
endl
;
...
...
modules/planning/common/path/path_data.h
浏览文件 @
907bd777
...
@@ -49,9 +49,10 @@ class PathData {
...
@@ -49,9 +49,10 @@ class PathData {
bool
get_path_point_with_ref_s
(
const
double
ref_s
,
bool
get_path_point_with_ref_s
(
const
double
ref_s
,
common
::
PathPoint
*
const
path_point
)
const
;
common
::
PathPoint
*
const
path_point
)
const
;
void
Clear
();
std
::
string
DebugString
()
const
;
std
::
string
DebugString
()
const
;
// TODO(fanhaoyang) add check if the path data is valid
private:
private:
DiscretizedPath
discretized_path_
;
DiscretizedPath
discretized_path_
;
...
...
modules/planning/common/speed/speed_data.cc
浏览文件 @
907bd777
...
@@ -88,6 +88,10 @@ double SpeedData::total_time() const {
...
@@ -88,6 +88,10 @@ double SpeedData::total_time() const {
return
speed_vector_
.
back
().
t
()
-
speed_vector_
.
front
().
t
();
return
speed_vector_
.
back
().
t
()
-
speed_vector_
.
front
().
t
();
}
}
void
SpeedData
::
Clear
()
{
speed_vector_
.
clear
();
}
std
::
string
SpeedData
::
DebugString
()
const
{
std
::
string
SpeedData
::
DebugString
()
const
{
std
::
ostringstream
sout
;
std
::
ostringstream
sout
;
sout
<<
"["
<<
std
::
endl
;
sout
<<
"["
<<
std
::
endl
;
...
...
modules/planning/common/speed/speed_data.h
浏览文件 @
907bd777
...
@@ -48,6 +48,7 @@ class SpeedData {
...
@@ -48,6 +48,7 @@ class SpeedData {
double
total_time
()
const
;
double
total_time
()
const
;
void
Clear
();
private:
private:
SpeedPoint
interpolate
(
const
SpeedPoint
&
left
,
const
SpeedPoint
&
right
,
SpeedPoint
interpolate
(
const
SpeedPoint
&
left
,
const
SpeedPoint
&
right
,
const
double
weight
)
const
;
const
double
weight
)
const
;
...
...
modules/planning/common/trajectory/publishable_trajectory.cc
浏览文件 @
907bd777
...
@@ -50,7 +50,7 @@ void PublishableTrajectory::set_header_time(const double header_time) {
...
@@ -50,7 +50,7 @@ void PublishableTrajectory::set_header_time(const double header_time) {
ADCTrajectory
PublishableTrajectory
::
to_trajectory_protobuf
()
const
{
ADCTrajectory
PublishableTrajectory
::
to_trajectory_protobuf
()
const
{
ADCTrajectory
trajectory_pb
;
ADCTrajectory
trajectory_pb
;
trajectory_pb
.
mutable_header
()
->
set_timestamp_sec
(
_header_time
);
trajectory_pb
.
mutable_header
()
->
set_timestamp_sec
(
_header_time
);
trajectory_pb
.
mutable_trajectory_point
()
->
Merge
From
(
trajectory_pb
.
mutable_trajectory_point
()
->
Copy
From
(
{
_trajectory_points
.
begin
(),
_trajectory_points
.
end
()});
{
_trajectory_points
.
begin
(),
_trajectory_points
.
end
()});
return
trajectory_pb
;
return
trajectory_pb
;
}
}
...
@@ -58,7 +58,7 @@ ADCTrajectory PublishableTrajectory::to_trajectory_protobuf() const {
...
@@ -58,7 +58,7 @@ ADCTrajectory PublishableTrajectory::to_trajectory_protobuf() const {
void
PublishableTrajectory
::
populate_trajectory_protobuf
(
void
PublishableTrajectory
::
populate_trajectory_protobuf
(
ADCTrajectory
*
trajectory_pb
)
const
{
ADCTrajectory
*
trajectory_pb
)
const
{
trajectory_pb
->
mutable_header
()
->
set_timestamp_sec
(
_header_time
);
trajectory_pb
->
mutable_header
()
->
set_timestamp_sec
(
_header_time
);
trajectory_pb
->
mutable_trajectory_point
()
->
Merge
From
(
trajectory_pb
->
mutable_trajectory_point
()
->
Copy
From
(
{
_trajectory_points
.
begin
(),
_trajectory_points
.
end
()});
{
_trajectory_points
.
begin
(),
_trajectory_points
.
end
()});
}
}
...
...
modules/planning/conf/planning_config.pb.txt
浏览文件 @
907bd777
planner_type : EM em_planner_config {
planner_type : EM em_planner_config {
optimizer : DP_POLY_PATH_OPTIMIZER
optimizer : DP_POLY_PATH_OPTIMIZER
#
optimizer : DP_ST_SPEED_OPTIMIZER
optimizer : DP_ST_SPEED_OPTIMIZER
#
optimizer : QP_SPLINE_PATH_OPTIMIZER
optimizer : QP_SPLINE_PATH_OPTIMIZER
optimizer : QP_SPLINE_ST_SPEED_OPTIMIZER
optimizer : QP_SPLINE_ST_SPEED_OPTIMIZER
}
}
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_graph.cc
浏览文件 @
907bd777
...
@@ -80,6 +80,7 @@ Status QpSplineStGraph::search(const StGraphData& st_graph_data,
...
@@ -80,6 +80,7 @@ Status QpSplineStGraph::search(const StGraphData& st_graph_data,
}
}
// extract output
// extract output
speed_data
->
Clear
();
const
Spline1d
&
spline
=
_spline_generator
->
spline
();
const
Spline1d
&
spline
=
_spline_generator
->
spline
();
double
time_resolution
=
_qp_spline_st_speed_config
.
output_time_resolution
();
double
time_resolution
=
_qp_spline_st_speed_config
.
output_time_resolution
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录