Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
e9016edb
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,发现更多精彩内容 >>
提交
e9016edb
编写于
8月 15, 2017
作者:
J
jiangyifei
提交者:
Jiangtao Hu
8月 15, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[planning] updated qp st speed with new config.
上级
2a49d7a3
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
274 addition
and
76 deletion
+274
-76
modules/planning/common/planning_gflags.cc
modules/planning/common/planning_gflags.cc
+0
-7
modules/planning/common/planning_gflags.h
modules/planning/common/planning_gflags.h
+0
-4
modules/planning/conf/qp_spline_st_speed_config_file.pb.txt
modules/planning/conf/qp_spline_st_speed_config_file.pb.txt
+0
-17
modules/planning/conf/st_boundary_config_file.pb.txt
modules/planning/conf/st_boundary_config_file.pb.txt
+0
-17
modules/planning/integration_tests/planning_test_base.cc
modules/planning/integration_tests/planning_test_base.cc
+0
-4
modules/planning/optimizer/qp_spline_path/qp_spline_path_optimizer_test.cc
...optimizer/qp_spline_path/qp_spline_path_optimizer_test.cc
+13
-4
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
...imizer/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
+3
-14
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_speed_optimizer_test.cc
...r/qp_spline_st_speed/qp_spline_st_speed_optimizer_test.cc
+12
-9
modules/planning/testdata/qp_spline_path/planning_config.pb.txt
...s/planning/testdata/qp_spline_path/planning_config.pb.txt
+123
-0
modules/planning/testdata/qp_spline_st_speed/planning_config.pb.txt
...anning/testdata/qp_spline_st_speed/planning_config.pb.txt
+123
-0
未找到文件。
modules/planning/common/planning_gflags.cc
浏览文件 @
e9016edb
...
...
@@ -336,13 +336,6 @@ DEFINE_string(planning_config_file,
"modules/planning/conf/planning_config.pb.txt"
,
"planning config file"
);
DEFINE_string
(
st_boundary_config_file
,
"modules/planning/conf/st_boundary_config_file.pb.txt"
,
"The config file for st_boundary_config."
);
DEFINE_string
(
qp_spline_st_speed_config_file
,
"modules/planning/conf/qp_spline_st_speed_config_file.pb.txt"
,
"The config file for qp_spline_st_speed_config_file."
);
DEFINE_int32
(
trajectory_point_num_for_debug
,
10
,
"number of output trajectory points for debugging"
);
...
...
modules/planning/common/planning_gflags.h
浏览文件 @
e9016edb
...
...
@@ -220,10 +220,6 @@ DECLARE_double(max_deacceleration_for_yellow_light_stop);
DECLARE_string
(
reference_line_smoother_config_file
);
// Optimizers
DECLARE_string
(
st_boundary_config_file
);
DECLARE_string
(
qp_spline_st_speed_config_file
);
DECLARE_int32
(
trajectory_point_num_for_debug
);
DECLARE_string
(
offline_routing_file
);
DECLARE_double
(
backward_routing_distance
);
...
...
modules/planning/conf/qp_spline_st_speed_config_file.pb.txt
已删除
100644 → 0
浏览文件 @
2a49d7a3
total_path_length: 80.0
total_time: 8.0
output_time_resolution: 0.05
number_of_discrete_graph_s: 80
number_of_discrete_graph_t: 10
number_of_evaluated_graph_t: 20
spline_order: 6
speed_kernel_weight: 0.0
accel_kernel_weight: 0.0
jerk_kernel_weight: 1000.0
follow_weight: 1.0
stop_weight: 1.0
cruise_weight: 1.0
max_speed: 20.0
max_acceleration: 4.5
max_deceleration: -4.5
reference_line_kernel_weight: 1.0
modules/planning/conf/st_boundary_config_file.pb.txt
已删除
100644 → 0
浏览文件 @
2a49d7a3
boundary_buffer: 0.1
minimal_follow_time: 3.0
follow_buffer: 1.0
follow_coeff:1.0
follow_speed_threshold: 10.0
follow_speed_damping_factor: 0.7
success_tunnel:0.01
expanding_coeff: 1.2
follow_distance_buffer: 5.0
centric_acceleration_limit: 1.0
kappa_threshold: 0.04
minimal_kappa: 0.00001
maximal_speed: 25.0
speed_limit_on_u_turn: 1.5
point_extension: 1.0
speed_multiply_buffer: 0.9
lowest_speed: 2.5
modules/planning/integration_tests/planning_test_base.cc
浏览文件 @
e9016edb
...
...
@@ -36,10 +36,6 @@ DEFINE_string(test_chassis_file,
DEFINE_string
(
test_prediction_file
,
""
,
"The prediction module test file"
);
void
PlanningTestBase
::
SetUpTestCase
()
{
FLAGS_qp_spline_st_speed_config_file
=
"modules/planning/testdata/conf/qp_spline_st_speed_config_file.pb.txt"
;
FLAGS_st_boundary_config_file
=
"modules/planning/testdata/conf/st_boundary_config_file.pb.txt"
;
FLAGS_planning_config_file
=
"modules/planning/testdata/conf/planning_config.pb.txt"
;
FLAGS_adapter_config_path
=
"modules/planning/testdata/conf/adapter.conf"
;
...
...
modules/planning/optimizer/qp_spline_path/qp_spline_path_optimizer_test.cc
浏览文件 @
e9016edb
...
...
@@ -33,14 +33,15 @@ class QpSplinePathOptimizerTest : public ::testing::Test {
virtual
void
SetUp
()
{
FLAGS_reference_line_smoother_config_file
=
"modules/planning/testdata/conf/reference_line_smoother_config.pb.txt"
;
FLAGS_
qp_spline_path
_config_file
=
"modules/planning/testdata/qp_spline_path/
qp_spline_path
_config.pb.txt"
;
FLAGS_
planning
_config_file
=
"modules/planning/testdata/qp_spline_path/
planning
_config.pb.txt"
;
optimizer_
.
reset
(
new
QpSplinePathOptimizer
(
""
));
frame
.
reset
(
new
Frame
(
1
));
hdmap
::
PncMap
*
pnc_map
;
pnc_map
=
new
hdmap
::
PncMap
(
"modules/planning/testdata/base_map.txt"
);
Frame
::
SetMap
(
pnc_map
);
LoadPlanningConfig
();
planning_pb
=
LoadPlanningPb
(
"modules/planning/testdata"
"/qp_spline_path/42_apollo_planning.pb.txt"
);
...
...
@@ -58,6 +59,13 @@ class QpSplinePathOptimizerTest : public ::testing::Test {
return
std
::
move
(
planning_pb
);
}
void
LoadPlanningConfig
()
{
PlanningPb
planning_pb
;
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_planning_config_file
,
&
planning_config_
))
<<
"Failed to open file "
<<
FLAGS_planning_config_file
;
}
common
::
TrajectoryPoint
GetInitPoint
()
{
common
::
TrajectoryPoint
init_point
;
common
::
VehicleState
::
instance
()
->
Update
(
...
...
@@ -82,6 +90,7 @@ class QpSplinePathOptimizerTest : public ::testing::Test {
std
::
unique_ptr
<
Frame
>
frame
;
PlanningPb
planning_pb
;
std
::
unique_ptr
<
Optimizer
>
optimizer_
;
PlanningConfig
planning_config_
;
};
TEST_F
(
QpSplinePathOptimizerTest
,
Process
)
{
...
...
@@ -91,7 +100,7 @@ TEST_F(QpSplinePathOptimizerTest, Process) {
PlanningData
*
planning_data
=
frame
->
mutable_planning_data
();
EXPECT_EQ
(
planning_data
->
path_data
().
discretized_path
().
path_points
().
size
()
,
0
);
optimizer_
->
Init
();
optimizer_
->
Init
(
planning_config_
);
optimizer_
->
Optimize
(
frame
.
get
());
common
::
Path
qp_path_ground_truth
;
...
...
@@ -110,7 +119,7 @@ TEST_F(QpSplinePathOptimizerTest, Process) {
qp_path_ground_truth
.
path_point
().
Get
(
i
);
common
::
PathPoint
computed_point
=
planning_data
->
path_data
().
discretized_path
().
path_points
()[
i
];
EXPECT_NEAR
(
ground_truth_point
.
x
(),
computed_point
.
x
(),
1.0e-
3
);
EXPECT_NEAR
(
ground_truth_point
.
x
(),
computed_point
.
x
(),
1.0e-
2
);
EXPECT_NEAR
(
ground_truth_point
.
y
(),
computed_point
.
y
(),
1.0e-3
);
EXPECT_NEAR
(
ground_truth_point
.
kappa
(),
computed_point
.
kappa
(),
1.0e-3
);
EXPECT_NEAR
(
ground_truth_point
.
theta
(),
computed_point
.
theta
(),
1.0e-3
);
...
...
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
浏览文件 @
e9016edb
...
...
@@ -43,20 +43,9 @@ QpSplineStSpeedOptimizer::QpSplineStSpeedOptimizer(const std::string& name)
:
SpeedOptimizer
(
name
)
{}
bool
QpSplineStSpeedOptimizer
::
Init
(
const
PlanningConfig
&
config
)
{
// load boundary mapper
if
(
!
common
::
util
::
GetProtoFromFile
(
FLAGS_st_boundary_config_file
,
&
st_boundary_config_
))
{
AERROR
<<
"Failed to load config file: "
<<
FLAGS_st_boundary_config_file
;
return
false
;
}
// load qp_spline_st_speed_config_
if
(
!
common
::
util
::
GetProtoFromFile
(
FLAGS_qp_spline_st_speed_config_file
,
&
qp_spline_st_speed_config_
))
{
AERROR
<<
"Failed to load config file: "
<<
FLAGS_qp_spline_st_speed_config_file
;
return
false
;
}
qp_spline_st_speed_config_
=
config
.
em_planner_config
().
qp_spline_st_speed_config
();
st_boundary_config_
=
qp_spline_st_speed_config_
.
st_boundary_config
();
is_init_
=
true
;
return
true
;
}
...
...
modules/planning/optimizer/qp_spline_st_speed/qp_spline_st_speed_optimizer_test.cc
浏览文件 @
e9016edb
...
...
@@ -34,15 +34,10 @@ class QpSplineStSpeedOptimizerTest : public ::testing::Test {
virtual
void
SetUp
()
{
FLAGS_reference_line_smoother_config_file
=
"modules/planning/testdata/conf/reference_line_smoother_config.pb.txt"
;
FLAGS_qp_spline_path_config_file
=
"modules/planning/testdata/qp_spline_path/qp_spline_path_config.pb.txt"
;
FLAGS_qp_spline_st_speed_config_file
=
"modules/planning/testdata/qp_spline_st_speed"
"/qp_spline_st_speed_config_file.pb.txt"
;
FLAGS_st_boundary_config_file
=
"modules/planning/testdata/qp_spline_st_speed"
"/st_boundary_config_file.pb.txt"
;
FLAGS_planning_config_file
=
"modules/planning/testdata/qp_spline_st_speed/planning_config.pb.txt"
;
LoadPlanningConfig
();
optimizer_
.
reset
(
new
QpSplineStSpeedOptimizer
(
"ST_SPEED"
));
planning_pb
=
LoadPlanningPb
(
"modules/planning/testdata"
...
...
@@ -58,6 +53,13 @@ class QpSplineStSpeedOptimizerTest : public ::testing::Test {
return
std
::
move
(
planning_pb
);
}
void
LoadPlanningConfig
()
{
PlanningPb
planning_pb
;
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
FLAGS_planning_config_file
,
&
planning_config_
))
<<
"Failed to open file "
<<
FLAGS_planning_config_file
;
}
void
InitFrame
()
{
frame
.
reset
(
new
Frame
(
1
));
hdmap
::
PncMap
*
pnc_map
;
...
...
@@ -99,13 +101,14 @@ class QpSplineStSpeedOptimizerTest : public ::testing::Test {
std
::
unique_ptr
<
Frame
>
frame
;
PlanningPb
planning_pb
;
std
::
unique_ptr
<
Optimizer
>
optimizer_
;
PlanningConfig
planning_config_
;
};
TEST_F
(
QpSplineStSpeedOptimizerTest
,
Process
)
{
PlanningData
*
planning_data
=
frame
->
mutable_planning_data
();
EXPECT_EQ
(
planning_data
->
speed_data
().
speed_vector
().
size
()
,
0
);
optimizer_
->
Init
();
optimizer_
->
Init
(
planning_config_
);
optimizer_
->
Optimize
(
frame
.
get
());
planning_internal
::
STGraphDebug
st_graph_ground_truth
;
...
...
modules/planning/testdata/qp_spline_path/planning_config.pb.txt
0 → 100644
浏览文件 @
e9016edb
planner_type : EM
em_planner_config {
optimizer : DP_POLY_PATH_OPTIMIZER
optimizer : DP_ST_SPEED_OPTIMIZER
optimizer : QP_SPLINE_PATH_OPTIMIZER
optimizer : QP_SPLINE_ST_SPEED_OPTIMIZER
dp_poly_path_config {
sample_level: 8
sample_points_num_each_level: 9
step_length_max: 15.0
step_length_min: 8.0
lateral_sample_offset: 0.5
lateral_adjust_coeff: 0.5
eval_time_interval: 0.1
path_resolution: 0.1
}
dp_st_speed_config {
total_path_length: 80
total_time: 8.0
matrix_dimension_s: 200
matrix_dimension_t: 20
speed_weight: 0.0
accel_weight: 10.0
jerk_weight: 10.0
obstacle_weight: 1.0
reference_weight: 0.0
go_down_buffer: 5.0
go_up_buffer: 5.0
default_obstacle_cost: 1e10
obstacle_cost_factor: -300
default_speed_cost: 1.0
exceed_speed_penalty: 10.0
low_speed_penalty: 2.5
accel_penalty: 2.0
decel_penalty: 2.0
positive_jerk_coeff: 1.0
negative_jerk_coeff: 300.0
max_speed: 20.0
max_acceleration: 4.5
max_deceleration: -4.5
st_boundary_config {
boundary_buffer: 0.1
minimal_follow_time: 3.0
follow_buffer: 1.0
follow_coeff:1.0
follow_speed_threshold: 10.0
follow_speed_damping_factor: 0.7
success_tunnel:0.01
expanding_coeff: 1.2
follow_distance_buffer: 5.0
centric_acceleration_limit: 1.0
kappa_threshold: 0.04
minimal_kappa: 0.00001
maximal_speed: 25.0
speed_limit_on_u_turn: 1.5
point_extension: 1.0
speed_multiply_buffer: 0.9
lowest_speed: 2.5
}
}
qp_spline_path_config {
spline_order: 6
number_of_knots: 5
number_of_fx_constraint_knots: 13
time_resolution: 0.1
regularization_weight: 0.1
derivative_weight: 1.0
second_derivative_weight: 0.0
third_derivative_weight: 10.0
reference_line_weight: 0.0
num_refline_point: 10
num_output: 100
}
qp_spline_st_speed_config {
total_path_length: 80.0
total_time: 8.0
output_time_resolution: 0.05
number_of_discrete_graph_s: 80
number_of_discrete_graph_t: 10
number_of_evaluated_graph_t: 20
spline_order: 6
speed_kernel_weight: 0.0
accel_kernel_weight: 0.0
jerk_kernel_weight: 1000.0
follow_weight: 1.0
stop_weight: 1.0
cruise_weight: 1.0
max_speed: 20.0
max_acceleration: 4.5
max_deceleration: -4.5
reference_line_kernel_weight: 1.0
st_boundary_config {
boundary_buffer: 0.1
minimal_follow_time: 3.0
follow_buffer: 1.0
follow_coeff:1.0
follow_speed_threshold: 10.0
follow_speed_damping_factor: 0.7
success_tunnel:0.01
expanding_coeff: 1.2
follow_distance_buffer: 5.0
centric_acceleration_limit: 1.0
kappa_threshold: 0.04
minimal_kappa: 0.00001
maximal_speed: 25.0
speed_limit_on_u_turn: 1.5
point_extension: 1.0
speed_multiply_buffer: 0.9
lowest_speed: 2.5
}
}
}
modules/planning/testdata/qp_spline_st_speed/planning_config.pb.txt
0 → 100644
浏览文件 @
e9016edb
planner_type : EM
em_planner_config {
optimizer : DP_POLY_PATH_OPTIMIZER
optimizer : DP_ST_SPEED_OPTIMIZER
optimizer : QP_SPLINE_PATH_OPTIMIZER
optimizer : QP_SPLINE_ST_SPEED_OPTIMIZER
dp_poly_path_config {
sample_level: 8
sample_points_num_each_level: 9
step_length_max: 15.0
step_length_min: 8.0
lateral_sample_offset: 0.5
lateral_adjust_coeff: 0.5
eval_time_interval: 0.1
path_resolution: 0.1
}
dp_st_speed_config {
total_path_length: 80
total_time: 8.0
matrix_dimension_s: 200
matrix_dimension_t: 20
speed_weight: 0.0
accel_weight: 10.0
jerk_weight: 10.0
obstacle_weight: 1.0
reference_weight: 0.0
go_down_buffer: 5.0
go_up_buffer: 5.0
default_obstacle_cost: 1e10
obstacle_cost_factor: -300
default_speed_cost: 1.0
exceed_speed_penalty: 10.0
low_speed_penalty: 2.5
accel_penalty: 2.0
decel_penalty: 2.0
positive_jerk_coeff: 1.0
negative_jerk_coeff: 300.0
max_speed: 20.0
max_acceleration: 4.5
max_deceleration: -4.5
st_boundary_config {
boundary_buffer: 0.1
minimal_follow_time: 3.0
follow_buffer: 1.0
follow_coeff:1.0
follow_speed_threshold: 10.0
follow_speed_damping_factor: 0.7
success_tunnel:0.01
expanding_coeff: 1.2
follow_distance_buffer: 5.0
centric_acceleration_limit: 1.0
kappa_threshold: 0.04
minimal_kappa: 0.00001
maximal_speed: 25.0
speed_limit_on_u_turn: 1.5
point_extension: 1.0
speed_multiply_buffer: 0.9
lowest_speed: 2.5
}
}
qp_spline_path_config {
spline_order: 6
number_of_knots: 5
number_of_fx_constraint_knots: 13
time_resolution: 0.1
regularization_weight: 0.1
derivative_weight: 1.0
second_derivative_weight: 0.0
third_derivative_weight: 10.0
reference_line_weight: 0.0
num_refline_point: 10
num_output: 100
}
qp_spline_st_speed_config {
total_path_length: 80.0
total_time: 8.0
output_time_resolution: 0.05
number_of_discrete_graph_s: 80
number_of_discrete_graph_t: 10
number_of_evaluated_graph_t: 20
spline_order: 6
speed_kernel_weight: 0.0
accel_kernel_weight: 0.0
jerk_kernel_weight: 1000.0
follow_weight: 1.0
stop_weight: 1.0
cruise_weight: 1.0
max_speed: 20.0
max_acceleration: 4.5
max_deceleration: -4.5
reference_line_kernel_weight: 1.0
st_boundary_config {
boundary_buffer: 0.1
minimal_follow_time: 3.0
follow_buffer: 1.0
follow_coeff:1.0
follow_speed_threshold: 10.0
follow_speed_damping_factor: 0.7
success_tunnel:0.01
expanding_coeff: 1.2
follow_distance_buffer: 5.0
centric_acceleration_limit: 1.0
kappa_threshold: 0.04
minimal_kappa: 0.00001
maximal_speed: 25.0
speed_limit_on_u_turn: 1.5
point_extension: 1.0
speed_multiply_buffer: 0.9
lowest_speed: 2.5
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录