Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
cf479c34
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,发现更多精彩内容 >>
提交
cf479c34
编写于
2月 05, 2018
作者:
U
unacao
提交者:
Jiangtao Hu
2月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
display road boundaries
上级
ff2801d8
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
48 addition
and
3 deletion
+48
-3
modules/dreamview/backend/map/map_service.cc
modules/dreamview/backend/map/map_service.cc
+15
-0
modules/dreamview/frontend/.gitignore
modules/dreamview/frontend/.gitignore
+1
-0
modules/dreamview/frontend/dist/app.bundle.js
modules/dreamview/frontend/dist/app.bundle.js
+2
-2
modules/dreamview/frontend/dist/app.bundle.js.map
modules/dreamview/frontend/dist/app.bundle.js.map
+1
-1
modules/dreamview/frontend/proto_bundle/proto_bundle.json
modules/dreamview/frontend/proto_bundle/proto_bundle.json
+5
-0
modules/dreamview/frontend/src/renderer/map.js
modules/dreamview/frontend/src/renderer/map.js
+23
-0
modules/dreamview/proto/simulation_world.proto
modules/dreamview/proto/simulation_world.proto
+1
-0
未找到文件。
modules/dreamview/backend/map/map_service.cc
浏览文件 @
cf479c34
...
...
@@ -33,6 +33,7 @@ using apollo::hdmap::Id;
using
apollo
::
hdmap
::
LaneInfoConstPtr
;
using
apollo
::
hdmap
::
CrosswalkInfoConstPtr
;
using
apollo
::
hdmap
::
JunctionInfoConstPtr
;
using
apollo
::
hdmap
::
RoadInfoConstPtr
;
using
apollo
::
hdmap
::
SignalInfoConstPtr
;
using
apollo
::
hdmap
::
StopSignInfoConstPtr
;
using
apollo
::
hdmap
::
YieldSignInfoConstPtr
;
...
...
@@ -200,6 +201,12 @@ void MapService::CollectMapElementIds(const PointENU &point, double radius,
AERROR
<<
"Failed to get yield signs from sim_map."
;
}
ExtractIds
(
yield_signs
,
ids
->
mutable_yield
());
std
::
vector
<
RoadInfoConstPtr
>
roads
;
if
(
sim_map_
->
GetRoads
(
point
,
radius
,
&
roads
)
!=
0
)
{
AERROR
<<
"Failed to get roads from sim_map."
;
}
ExtractIds
(
roads
,
ids
->
mutable_road
());
}
Map
MapService
::
RetrieveMapElements
(
const
MapElementIds
&
ids
)
const
{
...
...
@@ -259,6 +266,14 @@ Map MapService::RetrieveMapElements(const MapElementIds &ids) const {
}
}
for
(
const
auto
&
id
:
ids
.
road
())
{
map_id
.
set_id
(
id
);
auto
element
=
sim_map_
->
GetRoadById
(
map_id
);
if
(
element
)
{
*
result
.
add_road
()
=
element
->
road
();
}
}
for
(
const
auto
&
id
:
ids
.
overlap
())
{
map_id
.
set_id
(
id
);
auto
element
=
sim_map_
->
GetOverlapById
(
map_id
);
...
...
modules/dreamview/frontend/.gitignore
浏览文件 @
cf479c34
...
...
@@ -2,3 +2,4 @@ node_modules/
yarn-error.log
!*bundle.js
dist_offline/
dist/assets/map_data
modules/dreamview/frontend/dist/app.bundle.js
浏览文件 @
cf479c34
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/app.bundle.js.map
浏览文件 @
cf479c34
此差异已折叠。
点击以展开。
modules/dreamview/frontend/proto_bundle/proto_bundle.json
浏览文件 @
cf479c34
...
...
@@ -374,6 +374,11 @@
"rule"
:
"repeated"
,
"type"
:
"string"
,
"id"
:
7
},
"road"
:
{
"rule"
:
"repeated"
,
"type"
:
"string"
,
"id"
:
8
}
}
},
...
...
modules/dreamview/frontend/src/renderer/map.js
浏览文件 @
cf479c34
...
...
@@ -141,6 +141,23 @@ export default class Map {
return
drewObjects
;
}
addRoad
(
road
,
coordinates
,
scene
)
{
const
drewObjects
=
[];
road
.
section
.
forEach
(
section
=>
{
section
.
boundary
.
outerPolygon
.
edge
.
forEach
(
edge
=>
{
edge
.
curve
.
segment
.
forEach
((
segment
,
index
)
=>
{
const
points
=
coordinates
.
applyOffsetToArray
(
segment
.
lineSegment
.
point
);
const
boundary
=
this
.
addLaneMesh
(
"
CURB
"
,
points
);
scene
.
add
(
boundary
);
drewObjects
.
push
(
boundary
);
});
});
});
return
drewObjects
;
}
addCrossWalk
(
crosswalk
,
coordinates
,
scene
)
{
const
drewObjects
=
[];
...
...
@@ -404,6 +421,12 @@ export default class Map {
newData
[
kind
][
i
],
coordinates
,
scene
)
}));
break
;
case
"
road
"
:
const
road
=
newData
[
kind
][
i
];
this
.
data
[
kind
].
push
(
Object
.
assign
(
newData
[
kind
][
i
],
{
drewObjects
:
this
.
addRoad
(
road
,
coordinates
,
scene
)
}));
break
;
default
:
this
.
data
[
kind
].
push
(
newData
[
kind
][
i
]);
break
;
...
...
modules/dreamview/proto/simulation_world.proto
浏览文件 @
cf479c34
...
...
@@ -164,6 +164,7 @@ message MapElementIds {
repeated
string
stop_sign
=
5
;
repeated
string
yield
=
6
;
repeated
string
overlap
=
7
;
repeated
string
road
=
8
;
}
// Next-id: 17
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录