Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
9a436954
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,发现更多精彩内容 >>
提交
9a436954
编写于
11月 21, 2019
作者:
J
JasonZhou404
提交者:
Jinyun Zhou
11月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: use soft bound in nlp speed opt
上级
94d5e067
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
1 deletion
+17
-1
modules/planning/conf/planning_config.pb.txt
modules/planning/conf/planning_config.pb.txt
+1
-0
modules/planning/proto/piecewise_jerk_nonlinear_speed_config.proto
...lanning/proto/piecewise_jerk_nonlinear_speed_config.proto
+1
-0
modules/planning/tasks/optimizers/piecewise_jerk_speed/piecewise_jerk_speed_nonlinear_optimizer.cc
...se_jerk_speed/piecewise_jerk_speed_nonlinear_optimizer.cc
+14
-1
modules/planning/tasks/optimizers/piecewise_jerk_speed/piecewise_jerk_speed_nonlinear_optimizer.h
...ise_jerk_speed/piecewise_jerk_speed_nonlinear_optimizer.h
+1
-0
未找到文件。
modules/planning/conf/planning_config.pb.txt
浏览文件 @
9a436954
...
...
@@ -38,6 +38,7 @@ default_task_config: {
lat_acc_weight: 1000.0
ref_v_weight: 0.0
ref_s_weight: 1000.0
soft_s_bound_weight: 1e9
use_warm_start: true
}
}
...
...
modules/planning/proto/piecewise_jerk_nonlinear_speed_config.proto
浏览文件 @
9a436954
...
...
@@ -11,6 +11,7 @@ message PiecewiseJerkNonlinearSpeedConfig {
optional
double
end_s_weight
=
6
[
default
=
10.0
];
optional
double
end_v_weight
=
7
[
default
=
10.0
];
optional
double
end_a_weight
=
8
[
default
=
10.0
];
optional
double
soft_s_bound_weight
=
9
[
default
=
10.0
];
optional
bool
use_warm_start
=
100
[
default
=
true
];
}
modules/planning/tasks/optimizers/piecewise_jerk_speed/piecewise_jerk_speed_nonlinear_optimizer.cc
浏览文件 @
9a436954
...
...
@@ -214,10 +214,16 @@ Status PiecewiseJerkSpeedNonlinearOptimizer::SetUpStatesAndBounds(
// Set s boundary
s_bounds_
.
clear
();
s_soft_bounds_
.
clear
();
// TODO(Jinyun): soft bound only takes effect in follow fence, will use in
// other speed decision as well and use more sophisticated bound for follow
// fence
for
(
int
i
=
0
;
i
<
num_of_knots_
;
++
i
)
{
double
curr_t
=
i
*
delta_t_
;
double
s_lower_bound
=
0.0
;
double
s_upper_bound
=
total_length_
;
double
s_soft_lower_bound
=
0.0
;
double
s_soft_upper_bound
=
0.0
;
for
(
const
STBoundary
*
boundary
:
st_graph_data
.
st_boundaries
())
{
double
s_lower
=
0.0
;
double
s_upper
=
0.0
;
...
...
@@ -228,13 +234,16 @@ Status PiecewiseJerkSpeedNonlinearOptimizer::SetUpStatesAndBounds(
case
STBoundary
::
BoundaryType
::
STOP
:
case
STBoundary
::
BoundaryType
::
YIELD
:
s_upper_bound
=
std
::
fmin
(
s_upper_bound
,
s_upper
);
s_soft_lower_bound
=
s_upper_bound
;
break
;
case
STBoundary
::
BoundaryType
::
FOLLOW
:
// TODO(Hongyi): unify follow buffer on decision side
s_upper_bound
=
std
::
fmin
(
s_upper_bound
,
s_upper
-
8.0
);
s_upper_bound
=
std
::
fmin
(
s_upper_bound
,
s_upper
);
s_soft_upper_bound
=
s_upper_bound
-
8.0
;
break
;
case
STBoundary
::
BoundaryType
::
OVERTAKE
:
s_lower_bound
=
std
::
fmax
(
s_lower_bound
,
s_lower
);
s_soft_lower_bound
=
s_lower_bound
;
break
;
default:
break
;
...
...
@@ -245,6 +254,7 @@ Status PiecewiseJerkSpeedNonlinearOptimizer::SetUpStatesAndBounds(
AERROR
<<
msg
;
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
msg
);
}
s_soft_bounds_
.
emplace_back
(
s_soft_lower_bound
,
s_soft_upper_bound
);
s_bounds_
.
emplace_back
(
s_lower_bound
,
s_upper_bound
);
}
speed_limit_
=
st_graph_data
.
speed_limit
();
...
...
@@ -428,6 +438,8 @@ Status PiecewiseJerkSpeedNonlinearOptimizer::OptimizeByNLP(
ptr_interface
->
set_safety_bounds
(
s_bounds_
);
ptr_interface
->
set_soft_safety_bounds
(
s_soft_bounds_
);
// Set weights and reference values
const
auto
&
config
=
config_
.
piecewise_jerk_nonlinear_speed_config
();
...
...
@@ -471,6 +483,7 @@ Status PiecewiseJerkSpeedNonlinearOptimizer::OptimizeByNLP(
ptr_interface
->
set_w_overall_j
(
config
.
jerk_weight
());
ptr_interface
->
set_w_overall_centripetal_acc
(
config
.
lat_acc_weight
());
ptr_interface
->
set_w_reference_speed
(
config
.
ref_v_weight
());
ptr_interface
->
set_w_soft_s_bound
(
config
.
soft_s_bound_weight
());
Ipopt
::
SmartPtr
<
Ipopt
::
TNLP
>
problem
=
ptr_interface
;
Ipopt
::
SmartPtr
<
Ipopt
::
IpoptApplication
>
app
=
IpoptApplicationFactory
();
...
...
modules/planning/tasks/optimizers/piecewise_jerk_speed/piecewise_jerk_speed_nonlinear_optimizer.h
浏览文件 @
9a436954
...
...
@@ -77,6 +77,7 @@ class PiecewiseJerkSpeedNonlinearOptimizer : public SpeedOptimizer {
// st safety bounds
std
::
vector
<
std
::
pair
<
double
,
double
>>
s_bounds_
;
std
::
vector
<
std
::
pair
<
double
,
double
>>
s_soft_bounds_
;
// speed limits
SpeedLimit
speed_limit_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录