Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
b01d5f9e
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,发现更多精彩内容 >>
提交
b01d5f9e
编写于
2月 21, 2018
作者:
V
vlin17
提交者:
Jiangtao Hu
2月 21, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dreamview: plot station_error graph in control monitor
上级
e33b5a56
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
118 addition
and
12 deletion
+118
-12
modules/dreamview/backend/dreamview.cc
modules/dreamview/backend/dreamview.cc
+5
-1
modules/dreamview/backend/simulation_world/simulation_world_service.cc
...view/backend/simulation_world/simulation_world_service.cc
+22
-1
modules/dreamview/conf/adapter.conf
modules/dreamview/conf/adapter.conf
+5
-0
modules/dreamview/frontend/dist/5edf3e08e204ac1407e2.worker.js
...es/dreamview/frontend/dist/5edf3e08e204ac1407e2.worker.js
+2
-2
modules/dreamview/frontend/dist/5edf3e08e204ac1407e2.worker.js.map
...reamview/frontend/dist/5edf3e08e204ac1407e2.worker.js.map
+1
-1
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/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/proto_bundle/sim_world_proto_bundle.json
...eamview/frontend/proto_bundle/sim_world_proto_bundle.json
+16
-0
modules/dreamview/frontend/src/components/PNCMonitor/ControlMonitor.js
...view/frontend/src/components/PNCMonitor/ControlMonitor.js
+1
-0
modules/dreamview/frontend/src/store/config/ControlGraph.yml
modules/dreamview/frontend/src/store/config/ControlGraph.yml
+18
-0
modules/dreamview/frontend/src/store/control_data.js
modules/dreamview/frontend/src/store/control_data.js
+33
-0
modules/dreamview/proto/simulation_world.proto
modules/dreamview/proto/simulation_world.proto
+9
-1
未找到文件。
modules/dreamview/backend/dreamview.cc
浏览文件 @
b01d5f9e
...
...
@@ -37,7 +37,9 @@ using apollo::common::time::Clock;
using
apollo
::
common
::
util
::
PathExists
;
using
apollo
::
hdmap
::
BaseMapFile
;
std
::
string
Dreamview
::
Name
()
const
{
return
FLAGS_dreamview_module_name
;
}
std
::
string
Dreamview
::
Name
()
const
{
return
FLAGS_dreamview_module_name
;
}
void
Dreamview
::
TerminateProfilingMode
(
const
ros
::
TimerEvent
&
event
)
{
Stop
();
...
...
@@ -62,6 +64,8 @@ Status Dreamview::Init() {
// Check the expected adapters are initialized.
CHECK
(
AdapterManager
::
GetChassis
())
<<
"ChassisAdapter is not initialized."
;
CHECK
(
AdapterManager
::
GetControlCommand
())
<<
"ControlCommandAdapter is not initialized."
;
CHECK
(
AdapterManager
::
GetGps
())
<<
"GpsAdapter is not initialized."
;
CHECK
(
AdapterManager
::
GetPlanning
())
<<
"PlanningAdapter is not initialized."
;
CHECK
(
AdapterManager
::
GetLocalization
())
...
...
modules/dreamview/backend/simulation_world/simulation_world_service.cc
浏览文件 @
b01d5f9e
...
...
@@ -52,10 +52,11 @@ using apollo::common::adapter::AdapterManager;
using
apollo
::
common
::
monitor
::
MonitorMessage
;
using
apollo
::
common
::
monitor
::
MonitorMessageItem
;
using
apollo
::
common
::
time
::
Clock
;
using
apollo
::
common
::
time
::
millis
;
using
apollo
::
common
::
time
::
ToSecond
;
using
apollo
::
common
::
time
::
millis
;
using
apollo
::
common
::
util
::
DownsampleByAngle
;
using
apollo
::
common
::
util
::
GetProtoFromFile
;
using
apollo
::
control
::
ControlCommand
;
using
apollo
::
hdmap
::
Path
;
using
apollo
::
localization
::
Gps
;
using
apollo
::
localization
::
LocalizationEstimate
;
...
...
@@ -253,6 +254,8 @@ void SimulationWorldService::Update() {
UpdateWithLatestObserved
(
"PredictionObstacles"
,
AdapterManager
::
GetPrediction
());
UpdateWithLatestObserved
(
"Planning"
,
AdapterManager
::
GetPlanning
());
UpdateWithLatestObserved
(
"ControlCommand"
,
AdapterManager
::
GetControlCommand
());
for
(
const
auto
&
kv
:
obj_map_
)
{
*
world_
.
add_object
()
=
kv
.
second
;
}
...
...
@@ -912,5 +915,23 @@ void SimulationWorldService::RegisterMessageCallbacks() {
&
SimulationWorldService
::
UpdateSimulationWorld
,
this
);
}
template
<
>
void
SimulationWorldService
::
UpdateSimulationWorld
(
const
ControlCommand
&
control_command
)
{
auto
*
control_data
=
world_
.
mutable_control_data
();
control_data
->
set_timestamp_sec
(
control_command
.
header
().
timestamp_sec
());
if
(
control_command
.
has_debug
())
{
auto
&
debug
=
control_command
.
debug
();
if
(
debug
.
has_simple_lon_debug
()
&&
debug
.
simple_lon_debug
().
has_station_error
())
{
control_data
->
set_station_error
(
debug
.
simple_lon_debug
().
station_error
());
}
else
if
(
debug
.
has_simple_mpc_debug
()
&&
debug
.
simple_mpc_debug
().
has_station_error
())
{
control_data
->
set_station_error
(
debug
.
simple_mpc_debug
().
station_error
());
}
}
}
}
// namespace dreamview
}
// namespace apollo
modules/dreamview/conf/adapter.conf
浏览文件 @
b01d5f9e
...
...
@@ -13,6 +13,11 @@ config {
mode
:
RECEIVE_ONLY
message_history_limit
:
1
}
config
{
type
:
CONTROL_COMMAND
mode
:
RECEIVE_ONLY
message_history_limit
:
1
}
config
{
type
:
GPS
mode
:
RECEIVE_ONLY
...
...
modules/dreamview/frontend/dist/
f544bd06fab314ebd5a1
.worker.js
→
modules/dreamview/frontend/dist/
5edf3e08e204ac1407e2
.worker.js
浏览文件 @
b01d5f9e
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/
f544bd06fab314ebd5a1
.worker.js.map
→
modules/dreamview/frontend/dist/
5edf3e08e204ac1407e2
.worker.js.map
浏览文件 @
b01d5f9e
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/app.bundle.js
浏览文件 @
b01d5f9e
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/app.bundle.js.map
浏览文件 @
b01d5f9e
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/navigation.bundle.js
浏览文件 @
b01d5f9e
此差异已折叠。
点击以展开。
modules/dreamview/frontend/dist/navigation.bundle.js.map
浏览文件 @
b01d5f9e
此差异已折叠。
点击以展开。
modules/dreamview/frontend/proto_bundle/sim_world_proto_bundle.json
浏览文件 @
b01d5f9e
...
...
@@ -387,6 +387,18 @@
}
}
},
"ControlData"
:
{
"fields"
:
{
"timestampSec"
:
{
"type"
:
"double"
,
"id"
:
1
},
"stationError"
:
{
"type"
:
"double"
,
"id"
:
2
}
}
},
"SimulationWorld"
:
{
"fields"
:
{
"timestamp"
:
{
...
...
@@ -475,6 +487,10 @@
"laneMarker"
:
{
"type"
:
"apollo.perception.LaneMarkers"
,
"id"
:
21
},
"controlData"
:
{
"type"
:
"ControlData"
,
"id"
:
22
}
}
}
...
...
modules/dreamview/frontend/src/components/PNCMonitor/ControlMonitor.js
浏览文件 @
b01d5f9e
...
...
@@ -34,6 +34,7 @@ export default class ControlMonitor extends React.Component {
{
this
.
generateScatterGraph
(
'
speedGraph
'
,
data
.
speedGraph
)}
{
this
.
generateScatterGraph
(
'
accelerationGraph
'
,
data
.
accelerationGraph
)}
{
this
.
generateScatterGraph
(
'
curvatureGraph
'
,
data
.
curvatureGraph
)}
{
this
.
generateScatterGraph
(
'
stationErrorGraph
'
,
data
.
stationErrorGraph
)}
<
/div
>
);
}
...
...
modules/dreamview/frontend/src/store/config/ControlGraph.yml
浏览文件 @
b01d5f9e
...
...
@@ -153,3 +153,21 @@ accelerationGraph:
pointRadius
:
4
fill
:
false
showLine
:
true
stationErrorGraph
:
title
:
'
Station
Error'
options
:
legend
:
display
:
false
axes
:
x
:
labelString
:
'
t
(second)'
y
:
labelString
:
'
error
(m)'
properties
:
lines
:
error
:
color
:
'
rgba(0,
106,
255,
1)'
# blue
borderWidth
:
2
pointRadius
:
0
fill
:
false
showLine
:
ture
\ No newline at end of file
modules/dreamview/frontend/src/store/control_data.js
浏览文件 @
b01d5f9e
...
...
@@ -40,9 +40,38 @@ export default class ControlData {
real
:
[],
autoModeZone
:
[]
},
stationErrorGraph
:
{
error
:
[],
}
};
}
updateStationErrorGraph
(
controlData
)
{
if
(
!
controlData
.
stationError
)
{
return
;
}
const
graph
=
this
.
data
.
stationErrorGraph
;
const
currentTimestamp
=
controlData
.
timestampSec
;
// clean up data if needed
const
removeAllPoints
=
graph
.
error
.
length
>
0
&&
currentTimestamp
<
graph
.
error
[
graph
.
error
.
length
-
1
].
x
;
const
removeOldestPoint
=
(
graph
.
length
>=
MAX_HISTORY_POINTS
);
if
(
removeAllPoints
)
{
graph
.
error
=
[];
}
else
if
(
removeOldestPoint
)
{
graph
.
error
.
shift
();
}
// add new data
const
hasNewData
=
graph
.
error
.
length
===
0
||
currentTimestamp
!==
graph
.
error
[
graph
.
error
.
length
-
1
].
x
;
if
(
hasNewData
)
{
graph
.
error
.
push
({
x
:
currentTimestamp
,
y
:
controlData
.
stationError
});
}
}
updateSteerCurve
(
graph
,
adc
)
{
const
steeringAngle
=
adc
.
steeringAngle
/
adc
.
steeringRatio
;
let
R
=
null
;
...
...
@@ -168,5 +197,9 @@ export default class ControlData {
this
.
updateTime
(
world
.
planningTime
);
}
if
(
world
.
controlData
)
{
this
.
updateStationErrorGraph
(
world
.
controlData
);
}
}
}
\ No newline at end of file
modules/dreamview/proto/simulation_world.proto
浏览文件 @
b01d5f9e
...
...
@@ -169,7 +169,12 @@ message MapElementIds {
repeated
string
clear_area
=
9
;
}
// Next-id: 22
message
ControlData
{
optional
double
timestamp_sec
=
1
;
optional
double
station_error
=
2
;
}
// Next-id: 23
message
SimulationWorld
{
// Timestamp in milliseconds
optional
double
timestamp
=
1
;
...
...
@@ -224,4 +229,7 @@ message SimulationWorld {
// Lane Markers from perception
optional
apollo.perception.LaneMarkers
lane_marker
=
21
;
// Control data
optional
ControlData
control_data
=
22
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录