Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
661c3401
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,发现更多精彩内容 >>
提交
661c3401
编写于
8月 22, 2017
作者:
D
Dong Li
提交者:
Jiangtao Hu
8月 22, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: remove unnecessary sl projection in smoother
上级
b12dd379
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
2849 addition
and
2833 deletion
+2849
-2833
modules/map/pnc_map/pnc_map.cc
modules/map/pnc_map/pnc_map.cc
+1
-0
modules/planning/integration_tests/garage_test.cc
modules/planning/integration_tests/garage_test.cc
+10
-10
modules/planning/reference_line/reference_line_smoother.cc
modules/planning/reference_line/reference_line_smoother.cc
+4
-10
modules/planning/reference_line/reference_line_smoother_test.cc
...s/planning/reference_line/reference_line_smoother_test.cc
+1
-1
modules/planning/reference_line/reference_point.cc
modules/planning/reference_line/reference_point.cc
+19
-0
modules/planning/reference_line/reference_point.h
modules/planning/reference_line/reference_point.h
+2
-0
modules/planning/testdata/garage_test/result_follow_0.pb.txt
modules/planning/testdata/garage_test/result_follow_0.pb.txt
+640
-640
modules/planning/testdata/garage_test/result_stop_dest_0.pb.txt
...s/planning/testdata/garage_test/result_stop_dest_0.pb.txt
+1050
-1050
modules/planning/testdata/garage_test/result_stop_obstacle_0.pb.txt
...anning/testdata/garage_test/result_stop_obstacle_0.pb.txt
+1122
-1122
未找到文件。
modules/map/pnc_map/pnc_map.cc
浏览文件 @
661c3401
...
...
@@ -465,6 +465,7 @@ void PncMap::CreatePathFromLaneSegments(const LaneSegments &segments,
append_lane_to_points
(
segment
.
lane
,
segment
.
start_s
,
segment
.
end_s
,
&
points
);
}
remove_duplicates
(
&
points
);
*
path
=
hdmap
::
Path
(
points
,
segments
,
kTrajectoryApproximationMaxError
);
}
...
...
modules/planning/integration_tests/garage_test.cc
浏览文件 @
661c3401
...
...
@@ -80,16 +80,16 @@ TEST_F(GarageTest, follow) {
/*
* test stop for destination
*/
//
TEST_F(GarageTest, stop_dest) {
//
FLAGS_test_prediction_file =
//
"modules/planning/testdata/garage_test/stop_dest_prediction.pb.txt";
//
FLAGS_test_localization_file =
//
"modules/planning/testdata/garage_test/stop_dest_localization.pb.txt";
//
FLAGS_test_chassis_file =
//
"modules/planning/testdata/garage_test/stop_dest_chassis.pb.txt";
//
PlanningTestBase::SetUp();
//
RUN_GOLDEN_TEST;
//
}
TEST_F
(
GarageTest
,
stop_dest
)
{
FLAGS_test_prediction_file
=
"modules/planning/testdata/garage_test/stop_dest_prediction.pb.txt"
;
FLAGS_test_localization_file
=
"modules/planning/testdata/garage_test/stop_dest_localization.pb.txt"
;
FLAGS_test_chassis_file
=
"modules/planning/testdata/garage_test/stop_dest_chassis.pb.txt"
;
PlanningTestBase
::
SetUp
();
RUN_GOLDEN_TEST
;
}
}
// namespace planning
}
// namespace apollo
...
...
modules/planning/reference_line/reference_line_smoother.cc
浏览文件 @
661c3401
...
...
@@ -87,7 +87,8 @@ bool ReferenceLineSmoother::smooth(
(
end_t
-
start_t
)
/
(
smoother_config_
.
num_of_total_points
()
-
1
);
double
t
=
start_t
;
for
(
std
::
uint32_t
i
=
0
;
i
<
smoother_config_
.
num_of_total_points
()
&&
t
<
end_t
;
++
i
)
{
i
<
smoother_config_
.
num_of_total_points
()
&&
t
<
end_t
;
++
i
,
t
+=
resolution
)
{
std
::
pair
<
double
,
double
>
xy
=
spline_solver_
->
spline
()(
t
);
const
double
heading
=
std
::
atan2
(
spline_solver_
->
spline
().
derivative_y
(
t
),
spline_solver_
->
spline
().
DerivativeX
(
t
));
...
...
@@ -108,20 +109,13 @@ bool ReferenceLineSmoother::smooth(
AERROR
<<
"Get corresponding s failed!"
;
return
false
;
}
common
::
SLPoint
ref_sl_point
;
if
(
!
raw_reference_line
.
xy_to_sl
({
xy
.
first
,
xy
.
second
},
&
ref_sl_point
))
{
AERROR
<<
"get sl point failed!"
<<
std
::
endl
;
return
false
;
}
ReferencePoint
rlp
=
raw_reference_line
.
get_reference_point
(
ref_sl_point
.
s
());
ReferencePoint
rlp
=
raw_reference_line
.
get_reference_point
(
s
);
ref_points
.
emplace_back
(
ReferencePoint
(
hdmap
::
MapPathPoint
(
common
::
math
::
Vec2d
(
xy
.
first
,
xy
.
second
),
heading
,
rlp
.
lane_waypoints
()),
kappa
,
dkappa
,
0.0
,
0.0
));
t
=
start_t
+
(
i
+
1
)
*
resolution
;
}
ReferencePoint
::
remove_duplicates
(
&
ref_points
);
*
smoothed_reference_line
=
ReferenceLine
(
ref_points
);
return
true
;
}
...
...
modules/planning/reference_line/reference_line_smoother_test.cc
浏览文件 @
661c3401
...
...
@@ -73,7 +73,7 @@ TEST_F(ReferenceLineSmootherTest, smooth) {
ReferenceLine
smoothed_reference_line
;
EXPECT_FLOAT_EQ
(
153.87421
,
reference_line_
->
length
());
EXPECT_TRUE
(
smoother_
.
smooth
(
*
reference_line_
,
&
smoothed_reference_line
));
EXPECT_FLOAT_EQ
(
15
3.8469
7
,
smoothed_reference_line
.
length
());
EXPECT_FLOAT_EQ
(
15
4.1628
7
,
smoothed_reference_line
.
length
());
}
}
// namespace planning
...
...
modules/planning/reference_line/reference_point.cc
浏览文件 @
661c3401
...
...
@@ -29,6 +29,10 @@ namespace apollo {
namespace
planning
{
using
apollo
::
common
::
PathPoint
;
namespace
{
// Minimum distance to remove duplicated points.
const
double
kDuplicatedPointsEpsilon
=
1e-7
;
}
ReferencePoint
::
ReferencePoint
(
const
MapPathPoint
&
map_path_point
,
const
double
kappa
,
const
double
dkappa
,
...
...
@@ -57,5 +61,20 @@ const std::string ReferencePoint::DebugString() const {
// clang-format on
}
void
ReferencePoint
::
remove_duplicates
(
std
::
vector
<
ReferencePoint
>*
points
)
{
CHECK_NOTNULL
(
points
);
int
count
=
0
;
const
double
limit
=
kDuplicatedPointsEpsilon
*
kDuplicatedPointsEpsilon
;
for
(
size_t
i
=
0
;
i
<
points
->
size
();
++
i
)
{
if
(
count
==
0
||
(
*
points
)[
i
].
DistanceSquareTo
((
*
points
)[
count
-
1
])
>
limit
)
{
(
*
points
)[
count
++
]
=
(
*
points
)[
i
];
}
else
{
(
*
points
)[
count
-
1
].
add_lane_waypoints
((
*
points
)[
i
].
lane_waypoints
());
}
}
points
->
resize
(
count
);
}
}
// namespace planning
}
// namespace apollo
modules/planning/reference_line/reference_point.h
浏览文件 @
661c3401
...
...
@@ -47,6 +47,8 @@ class ReferencePoint : public hdmap::MapPathPoint {
const
std
::
string
DebugString
()
const
;
static
void
remove_duplicates
(
std
::
vector
<
ReferencePoint
>*
points
);
private:
double
kappa_
=
0.0
;
double
dkappa_
=
0.0
;
...
...
modules/planning/testdata/garage_test/result_follow_0.pb.txt
浏览文件 @
661c3401
此差异已折叠。
点击以展开。
modules/planning/testdata/garage_test/result_stop_dest_0.pb.txt
浏览文件 @
661c3401
此差异已折叠。
点击以展开。
modules/planning/testdata/garage_test/result_stop_obstacle_0.pb.txt
浏览文件 @
661c3401
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录