Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
5bdd1b43
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,发现更多精彩内容 >>
提交
5bdd1b43
编写于
2月 28, 2018
作者:
V
Vivian Lin
提交者:
siyangy
2月 28, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dreamview: implemented map element toggles in layer menu (#3083)
上级
15e90470
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
74 addition
and
14 deletion
+74
-14
modules/dreamview/frontend/dist/app.bundle.js
modules/dreamview/frontend/dist/app.bundle.js
+7
-7
modules/dreamview/frontend/dist/app.bundle.js.map
modules/dreamview/frontend/dist/app.bundle.js.map
+1
-1
modules/dreamview/frontend/dist/navigation.bundle.js
modules/dreamview/frontend/dist/navigation.bundle.js
+1
-1
modules/dreamview/frontend/dist/navigation.bundle.js.map
modules/dreamview/frontend/dist/navigation.bundle.js.map
+1
-1
modules/dreamview/frontend/src/components/SideBar/Menu.js
modules/dreamview/frontend/src/components/SideBar/Menu.js
+7
-0
modules/dreamview/frontend/src/renderer/map.js
modules/dreamview/frontend/src/renderer/map.js
+30
-4
modules/dreamview/frontend/src/store/config/MenuData.js
modules/dreamview/frontend/src/store/config/MenuData.js
+13
-0
modules/dreamview/frontend/src/store/config/parameters.yml
modules/dreamview/frontend/src/store/config/parameters.yml
+7
-0
modules/dreamview/frontend/src/store/options.js
modules/dreamview/frontend/src/store/options.js
+7
-0
未找到文件。
modules/dreamview/frontend/dist/app.bundle.js
浏览文件 @
5bdd1b43
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/app.bundle.js.map
浏览文件 @
5bdd1b43
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/navigation.bundle.js
浏览文件 @
5bdd1b43
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
modules/dreamview/frontend/dist/navigation.bundle.js.map
浏览文件 @
5bdd1b43
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
modules/dreamview/frontend/src/components/SideBar/Menu.js
浏览文件 @
5bdd1b43
...
...
@@ -47,6 +47,13 @@ const MenuIdOptionMapping = {
planningLine
:
'
showPlanning
'
,
positionLocalization
:
'
showPositionLocalization
'
,
positionGps
:
'
showPositionGps
'
,
mapCrosswalk
:
'
showMapCrosswalk
'
,
mapClearArea
:
'
showMapClearArea
'
,
mapJunction
:
'
showMapJunction
'
,
mapLane
:
'
showMapLane
'
,
mapRoad
:
'
showMapRoad
'
,
mapSignal
:
'
showMapSignal
'
,
mapStopSign
:
'
showMapStopSign
'
,
};
@
observer
...
...
modules/dreamview/frontend/src/renderer/map.js
浏览文件 @
5bdd1b43
import
*
as
THREE
from
"
three
"
;
import
{
MAP_WS
}
from
"
store/websocket
"
;
import
STORE
from
"
store
"
;
import
{
MAP_WS
}
from
"
store/websocket
"
;
import
{
drawSegmentsFromPoints
,
...
...
@@ -49,6 +50,7 @@ export default class Map {
this
.
laneHeading
=
{};
this
.
overlapMap
=
{};
this
.
initialized
=
false
;
this
.
elementKindsDrawn
=
''
;
}
// The result will be the all the elements in current but not in data.
...
...
@@ -57,6 +59,10 @@ export default class Map {
let
empty
=
true
;
for
(
const
kind
in
elementIds
)
{
if
(
!
this
.
shouldDrawThisElementKind
(
kind
))
{
continue
;
}
result
[
kind
]
=
[];
const
newIds
=
elementIds
[
kind
];
const
oldData
=
data
[
kind
];
...
...
@@ -381,14 +387,17 @@ export default class Map {
const
newData
=
{};
for
(
const
kind
in
this
.
data
)
{
const
drawThisKind
=
this
.
shouldDrawThisElementKind
(
kind
);
newData
[
kind
]
=
[];
const
oldDataOfThisKind
=
this
.
data
[
kind
];
const
currentIds
=
elementIds
[
kind
];
oldDataOfThisKind
.
forEach
(
oldData
=>
{
if
(
currentIds
&&
currentIds
.
includes
(
oldData
.
id
.
id
))
{
if
(
drawThisKind
&&
currentIds
&&
currentIds
.
includes
(
oldData
.
id
.
id
))
{
newData
[
kind
].
push
(
oldData
);
}
else
{
this
.
removeDrewObjects
(
oldData
.
drewObjects
,
scene
);
if
(
kind
!==
"
overlap
"
)
{
this
.
removeDrewObjects
(
oldData
.
drewObjects
,
scene
);
}
if
(
kind
===
'
lane
'
)
{
delete
this
.
laneHeading
[
oldData
.
id
.
id
];
}
...
...
@@ -472,10 +481,27 @@ export default class Map {
}
}
shouldDrawThisElementKind
(
kind
)
{
// Ex: mapping 'lane' to 'showMapLane' option
const
optionName
=
`showMap
${
kind
[
0
].
toUpperCase
()}${
kind
.
slice
(
1
)}
`
;
// NOTE: return true if the option is not found
return
STORE
.
options
[
optionName
]
!==
false
;
}
updateIndex
(
hash
,
elementIds
,
scene
)
{
if
(
hash
!==
this
.
hash
)
{
let
newElementKindsDrawn
=
''
;
for
(
const
kind
of
Object
.
keys
(
elementIds
).
sort
())
{
if
(
this
.
shouldDrawThisElementKind
(
kind
))
{
newElementKindsDrawn
+=
kind
;
}
}
if
(
hash
!==
this
.
hash
||
this
.
elementKindsDrawn
!==
newElementKindsDrawn
)
{
this
.
hash
=
hash
;
this
.
elementKindsDrawn
=
newElementKindsDrawn
;
const
diff
=
this
.
diffMapElements
(
elementIds
,
this
.
data
);
this
.
removeExpiredElements
(
elementIds
,
scene
);
if
(
!
_
.
isEmpty
(
diff
)
||
!
this
.
initialized
)
{
MAP_WS
.
requestMapData
(
diff
);
this
.
initialized
=
true
;
...
...
modules/dreamview/frontend/src/store/config/MenuData.js
浏览文件 @
5bdd1b43
...
...
@@ -68,5 +68,18 @@ export default [
positionLocalization
:
'
Localization
'
,
positionGps
:
'
GPS
'
,
}
},
{
id
:
'
map
'
,
title
:
'
Map
'
,
type
:
'
checkbox
'
,
data
:
{
mapCrosswalk
:
'
Crosswalk
'
,
mapClearArea
:
'
Clear Area
'
,
mapJunction
:
'
Junction
'
,
mapLane
:
'
Lane
'
,
mapRoad
:
'
Road
'
,
mapSignal
:
'
Signal
'
,
mapStopSign
:
'
Stop Sign
'
,
}
},
];
modules/dreamview/frontend/src/store/config/parameters.yml
浏览文件 @
5bdd1b43
...
...
@@ -74,6 +74,13 @@ options:
showPointCloud
:
false
showPositionGps
:
false
showPositionLocalization
:
true
showMapCrosswalk
:
true
showMapClearArea
:
true
showMapJunction
:
false
showMapLane
:
true
showMapRoad
:
false
showMapSignal
:
true
showMapStopSign
:
true
cameraAngle
:
Default
debug
:
# Turn this on for monitor related debugging
...
...
modules/dreamview/frontend/src/store/options.js
浏览文件 @
5bdd1b43
...
...
@@ -48,6 +48,13 @@ export default class Options {
@
observable
showPointCloud
=
PARAMETERS
.
options
.
defaults
.
showPointCloud
;
@
observable
showPositionGps
=
PARAMETERS
.
options
.
defaults
.
showPositionGps
;
@
observable
showPositionLocalization
=
PARAMETERS
.
options
.
defaults
.
showPositionLocalization
;
@
observable
showMapCrosswalk
=
PARAMETERS
.
options
.
defaults
.
showMapCrosswalk
;
@
observable
showMapClearArea
=
PARAMETERS
.
options
.
defaults
.
showMapClearArea
;
@
observable
showMapJunction
=
PARAMETERS
.
options
.
defaults
.
showMapJunction
;
@
observable
showMapLane
=
PARAMETERS
.
options
.
defaults
.
showMapLane
;
@
observable
showMapRoad
=
PARAMETERS
.
options
.
defaults
.
showMapRoad
;
@
observable
showMapSignal
=
PARAMETERS
.
options
.
defaults
.
showMapSignal
;
@
observable
showMapStopSign
=
PARAMETERS
.
options
.
defaults
.
showMapStopSign
;
// Others
@
observable
showPNCMonitor
=
PARAMETERS
.
options
.
defaults
.
showPNCMonitor
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录