Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
61f87fd2
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 搜索 >>
提交
61f87fd2
编写于
12月 21, 2017
作者:
K
kechxu
提交者:
Calvin Miao
12月 21, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: fix bug in lane_sequence_predictor
上级
85afbaf2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
6 deletion
+26
-6
modules/prediction/predictor/lane_sequence/BUILD
modules/prediction/predictor/lane_sequence/BUILD
+1
-0
modules/prediction/predictor/lane_sequence/lane_sequence_predictor.cc
...iction/predictor/lane_sequence/lane_sequence_predictor.cc
+23
-4
modules/prediction/predictor/lane_sequence/lane_sequence_predictor.h
...diction/predictor/lane_sequence/lane_sequence_predictor.h
+2
-2
未找到文件。
modules/prediction/predictor/lane_sequence/BUILD
浏览文件 @
61f87fd2
...
...
@@ -13,6 +13,7 @@ cc_library(
"//modules/common/proto:pnc_point_proto"
,
"//modules/prediction/common:prediction_gflags"
,
"//modules/prediction/common:prediction_util"
,
"//modules/prediction/common:prediction_map"
,
"//modules/prediction/predictor/sequence:sequence_predictor"
,
"//modules/prediction/proto:lane_graph_proto"
,
"@eigen//:eigen"
,
...
...
modules/prediction/predictor/lane_sequence/lane_sequence_predictor.cc
浏览文件 @
61f87fd2
...
...
@@ -18,10 +18,12 @@
#include <string>
#include <utility>
#include <memory>
#include "modules/common/log.h"
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/prediction/common/prediction_util.h"
#include "modules/prediction/common/prediction_map.h"
namespace
apollo
{
namespace
prediction
{
...
...
@@ -29,6 +31,7 @@ namespace prediction {
using
apollo
::
common
::
PathPoint
;
using
apollo
::
common
::
TrajectoryPoint
;
using
apollo
::
common
::
math
::
KalmanFilter
;
using
apollo
::
hdmap
::
LaneInfo
;
void
LaneSequencePredictor
::
Predict
(
Obstacle
*
obstacle
)
{
Clear
();
...
...
@@ -88,9 +91,11 @@ void LaneSequencePredictor::Predict(Obstacle* obstacle) {
std
::
string
curr_lane_id
=
sequence
.
lane_segment
(
0
).
lane_id
();
std
::
vector
<
TrajectoryPoint
>
points
;
DrawLaneSequenceTrajectoryPoints
(
obstacle
->
kf_lane_tracker
(
curr_lane_id
),
sequence
,
FLAGS_prediction_duration
,
FLAGS_prediction_freq
,
&
points
);
DrawLaneSequenceTrajectoryPoints
(
feature
,
curr_lane_id
,
obstacle
->
kf_lane_tracker
(
curr_lane_id
),
sequence
,
FLAGS_prediction_duration
,
FLAGS_prediction_freq
,
&
points
);
Trajectory
trajectory
=
GenerateTrajectory
(
points
);
trajectory
.
set_probability
(
sequence
.
probability
());
...
...
@@ -102,11 +107,25 @@ void LaneSequencePredictor::Predict(Obstacle* obstacle) {
}
void
LaneSequencePredictor
::
DrawLaneSequenceTrajectoryPoints
(
const
Feature
&
feature
,
const
std
::
string
&
lane_id
,
const
KalmanFilter
<
double
,
4
,
2
,
0
>&
kf
,
const
LaneSequence
&
sequence
,
double
total_time
,
double
freq
,
std
::
vector
<
TrajectoryPoint
>*
points
)
{
// PredictionMap* map = PredictionMap::instance();
Eigen
::
Matrix
<
double
,
4
,
1
>
state
(
kf
.
GetStateEstimate
());
if
(
!
FLAGS_enable_kf_tracking
)
{
Eigen
::
Vector2d
position
(
feature
.
position
().
x
(),
feature
.
position
().
y
());
PredictionMap
*
map
=
PredictionMap
::
instance
();
std
::
shared_ptr
<
const
LaneInfo
>
lane_info
=
map
->
LaneById
(
lane_id
);
double
lane_s
=
0.0
;
double
lane_l
=
0.0
;
if
(
map
->
GetProjection
(
position
,
lane_info
,
&
lane_s
,
&
lane_l
))
{
state
(
0
,
0
)
=
lane_s
;
state
(
1
,
0
)
=
lane_l
;
state
(
2
,
0
)
=
feature
.
speed
();
state
(
3
,
0
)
=
feature
.
acc
();
}
}
if
(
FLAGS_enable_rnn_acc
&&
sequence
.
has_acceleration
())
{
state
(
3
,
0
)
=
sequence
.
acceleration
();
}
...
...
modules/prediction/predictor/lane_sequence/lane_sequence_predictor.h
浏览文件 @
61f87fd2
...
...
@@ -22,9 +22,8 @@
#ifndef MODULES_PREDICTION_PREDICTOR_LANE_SEQUENCE_LANE_SEQUENCE_PREDICTOR_H_
#define MODULES_PREDICTION_PREDICTOR_LANE_SEQUENCE_LANE_SEQUENCE_PREDICTOR_H_
//
#include <string>
#include <string>
#include <vector>
// #include "Eigen/Dense"
#include "modules/common/math/kalman_filter.h"
#include "modules/common/proto/pnc_point.pb.h"
...
...
@@ -62,6 +61,7 @@ class LaneSequencePredictor : public SequencePredictor {
* @param A vector of generated trajectory points
*/
void
DrawLaneSequenceTrajectoryPoints
(
const
Feature
&
feature
,
const
std
::
string
&
lane_id
,
const
common
::
math
::
KalmanFilter
<
double
,
4
,
2
,
0
>&
kf
,
const
LaneSequence
&
sequence
,
double
total_time
,
double
freq
,
std
::
vector
<
common
::
TrajectoryPoint
>*
points
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录