Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
2ccbc6fe
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,发现更多精彩内容 >>
提交
2ccbc6fe
编写于
12月 28, 2017
作者:
Z
Zhang Liangliang
提交者:
Jiangtao Hu
12月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: a bug fix on traffic_decider/change_lane.cc
上级
53767d5f
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
491 addition
and
689 deletion
+491
-689
modules/planning/tasks/speed_optimizer.cc
modules/planning/tasks/speed_optimizer.cc
+9
-10
modules/planning/tasks/speed_optimizer.h
modules/planning/tasks/speed_optimizer.h
+1
-0
modules/planning/tasks/traffic_decider/change_lane.cc
modules/planning/tasks/traffic_decider/change_lane.cc
+13
-3
modules/planning/testdata/garage_test/result_stop_over_line_0.pb.txt
...nning/testdata/garage_test/result_stop_over_line_0.pb.txt
+468
-676
未找到文件。
modules/planning/tasks/speed_optimizer.cc
浏览文件 @
2ccbc6fe
...
...
@@ -20,7 +20,6 @@
#include "modules/planning/common/planning_gflags.h"
#include "modules/planning/common/speed_limit.h"
#include "modules/planning/math/curve1d/quintic_polynomial_curve1d.h"
#include "modules/planning/tasks/speed_optimizer.h"
namespace
apollo
{
...
...
@@ -109,8 +108,9 @@ SpeedData SpeedOptimizer::GenerateStopProfile(const double init_speed,
SpeedData
SpeedOptimizer
::
GenerateStopProfileFromPolynomial
(
const
double
init_speed
,
const
double
init_acc
)
const
{
constexpr
double
kMaxT
=
3.0
;
for
(
double
t
=
2.0
;
t
<
kMaxT
;
t
+=
0.5
)
{
AERROR
<<
"Slowing down the car with polynomial."
;
constexpr
double
kMaxT
=
4.0
;
for
(
double
t
=
2.0
;
t
<=
kMaxT
;
t
+=
0.5
)
{
for
(
double
s
=
0.0
;
s
<
50.0
;
s
+=
1.0
)
{
QuinticPolynomialCurve1d
curve
(
0.0
,
init_speed
,
init_acc
,
s
,
0.0
,
0.0
,
t
);
if
(
!
IsValidProfile
(
curve
))
{
...
...
@@ -134,13 +134,12 @@ SpeedData SpeedOptimizer::GenerateStopProfileFromPolynomial(
bool
SpeedOptimizer
::
IsValidProfile
(
const
QuinticPolynomialCurve1d
&
curve
)
const
{
for
(
double
evaluate_t
=
0.1
;
evaluate_t
<=
t
;
evaluate_t
+=
0.2
)
{
const
double
v
=
curve
.
Evaluate
(
1
,
t
);
const
double
a
=
curve
.
Evaluate
(
2
,
t
);
if
(
v
<
0
)
{
return
false
;
}
if
(
a
<
-
5.0
)
{
for
(
double
evaluate_t
=
0.1
;
evaluate_t
<=
curve
.
ParamLength
();
evaluate_t
+=
0.2
)
{
const
double
v
=
curve
.
Evaluate
(
1
,
evaluate_t
);
const
double
a
=
curve
.
Evaluate
(
2
,
evaluate_t
);
constexpr
double
kEpsilon
=
1e-3
;
if
(
v
<
-
kEpsilon
||
a
<
-
5.0
)
{
return
false
;
}
}
...
...
modules/planning/tasks/speed_optimizer.h
浏览文件 @
2ccbc6fe
...
...
@@ -26,6 +26,7 @@
#include "modules/common/status/status.h"
#include "modules/planning/common/speed/speed_data.h"
#include "modules/planning/math/curve1d/quintic_polynomial_curve1d.h"
#include "modules/planning/tasks/st_graph/st_graph_data.h"
#include "modules/planning/tasks/task.h"
...
...
modules/planning/tasks/traffic_decider/change_lane.cc
浏览文件 @
2ccbc6fe
...
...
@@ -22,6 +22,7 @@
#include <algorithm>
#include "modules/common/util/util.h"
#include "modules/planning/common/planning_gflags.h"
namespace
apollo
{
...
...
@@ -112,14 +113,23 @@ bool ChangeLane::CreateGuardObstacle(
double
ref_s
=
sl_point
.
s
()
+
kStepDistance
;
for
(
double
t
=
last_point
.
relative_time
()
+
time_delta
;
ref_s
<
end_s
;
ref_s
+=
kStepDistance
,
s
+=
kStepDistance
,
t
+=
time_delta
)
{
auto
ref_point
=
reference_line
.
GetNearestReferencepoint
(
s
);
auto
ref_point
=
reference_line
.
GetNearestReferencepoint
(
ref_s
);
Vec2d
xy_point
;
if
(
!
reference_line
.
SLToXY
(
common
::
util
::
MakeSLPoint
(
ref_s
,
sl_point
.
l
()),
&
xy_point
))
{
return
false
;
}
auto
*
tp
=
obstacle
->
AddTrajectoryPoint
();
tp
->
set_a
(
0.0
);
tp
->
set_v
(
extend_v
);
tp
->
set_relative_time
(
t
);
tp
->
mutable_path_point
()
->
set_x
(
ref
_point
.
x
());
tp
->
mutable_path_point
()
->
set_y
(
ref
_point
.
y
());
tp
->
mutable_path_point
()
->
set_x
(
xy
_point
.
x
());
tp
->
mutable_path_point
()
->
set_y
(
xy
_point
.
y
());
tp
->
mutable_path_point
()
->
set_theta
(
ref_point
.
heading
());
// this is an approximate estimate since we do not use it.
tp
->
mutable_path_point
()
->
set_s
(
s
);
tp
->
mutable_path_point
()
->
set_kappa
(
ref_point
.
kappa
());
}
...
...
modules/planning/testdata/garage_test/result_stop_over_line_0.pb.txt
浏览文件 @
2ccbc6fe
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录