提交 0add1f33 编写于 作者: S siyangy 提交者: Jiangtao Hu

Dreamview: Improve frontend logging

上级 5237baa8
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -1609,6 +1609,9 @@
"ObjectAvoid": {
"fields": {}
},
"ObjectWait": {
"fields": {}
},
"ObjectDecisionType": {
"oneofs": {
"objectTag": {
......@@ -1620,7 +1623,8 @@
"overtake",
"nudge",
"sidepass",
"avoid"
"avoid",
"wait"
]
}
},
......@@ -1656,6 +1660,10 @@
"avoid": {
"type": "ObjectAvoid",
"id": 8
},
"wait": {
"type": "ObjectWait",
"id": 9
}
}
},
......@@ -2930,6 +2938,124 @@
},
"hdmap": {
"nested": {
"Projection": {
"fields": {
"proj": {
"type": "string",
"id": 1
}
}
},
"Header": {
"fields": {
"version": {
"type": "bytes",
"id": 1
},
"date": {
"type": "bytes",
"id": 2
},
"projection": {
"type": "Projection",
"id": 3
},
"district": {
"type": "bytes",
"id": 4
},
"generation": {
"type": "bytes",
"id": 5
},
"revMajor": {
"type": "bytes",
"id": 6
},
"revMinor": {
"type": "bytes",
"id": 7
},
"left": {
"type": "double",
"id": 8
},
"top": {
"type": "double",
"id": 9
},
"right": {
"type": "double",
"id": 10
},
"bottom": {
"type": "double",
"id": 11
},
"vendor": {
"type": "bytes",
"id": 12
}
}
},
"Map": {
"fields": {
"header": {
"type": "Header",
"id": 1
},
"crosswalk": {
"rule": "repeated",
"type": "Crosswalk",
"id": 2
},
"junction": {
"rule": "repeated",
"type": "Junction",
"id": 3
},
"lane": {
"rule": "repeated",
"type": "Lane",
"id": 4
},
"stopSign": {
"rule": "repeated",
"type": "StopSign",
"id": 5
},
"signal": {
"rule": "repeated",
"type": "Signal",
"id": 6
},
"yield": {
"rule": "repeated",
"type": "YieldSign",
"id": 7
},
"overlap": {
"rule": "repeated",
"type": "Overlap",
"id": 8
},
"clearArea": {
"rule": "repeated",
"type": "ClearArea",
"id": 9
},
"speedBump": {
"rule": "repeated",
"type": "SpeedBump",
"id": 10
},
"road": {
"rule": "repeated",
"type": "Road",
"id": 11
}
}
},
"ClearArea": {
"fields": {
"id": {
......@@ -3380,124 +3506,6 @@
}
}
},
"Projection": {
"fields": {
"proj": {
"type": "string",
"id": 1
}
}
},
"Header": {
"fields": {
"version": {
"type": "bytes",
"id": 1
},
"date": {
"type": "bytes",
"id": 2
},
"projection": {
"type": "Projection",
"id": 3
},
"district": {
"type": "bytes",
"id": 4
},
"generation": {
"type": "bytes",
"id": 5
},
"revMajor": {
"type": "bytes",
"id": 6
},
"revMinor": {
"type": "bytes",
"id": 7
},
"left": {
"type": "double",
"id": 8
},
"top": {
"type": "double",
"id": 9
},
"right": {
"type": "double",
"id": 10
},
"bottom": {
"type": "double",
"id": 11
},
"vendor": {
"type": "bytes",
"id": 12
}
}
},
"Map": {
"fields": {
"header": {
"type": "Header",
"id": 1
},
"crosswalk": {
"rule": "repeated",
"type": "Crosswalk",
"id": 2
},
"junction": {
"rule": "repeated",
"type": "Junction",
"id": 3
},
"lane": {
"rule": "repeated",
"type": "Lane",
"id": 4
},
"stopSign": {
"rule": "repeated",
"type": "StopSign",
"id": 5
},
"signal": {
"rule": "repeated",
"type": "Signal",
"id": 6
},
"yield": {
"rule": "repeated",
"type": "YieldSign",
"id": 7
},
"overlap": {
"rule": "repeated",
"type": "Overlap",
"id": 8
},
"clearArea": {
"rule": "repeated",
"type": "ClearArea",
"id": 9
},
"speedBump": {
"rule": "repeated",
"type": "SpeedBump",
"id": 10
},
"road": {
"rule": "repeated",
"type": "Road",
"id": 11
}
}
},
"BoundaryEdge": {
"fields": {
"curve": {
......
......@@ -143,9 +143,16 @@ export default class RosWebSocketEndpoint {
checkMessage(world) {
const now = new Date().getTime();
const duration = now - this.simWorldLastUpdateTimestamp;
if (this.simWorldLastUpdateTimestamp !== 0 && duration > 250) {
console.log("Last sim_world_update took " + duration + "ms");
if (this.simWorldLastUpdateTimestamp !== 0 && duration > 200) {
console.warn("Last sim_world_update took " + duration + "ms");
}
if (this.secondLastSeqNum === world.sequenceNum) {
// Receiving multiple duplicated simulation_world messages
// indicates a backend lag.
console.warn("Received duplicate simulation_world:", this.lastSeqNum);
}
this.secondLastSeqNum = this.lastSeqNum;
this.lastSeqNum = world.sequenceNum;
this.simWorldLastUpdateTimestamp = now;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册