Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
fd9bd6a2
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,体验更适合开发者的 AI 搜索 >>
提交
fd9bd6a2
编写于
9月 12, 2017
作者:
D
Dong Li
提交者:
lianglia-apollo
9月 12, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: fix a double number sum bug
上级
40bbbd73
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
8 deletion
+10
-8
modules/planning/tasks/qp_spline_path/qp_frenet_frame.cc
modules/planning/tasks/qp_spline_path/qp_frenet_frame.cc
+10
-8
未找到文件。
modules/planning/tasks/qp_spline_path/qp_frenet_frame.cc
浏览文件 @
fd9bd6a2
...
...
@@ -85,7 +85,9 @@ bool QpFrenetFrame::Init(const uint32_t num_points,
const
auto
inf
=
std
::
numeric_limits
<
double
>::
infinity
();
const
double
resolution
=
(
end_s_
-
start_s_
)
/
num_points
;
for
(
double
s
=
start_s_
;
s
<=
end_s_
;
s
+=
resolution
)
{
double
s
=
start_s_
;
for
(
uint32_t
i
=
0
;
i
<
num_points
;
++
i
,
s
=
std
::
min
(
s
+
resolution
,
end_s_
))
{
evaluated_knots_
.
push_back
(
s
);
hdmap_bound_
.
emplace_back
(
-
inf
,
inf
);
static_obstacle_bound_
.
emplace_back
(
-
inf
,
inf
);
...
...
@@ -284,9 +286,9 @@ bool QpFrenetFrame::MapLine(
return
true
;
}
double
distance
=
const
double
distance
=
std
::
max
(
further_point
.
s
()
-
near_point
.
s
(),
common
::
math
::
kMathEpsilon
);
const
double
adc_half_width
=
vehicle_param_
.
width
()
/
2
;
for
(
uint32_t
i
=
impact_index
.
first
;
i
<=
impact_index
.
second
;
++
i
)
{
double
weight
=
std
::
abs
((
evaluated_knots_
[
i
]
-
near_point
.
s
()))
/
distance
;
weight
=
std
::
max
(
weight
,
0.0
);
...
...
@@ -295,10 +297,10 @@ bool QpFrenetFrame::MapLine(
near_point
.
l
()
*
(
1
-
weight
)
+
further_point
.
l
()
*
weight
;
if
(
nudge_type
==
ObjectNudge
::
LEFT_NUDGE
)
{
boundary
+=
vehicle_param_
.
width
()
/
2
;
boundary
+=
adc_half_width
;
(
*
constraint
)[
i
].
first
=
std
::
max
(
boundary
,
(
*
constraint
)[
i
].
first
);
}
else
{
boundary
-=
vehicle_param_
.
width
()
/
2
;
boundary
-=
adc_half_width
;
(
*
constraint
)[
i
].
second
=
std
::
min
(
boundary
,
(
*
constraint
)[
i
].
second
);
}
...
...
@@ -374,6 +376,7 @@ std::pair<uint32_t, uint32_t> QpFrenetFrame::FindInterval(
}
void
QpFrenetFrame
::
CalculateHDMapBound
()
{
const
double
adc_half_width
=
vehicle_param_
.
width
()
/
2.0
;
for
(
uint32_t
i
=
0
;
i
<
hdmap_bound_
.
size
();
++
i
)
{
double
left_bound
=
0.0
;
double
right_bound
=
0.0
;
...
...
@@ -385,14 +388,13 @@ void QpFrenetFrame::CalculateHDMapBound() {
left_bound
=
FLAGS_default_reference_line_width
/
2
;
}
hdmap_bound_
[
i
].
first
=
-
right_bound
+
vehicle_param_
.
width
()
/
2
;
hdmap_bound_
[
i
].
second
=
left_bound
-
vehicle_param_
.
width
()
/
2
;
hdmap_bound_
[
i
].
first
=
-
right_bound
+
adc_half_width
;
hdmap_bound_
[
i
].
second
=
left_bound
-
adc_half_width
;
if
(
hdmap_bound_
[
i
].
first
>=
hdmap_bound_
[
i
].
second
)
{
ADEBUG
<<
"HD Map bound at "
<<
evaluated_knots_
[
i
]
<<
" is infeasible ("
<<
hdmap_bound_
[
i
].
first
<<
", "
<<
hdmap_bound_
[
i
].
second
<<
") "
<<
std
::
endl
;
ADEBUG
<<
"vehicle_param_.width = "
<<
vehicle_param_
.
width
();
ADEBUG
<<
"left_bound: "
<<
left_bound
;
ADEBUG
<<
"right_bound: "
<<
right_bound
;
feasible_longitudinal_upper_bound_
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录