Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
3a04211f
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,发现更多精彩内容 >>
提交
3a04211f
编写于
6月 26, 2018
作者:
K
kechxu
提交者:
Qi Luo
6月 26, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: make prediction duration longer
上级
5d4c463b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
4 deletion
+20
-4
modules/prediction/common/prediction_gflags.cc
modules/prediction/common/prediction_gflags.cc
+1
-1
modules/prediction/predictor/free_move/free_move_predictor_test.cc
...rediction/predictor/free_move/free_move_predictor_test.cc
+1
-1
modules/prediction/predictor/regional/regional_predictor_test.cc
.../prediction/predictor/regional/regional_predictor_test.cc
+18
-2
未找到文件。
modules/prediction/common/prediction_gflags.cc
浏览文件 @
3a04211f
...
@@ -37,7 +37,7 @@ DEFINE_double(
...
@@ -37,7 +37,7 @@ DEFINE_double(
DEFINE_bool
(
prediction_offline_mode
,
false
,
"Prediction offline mode"
);
DEFINE_bool
(
prediction_offline_mode
,
false
,
"Prediction offline mode"
);
DEFINE_double
(
prediction_duration
,
5
.0
,
"Prediction duration (in seconds)"
);
DEFINE_double
(
prediction_duration
,
8
.0
,
"Prediction duration (in seconds)"
);
DEFINE_double
(
prediction_period
,
0.1
,
"Prediction period (in seconds"
);
DEFINE_double
(
prediction_period
,
0.1
,
"Prediction period (in seconds"
);
DEFINE_double
(
double_precision
,
1e-6
,
"precision of double"
);
DEFINE_double
(
double_precision
,
1e-6
,
"precision of double"
);
DEFINE_double
(
min_prediction_length
,
20.0
,
DEFINE_double
(
min_prediction_length
,
20.0
,
...
...
modules/prediction/predictor/free_move/free_move_predictor_test.cc
浏览文件 @
3a04211f
...
@@ -62,7 +62,7 @@ TEST_F(FreeMovePredictorTest, General) {
...
@@ -62,7 +62,7 @@ TEST_F(FreeMovePredictorTest, General) {
predictor
.
Predict
(
obstacle_ptr
);
predictor
.
Predict
(
obstacle_ptr
);
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
EXPECT_EQ
(
trajectories
.
size
(),
1
);
EXPECT_EQ
(
trajectories
.
size
(),
1
);
EXPECT_EQ
(
trajectories
[
0
].
trajectory_point_size
(),
5
0
);
EXPECT_EQ
(
trajectories
[
0
].
trajectory_point_size
(),
8
0
);
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
x
(),
-
432.459
,
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
x
(),
-
432.459
,
0.001
);
0.001
);
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
y
(),
-
156.451
,
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
y
(),
-
156.451
,
...
...
modules/prediction/predictor/regional/regional_predictor_test.cc
浏览文件 @
3a04211f
...
@@ -49,7 +49,7 @@ class RegionalPredictorTest : public KMLMapBasedTest {
...
@@ -49,7 +49,7 @@ class RegionalPredictorTest : public KMLMapBasedTest {
apollo
::
perception
::
PerceptionObstacles
perception_obstacles_
;
apollo
::
perception
::
PerceptionObstacles
perception_obstacles_
;
};
};
TEST_F
(
RegionalPredictorTest
,
MovingPedestrian
)
{
TEST_F
(
RegionalPredictorTest
,
Predict
)
{
EXPECT_DOUBLE_EQ
(
perception_obstacles_
.
header
().
timestamp_sec
(),
EXPECT_DOUBLE_EQ
(
perception_obstacles_
.
header
().
timestamp_sec
(),
1501183430.161906
);
1501183430.161906
);
apollo
::
perception
::
PerceptionObstacle
perception_obstacle
=
apollo
::
perception
::
PerceptionObstacle
perception_obstacle
=
...
@@ -63,6 +63,22 @@ TEST_F(RegionalPredictorTest, MovingPedestrian) {
...
@@ -63,6 +63,22 @@ TEST_F(RegionalPredictorTest, MovingPedestrian) {
predictor
.
Predict
(
obstacle_ptr
);
predictor
.
Predict
(
obstacle_ptr
);
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
EXPECT_EQ
(
trajectories
.
size
(),
2
);
EXPECT_EQ
(
trajectories
.
size
(),
2
);
}
TEST_F
(
RegionalPredictorTest
,
MovingPedestrian
)
{
EXPECT_DOUBLE_EQ
(
perception_obstacles_
.
header
().
timestamp_sec
(),
1501183430.161906
);
apollo
::
perception
::
PerceptionObstacle
perception_obstacle
=
perception_obstacles_
.
perception_obstacle
(
0
);
EXPECT_EQ
(
perception_obstacle
.
id
(),
101
);
ObstaclesContainer
container
;
container
.
Insert
(
perception_obstacles_
);
Obstacle
*
obstacle_ptr
=
container
.
GetObstacle
(
101
);
EXPECT_TRUE
(
obstacle_ptr
!=
nullptr
);
RegionalPredictor
predictor
;
predictor
.
GenerateMovingTrajectory
(
obstacle_ptr
,
1.0
);
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
EXPECT_EQ
(
trajectories
.
size
(),
2
);
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
x
(),
-
438.159
,
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
x
(),
-
438.159
,
0.001
);
0.001
);
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
y
(),
-
157.404
,
EXPECT_NEAR
(
trajectories
[
0
].
trajectory_point
(
9
).
path_point
().
y
(),
-
157.404
,
...
@@ -92,7 +108,7 @@ TEST_F(RegionalPredictorTest, StationaryPedestrian) {
...
@@ -92,7 +108,7 @@ TEST_F(RegionalPredictorTest, StationaryPedestrian) {
Obstacle
*
obstacle_ptr
=
container
.
GetObstacle
(
102
);
Obstacle
*
obstacle_ptr
=
container
.
GetObstacle
(
102
);
EXPECT_TRUE
(
obstacle_ptr
!=
nullptr
);
EXPECT_TRUE
(
obstacle_ptr
!=
nullptr
);
RegionalPredictor
predictor
;
RegionalPredictor
predictor
;
predictor
.
Predict
(
obstacle_ptr
);
predictor
.
GenerateStillTrajectory
(
obstacle_ptr
,
1.0
);
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
const
std
::
vector
<
Trajectory
>&
trajectories
=
predictor
.
trajectories
();
EXPECT_EQ
(
trajectories
.
size
(),
1
);
EXPECT_EQ
(
trajectories
.
size
(),
1
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录