Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
38e370a4
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,发现更多精彩内容 >>
提交
38e370a4
编写于
6月 01, 2018
作者:
V
Vivian Lin
提交者:
siyangy
6月 01, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dreamview: display obstacle speed (#4344)
上级
aa8ebef2
变更
8
展开全部
显示空白变更内容
内联
并排
Showing
8 changed file
with
54 addition
and
23 deletion
+54
-23
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/src/components/SideBar/Menu.js
modules/dreamview/frontend/src/components/SideBar/Menu.js
+1
-0
modules/dreamview/frontend/src/renderer/obstacles.js
modules/dreamview/frontend/src/renderer/obstacles.js
+35
-19
modules/dreamview/frontend/src/renderer/text3d.js
modules/dreamview/frontend/src/renderer/text3d.js
+11
-1
modules/dreamview/frontend/src/store/config/MenuData.js
modules/dreamview/frontend/src/store/config/MenuData.js
+1
-0
modules/dreamview/frontend/src/store/config/parameters.yml
modules/dreamview/frontend/src/store/config/parameters.yml
+1
-0
modules/dreamview/frontend/src/store/options.js
modules/dreamview/frontend/src/store/options.js
+2
-0
未找到文件。
modules/dreamview/frontend/dist/app.bundle.js
浏览文件 @
38e370a4
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/app.bundle.js.map
浏览文件 @
38e370a4
此差异已折叠。
点击以展开。
modules/dreamview/frontend/src/components/SideBar/Menu.js
浏览文件 @
38e370a4
...
...
@@ -40,6 +40,7 @@ const MenuIdOptionMapping = {
perceptionVelocity
:
'
showObstaclesVelocity
'
,
perceptionHeading
:
'
showObstaclesHeading
'
,
perceptionId
:
'
showObstaclesId
'
,
perceptionObstacleInfo
:
'
showObstaclesInfo
'
,
perceptionLaneMarker
:
'
showPerceptionLaneMarker
'
,
predictionMajor
:
'
showPredictionMajor
'
,
predictionMinor
:
'
showPredictionMinor
'
,
...
...
modules/dreamview/frontend/src/renderer/obstacles.js
浏览文件 @
38e370a4
...
...
@@ -96,12 +96,8 @@ export default class PerceptionObstacles {
arrowMesh
.
scale
.
set
(
1
,
1
,
1
);
arrowMesh
.
visible
=
true
;
}
if
(
STORE
.
options
.
showObstaclesId
)
{
this
.
updateIdAndDistance
(
obstacle
.
id
,
new
THREE
.
Vector3
(
position
.
x
,
position
.
y
,
obstacle
.
height
),
adc
.
distanceTo
(
position
).
toFixed
(
1
),
scene
);
}
this
.
updateTexts
(
adc
,
obstacle
,
position
,
scene
);
// get the confidence and validate its range
let
confidence
=
obstacle
.
confidence
;
...
...
@@ -144,21 +140,24 @@ export default class PerceptionObstacles {
return
arrowMesh
;
}
updateIdAndDistance
(
id
,
position
,
distance
,
scene
)
{
const
text
=
this
.
textRender
.
composeText
(
`
${
id
}
D:
${
distance
}
`
);
if
(
text
===
null
)
{
return
;
updateTexts
(
adc
,
obstacle
,
obstaclePosition
,
scene
)
{
const
textPosition
=
{
x
:
obstaclePosition
.
x
,
y
:
obstaclePosition
.
y
,
z
:
obstacle
.
height
||
3
};
let
lineCount
=
0
;
if
(
STORE
.
options
.
showObstaclesInfo
)
{
const
distance
=
adc
.
distanceTo
(
obstaclePosition
).
toFixed
(
1
);
const
speed
=
obstacle
.
speed
.
toFixed
(
1
);
this
.
drawTexts
(
`(
${
distance
}
m,
${
speed
}
m/s)`
,
textPosition
,
scene
);
lineCount
++
;
}
text
.
position
.
set
(
position
.
x
,
position
.
y
+
0.5
,
position
.
z
||
3
);
const
camera
=
scene
.
getObjectByName
(
"
camera
"
);
if
(
camera
!==
undefined
)
{
text
.
quaternion
.
copy
(
camera
.
quaternion
);
if
(
STORE
.
options
.
showObstaclesId
)
{
textPosition
.
z
+=
(
lineCount
*
0.7
);
this
.
drawTexts
(
obstacle
.
id
,
textPosition
,
scene
);
}
text
.
children
.
forEach
(
c
=>
c
.
visible
=
true
);
text
.
visible
=
true
;
text
.
name
=
"
id_
"
+
id
;
this
.
ids
.
push
(
text
);
scene
.
add
(
text
);
}
updatePolygon
(
points
,
height
,
color
,
coordinates
,
confidence
,
extrusionFaceIdx
,
scene
)
{
...
...
@@ -286,6 +285,23 @@ export default class PerceptionObstacles {
return
icon
;
}
drawTexts
(
content
,
position
,
scene
)
{
const
text
=
this
.
textRender
.
composeText
(
content
);
if
(
text
===
null
)
{
return
;
}
text
.
position
.
set
(
position
.
x
,
position
.
y
,
position
.
z
);
const
camera
=
scene
.
getObjectByName
(
"
camera
"
);
if
(
camera
!==
undefined
)
{
text
.
quaternion
.
copy
(
camera
.
quaternion
);
}
text
.
children
.
forEach
(
c
=>
c
.
visible
=
true
);
text
.
visible
=
true
;
this
.
ids
.
push
(
text
);
scene
.
add
(
text
);
}
updateLaneMarkers
(
world
,
coordinates
,
scene
)
{
if
(
!
_
.
isEmpty
(
this
.
laneMarkers
))
{
this
.
laneMarkers
.
forEach
((
laneMesh
)
=>
{
...
...
modules/dreamview/frontend/src/renderer/text3d.js
浏览文件 @
38e370a4
...
...
@@ -60,7 +60,17 @@ export default class Text3D {
}
this
.
charMeshes
[
idx
].
push
(
mesh
);
}
mesh
.
position
.
set
((
j
-
charIndices
.
length
/
2
)
*
letterOffset
,
0
,
0
);
let
additionalOffset
=
0
;
switch
(
text
[
j
])
{
case
'
,
'
:
additionalOffset
=
0.35
;
break
;
case
'
/
'
:
additionalOffset
=
0.15
;
break
;
}
mesh
.
position
.
set
((
j
-
charIndices
.
length
/
2
)
*
letterOffset
+
additionalOffset
,
0
,
0
);
this
.
charPointers
[
idx
]
++
;
textMesh
.
add
(
mesh
);
}
...
...
modules/dreamview/frontend/src/store/config/MenuData.js
浏览文件 @
38e370a4
...
...
@@ -27,6 +27,7 @@ export default [
perceptionVelocity
:
'
Velocity
'
,
perceptionHeading
:
'
Heading
'
,
perceptionId
:
'
Id
'
,
perceptionObstacleInfo
:
'
Distance and Speed
'
,
perceptionLaneMarker
:
'
Lane Marker
'
,
},
supportInOfflineView
:
true
,
...
...
modules/dreamview/frontend/src/store/config/parameters.yml
浏览文件 @
38e370a4
...
...
@@ -74,6 +74,7 @@ options:
showObstaclesVelocity
:
true
showObstaclesHeading
:
true
showObstaclesId
:
true
showObstaclesInfo
:
true
showPointCloud
:
false
showPositionGps
:
false
showPositionLocalization
:
true
...
...
modules/dreamview/frontend/src/store/options.js
浏览文件 @
38e370a4
...
...
@@ -49,6 +49,8 @@ export default class Options {
PARAMETERS
.
options
.
defaults
.
showObstaclesHeading
;
@
observable
showObstaclesId
=
PARAMETERS
.
options
.
defaults
.
showObstaclesId
;
@
observable
showObstaclesInfo
=
PARAMETERS
.
options
.
defaults
.
showObstaclesInfo
;
@
observable
showPointCloud
=
PARAMETERS
.
options
.
defaults
.
showPointCloud
;
@
observable
showPositionGps
=
PARAMETERS
.
options
.
defaults
.
showPositionGps
;
@
observable
showPositionLocalization
=
PARAMETERS
.
options
.
defaults
.
showPositionLocalization
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录