Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
5c76430f
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 搜索 >>
提交
5c76430f
编写于
7月 25, 2017
作者:
J
jiangyifei
提交者:
Jiangtao Hu
7月 25, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updated path sampler
上级
0ef7bdb1
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
33 addition
and
13 deletion
+33
-13
modules/planning/optimizer/dp_poly_path/path_sampler.cc
modules/planning/optimizer/dp_poly_path/path_sampler.cc
+33
-12
modules/planning/optimizer/dp_poly_path/path_sampler.h
modules/planning/optimizer/dp_poly_path/path_sampler.h
+0
-1
未找到文件。
modules/planning/optimizer/dp_poly_path/path_sampler.cc
浏览文件 @
5c76430f
...
...
@@ -21,10 +21,6 @@
#include <vector>
#include "modules/planning/optimizer/dp_poly_path/path_sampler.h"
#include "modules/common/log.h"
#include "modules/planning/math/double.h"
#include "modules/planning/reference_line/reference_line.h"
#include "modules/common/proto/path_point.pb.h"
namespace
apollo
{
namespace
planning
{
...
...
@@ -39,7 +35,8 @@ Status PathSampler::sample(
const
::
apollo
::
common
::
SLPoint
&
init_sl_point
,
std
::
vector
<
std
::
vector
<::
apollo
::
common
::
SLPoint
>>*
const
points
)
{
CHECK_NOTNULL
(
points
);
double
reference_line_length
=
reference_line
.
reference_map_line
().
accumulated_s
().
back
();
double
reference_line_length
=
reference_line
.
reference_map_line
().
accumulated_s
().
back
();
double
step_length
=
init_point
.
v
();
step_length
=
std
::
min
(
step_length
,
_config
.
step_length_max
());
step_length
=
std
::
max
(
step_length
,
_config
.
step_length_min
());
...
...
@@ -54,7 +51,8 @@ Status PathSampler::sample(
}
accumulated_s
+=
step_length
;
double
level_start_l
=
center_l
-
_config
.
lateral_sample_offset
()
*
((
_config
.
sample_points_num_each_level
()
-
1
)
>>
1
);
-
_config
.
lateral_sample_offset
()
*
((
_config
.
sample_points_num_each_level
()
-
1
)
>>
1
);
for
(
size_t
j
=
0
;
j
<
_config
.
sample_points_num_each_level
();
++
j
)
{
::
apollo
::
common
::
SLPoint
sl_point
;
sl_point
.
set_s
(
accumulated_s
);
...
...
@@ -65,15 +63,38 @@ Status PathSampler::sample(
}
if
(
level_points
.
empty
())
{
if
(
accumulated_s
>
reference_line_length
)
{
level_points
.
emplace_back
(
reference_line_length
,
-
_config
.
lateral_sample_offset
());
level_points
.
emplace_back
(
reference_line_length
,
0.0
);
level_points
.
emplace_back
(
reference_line_length
,
_config
.
lateral_sample_offset
());
::
apollo
::
common
::
SLPoint
sl_point
;
sl_point
.
set_s
(
reference_line_length
);
sl_point
.
set_l
(
-
_config
.
lateral_sample_offset
());
level_points
.
emplace_back
(
std
::
move
(
sl_point
));
::
apollo
::
common
::
SLPoint
sl_point2
;
sl_point2
.
set_s
(
reference_line_length
);
sl_point2
.
set_l
(
0.0
);
level_points
.
emplace_back
(
std
::
move
(
sl_point2
));
::
apollo
::
common
::
SLPoint
sl_point3
;
sl_point3
.
set_s
(
reference_line_length
);
sl_point3
.
set_l
(
_config
.
lateral_sample_offset
());
level_points
.
emplace_back
(
std
::
move
(
sl_point3
));
points
->
push_back
(
level_points
);
return
Status
::
OK
();
}
else
{
level_points
.
emplace_back
(
accumulated_s
,
-
_config
.
lateral_sample_offset
());
level_points
.
emplace_back
(
accumulated_s
,
0.0
);
level_points
.
emplace_back
(
accumulated_s
,
_config
.
lateral_sample_offset
());
::
apollo
::
common
::
SLPoint
sl_point
;
sl_point
.
set_s
(
accumulated_s
);
sl_point
.
set_l
(
-
_config
.
lateral_sample_offset
());
level_points
.
emplace_back
(
std
::
move
(
sl_point
));
::
apollo
::
common
::
SLPoint
sl_point2
;
sl_point2
.
set_s
(
accumulated_s
);
sl_point2
.
set_l
(
0.0
);
level_points
.
emplace_back
(
std
::
move
(
sl_point2
));
::
apollo
::
common
::
SLPoint
sl_point3
;
sl_point3
.
set_s
(
accumulated_s
);
sl_point3
.
set_l
(
_config
.
lateral_sample_offset
());
level_points
.
emplace_back
(
std
::
move
(
sl_point3
));
}
}
points
->
push_back
(
level_points
);
...
...
modules/planning/optimizer/dp_poly_path/path_sampler.h
浏览文件 @
5c76430f
...
...
@@ -23,7 +23,6 @@
#include <vector>
#include "modules/common/proto/path_point.pb.h"
#include "modules/common/status/status.h"
#include "modules/planning/proto/dp_poly_path_config.pb.h"
#include "modules/planning/reference_line/reference_line.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录