Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
c02efbdd
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,发现更多精彩内容 >>
提交
c02efbdd
编写于
2月 02, 2018
作者:
U
unacao
提交者:
Jiangtao Hu
2月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
allow loading of reflection background image
上级
a9d78cee
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
84 addition
and
122 deletion
+84
-122
modules/dreamview/frontend/dist/app.bundle.js
modules/dreamview/frontend/dist/app.bundle.js
+3
-3
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
+0
-101
modules/dreamview/frontend/src/renderer/coordinates.js
modules/dreamview/frontend/src/renderer/coordinates.js
+1
-0
modules/dreamview/frontend/src/renderer/ground.js
modules/dreamview/frontend/src/renderer/ground.js
+49
-7
modules/dreamview/frontend/src/renderer/index.js
modules/dreamview/frontend/src/renderer/index.js
+4
-0
modules/dreamview/frontend/src/store/config/parameters.yml
modules/dreamview/frontend/src/store/config/parameters.yml
+16
-8
modules/dreamview/frontend/src/store/websocket/websocket_ros.js
...s/dreamview/frontend/src/store/websocket/websocket_ros.js
+6
-0
modules/dreamview/frontend/src/utils/models.js
modules/dreamview/frontend/src/utils/models.js
+2
-2
scripts/dreamview.sh
scripts/dreamview.sh
+2
-0
未找到文件。
modules/dreamview/frontend/dist/app.bundle.js
浏览文件 @
c02efbdd
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/app.bundle.js.map
浏览文件 @
c02efbdd
此差异已折叠。
点击以展开。
modules/dreamview/frontend/proto_bundle/proto_bundle.json
浏览文件 @
c02efbdd
...
...
@@ -718,107 +718,6 @@
}
}
},
"gnss_status"
:
{
"nested"
:
{
"StreamStatus"
:
{
"fields"
:
{
"header"
:
{
"type"
:
"apollo.common.Header"
,
"id"
:
1
},
"insStreamType"
:
{
"type"
:
"Type"
,
"id"
:
2
,
"options"
:
{
"default"
:
"DISCONNECTED"
}
},
"rtkStreamInType"
:
{
"type"
:
"Type"
,
"id"
:
3
,
"options"
:
{
"default"
:
"DISCONNECTED"
}
},
"rtkStreamOutType"
:
{
"type"
:
"Type"
,
"id"
:
4
,
"options"
:
{
"default"
:
"DISCONNECTED"
}
}
},
"nested"
:
{
"Type"
:
{
"values"
:
{
"DISCONNECTED"
:
0
,
"CONNECTED"
:
1
}
}
}
},
"InsStatus"
:
{
"fields"
:
{
"header"
:
{
"type"
:
"apollo.common.Header"
,
"id"
:
1
},
"type"
:
{
"type"
:
"Type"
,
"id"
:
2
,
"options"
:
{
"default"
:
"INVALID"
}
}
},
"nested"
:
{
"Type"
:
{
"values"
:
{
"INVALID"
:
0
,
"CONVERGING"
:
1
,
"GOOD"
:
2
}
}
}
},
"GnssStatus"
:
{
"fields"
:
{
"header"
:
{
"type"
:
"apollo.common.Header"
,
"id"
:
1
},
"solutionCompleted"
:
{
"type"
:
"bool"
,
"id"
:
2
,
"options"
:
{
"default"
:
false
}
},
"solutionStatus"
:
{
"type"
:
"uint32"
,
"id"
:
3
,
"options"
:
{
"default"
:
0
}
},
"positionType"
:
{
"type"
:
"uint32"
,
"id"
:
4
,
"options"
:
{
"default"
:
0
}
},
"numSats"
:
{
"type"
:
"int32"
,
"id"
:
5
,
"options"
:
{
"default"
:
0
}
}
}
}
}
},
"Header"
:
{
"fields"
:
{
"timestampSec"
:
{
...
...
modules/dreamview/frontend/src/renderer/coordinates.js
浏览文件 @
c02efbdd
...
...
@@ -14,6 +14,7 @@ export default class Coordinates {
x
:
x
,
y
:
y
};
console
.
log
(
"
Offset is set to x:
"
+
x
+
"
, y:
"
+
y
);
}
applyOffset
(
point
,
reverse
=
false
)
{
...
...
modules/dreamview/frontend/src/renderer/ground.js
浏览文件 @
c02efbdd
...
...
@@ -23,20 +23,62 @@ export default class Ground {
return
false
;
}
const
{
xres
,
yres
,
mpp
}
=
PARAMETERS
.
ground
;
if
(
!
this
.
render
(
coordinates
))
{
return
false
;
}
this
.
initialized
=
true
;
return
true
;
}
this
.
mesh
.
scale
.
set
(
xres
*
mpp
/
1000
,
yres
*
mpp
/
1000
,
1
);
update
(
world
,
coordinates
,
scene
)
{
}
updateImage
(
coordinates
,
mapName
)
{
if
(
!
this
.
mesh
)
{
return
;
}
const
dir
=
this
.
titleCaseToSnakeCase
(
mapName
);
const
server
=
'
http://
'
+
window
.
location
.
hostname
+
'
:8888
'
;
const
imgUrl
=
server
+
'
/assets/map_data/
'
+
dir
+
'
/background.jpg
'
;
loadTexture
(
imgUrl
,
texture
=>
{
console
.
log
(
"
updating ground image with
"
+
dir
);
this
.
mesh
.
material
.
map
=
texture
;
this
.
render
(
coordinates
,
dir
);
},
err
=>
{
console
.
log
(
"
using grid as ground image...
"
);
loadTexture
(
gridGround
,
texture
=>
{
this
.
mesh
.
material
.
map
=
texture
;
this
.
render
(
coordinates
);
});
});
}
render
(
coordinates
,
mapName
=
'
defaults
'
)
{
console
.
log
(
"
rendering ground image...
"
);
const
{
xres
,
yres
,
mpp
,
xorigin
,
yorigin
}
=
PARAMETERS
.
ground
[
mapName
];
let
position
=
coordinates
.
applyOffset
({
x
:
xorigin
,
y
:
yorigin
});
if
(
position
===
null
)
{
console
.
warn
(
"
Cannot find position for ground mesh!
"
);
return
false
;
}
// NOTE: Setting the position to (0, 0) makes the center of
// the ground image to overlap with the offset point, which
// in this case is the car position on the first received frame.
this
.
mesh
.
position
.
set
(
0
,
0
,
0
);
// is the car position on the first received frame.
if
(
mapName
===
'
defaults
'
)
{
position
=
{
x
:
0
,
y
:
0
};
}
this
.
mesh
.
position
.
set
(
position
.
x
,
position
.
y
,
0
);
this
.
mesh
.
scale
.
set
(
xres
*
mpp
,
yres
*
mpp
,
1
);
this
.
mesh
.
material
.
needsUpdate
=
true
;
this
.
mesh
.
overdraw
=
false
;
this
.
initialized
=
true
;
return
true
;
}
update
(
world
,
coordinates
,
scene
)
{
// Do nothing in the default ground
titleCaseToSnakeCase
(
str
)
{
return
str
.
replace
(
/
\s
/g
,
'
_
'
).
toLowerCase
();
}
}
modules/dreamview/frontend/src/renderer/index.js
浏览文件 @
c02efbdd
...
...
@@ -336,6 +336,10 @@ class Renderer {
}
}
updateGroundImage
(
mapName
)
{
this
.
ground
.
updateImage
(
this
.
coordinates
,
mapName
);
}
updateGroundMetadata
(
serverUrl
,
mapInfo
)
{
this
.
ground
.
initialize
(
serverUrl
,
mapInfo
);
}
...
...
modules/dreamview/frontend/src/store/config/parameters.yml
浏览文件 @
c02efbdd
...
...
@@ -19,14 +19,22 @@ camera:
laneWidth
:
4.5
# original 3.32
laneWidthToViewDistanceRatio
:
5
ground
:
mpp
:
400
xres
:
8192
yres
:
8192
xorigin
:
4096
yorigin
:
4096
xyoffset
:
0
type
:
default
# default or tile
tileRange
:
4
defaults
:
mpp
:
0.125
xres
:
8192
yres
:
8192
xorigin
:
4096
yorigin
:
4096
type
:
default
# default or tile
tileRange
:
4
sunnyvale_big_loop
:
mpp
:
0.125
xres
:
24576
yres
:
16384
xorigin
:
587392
yorigin
:
4140800
type
:
default
# default or tile
tileRange
:
4
planning
:
# The minimum interval between two consecutive
minInterval
:
0.1
...
...
modules/dreamview/frontend/src/store/websocket/websocket_ros.js
浏览文件 @
c02efbdd
...
...
@@ -14,6 +14,7 @@ export default class RosWebSocketEndpoint {
this
.
lastSeqNum
=
-
1
;
this
.
currMapRadius
=
null
;
this
.
updatePOI
=
true
;
this
.
updateGround
=
true
;
}
initialize
()
{
...
...
@@ -45,6 +46,10 @@ export default class RosWebSocketEndpoint {
break
;
case
"
HMIStatus
"
:
STORE
.
hmi
.
updateStatus
(
message
.
data
);
if
(
this
.
updateGround
)
{
RENDERER
.
updateGroundImage
(
STORE
.
hmi
.
currentMap
);
this
.
updateGround
=
false
;
}
break
;
case
"
SimWorldUpdate
"
:
this
.
checkMessage
(
message
);
...
...
@@ -178,6 +183,7 @@ export default class RosWebSocketEndpoint {
new_map
:
map
,
}));
this
.
updatePOI
=
true
;
this
.
updateGround
=
true
;
}
changeVehicle
(
vehcile
)
{
...
...
modules/dreamview/frontend/src/utils/models.js
浏览文件 @
c02efbdd
...
...
@@ -48,6 +48,6 @@ export function loadObject(materialFile, objectFile, scale, callback) {
}
}
export
function
loadTexture
(
textureFile
,
c
allback
)
{
textureLoader
.
load
(
textureFile
,
c
allback
);
export
function
loadTexture
(
textureFile
,
onLoadCallback
,
onErrorC
allback
)
{
textureLoader
.
load
(
textureFile
,
onLoadCallback
,
undefined
,
onErrorC
allback
);
}
scripts/dreamview.sh
浏览文件 @
c02efbdd
...
...
@@ -26,6 +26,8 @@ source "${DIR}/apollo_base.sh"
# Dreamview depends on monitor module to get system runtime status.
bash scripts/monitor.sh
"
$@
"
rm
-rf
modules/dreamview/frontend/dist/assets/map_data
ln
-s
/apollo/modules/map/data/ modules/dreamview/frontend/dist/assets/map_data
# run function from apollo_base.sh
# run command_name module_name
run dreamview
"
$@
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录