Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
53a45702
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,发现更多精彩内容 >>
提交
53a45702
编写于
7月 18, 2019
作者:
K
kechxu
提交者:
HongyiSun
7月 18, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: refactor interface of draw base map
上级
182a3d24
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
8 deletion
+8
-8
modules/prediction/common/semantic_map.cc
modules/prediction/common/semantic_map.cc
+6
-6
modules/prediction/common/semantic_map.h
modules/prediction/common/semantic_map.h
+2
-2
未找到文件。
modules/prediction/common/semantic_map.cc
浏览文件 @
53a45702
...
...
@@ -58,9 +58,7 @@ void SemanticMap::RunCurrFrame(
return
;
}
obstacle_id_history_map_
=
obstacle_id_history_map
;
const
Feature
&
ego_feature
=
obstacle_id_history_map_
.
at
(
FLAGS_ego_vehicle_id
).
feature
(
0
);
curr_timestamp_
=
ego_feature
.
timestamp
();
ego_feature_
=
obstacle_id_history_map_
.
at
(
FLAGS_ego_vehicle_id
).
feature
(
0
);
// curr_base_x_ = ego_feature.position().x() - config_.observation_range();
// curr_base_y_ = ego_feature.position().y() - config_.observation_range();
// cv::Rect rect(static_cast<int>((curr_base_x_ - config_.base_point().x()) /
...
...
@@ -72,7 +70,7 @@ void SemanticMap::RunCurrFrame(
// 2000, 2000);
// base_img_(rect).copyTo(curr_img_);
// TODO(all): move to somewhere else
DrawBaseMap
(
ego_feature
.
position
().
x
(),
ego_feature
.
position
().
y
()
);
DrawBaseMap
();
base_img_
.
copyTo
(
curr_img_
);
// Draw all obstacles_history
...
...
@@ -92,7 +90,9 @@ void SemanticMap::RunCurrFrame(
}
}
void
SemanticMap
::
DrawBaseMap
(
const
double
x
,
const
double
y
)
{
void
SemanticMap
::
DrawBaseMap
()
{
double
x
=
ego_feature_
.
position
().
x
();
double
y
=
ego_feature_
.
position
().
y
();
base_img_
=
cv
::
Mat
(
2000
,
2000
,
CV_8UC3
,
cv
::
Scalar
(
0
,
0
,
0
));
curr_base_x_
=
x
-
100.0
;
curr_base_y_
=
y
-
100.0
;
...
...
@@ -257,7 +257,7 @@ void SemanticMap::DrawHistory(const ObstacleHistory& history,
const
cv
::
Scalar
&
color
,
cv
::
Mat
*
img
)
{
for
(
int
i
=
history
.
feature_size
()
-
1
;
i
>=
0
;
--
i
)
{
const
Feature
&
feature
=
history
.
feature
(
i
);
double
time_decay
=
1.0
-
curr_timestamp_
+
feature
.
timestamp
();
double
time_decay
=
1.0
-
ego_feature_
.
timestamp
()
+
feature
.
timestamp
();
cv
::
Scalar
decay_color
=
color
*
time_decay
;
if
(
feature
.
id
()
==
FLAGS_ego_vehicle_id
)
{
DrawRect
(
feature
,
decay_color
,
img
);
...
...
modules/prediction/common/semantic_map.h
浏览文件 @
53a45702
...
...
@@ -44,7 +44,7 @@ class SemanticMap {
static_cast
<
int
>
(
2000
-
(
y
-
curr_base_y_
)
/
0.1
));
}
void
DrawBaseMap
(
const
double
x
,
const
double
y
);
void
DrawBaseMap
();
void
DrawRoads
(
const
common
::
PointENU
&
center_point
,
const
cv
::
Scalar
&
color
=
cv
::
Scalar
(
64
,
64
,
64
));
...
...
@@ -80,7 +80,7 @@ class SemanticMap {
std
::
unordered_map
<
int
,
ObstacleHistory
>
obstacle_id_history_map_
;
double
curr_base_x_
=
0.0
;
double
curr_base_y_
=
0.0
;
double
curr_timestamp_
=
0.0
;
Feature
ego_feature_
;
DECLARE_SINGLETON
(
SemanticMap
)
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录