增加环绕侦察场景适配

This commit is contained in:
2026-01-08 15:44:38 +08:00
parent 3eba1f962b
commit 10c5bb5a8a
5441 changed files with 40219 additions and 379695 deletions

View File

@@ -97,6 +97,11 @@ def _add_nodes_and_edges(node: dict, dot, parent_id: str | None = None) -> str:
shape = 'ellipse'
style = 'filled'
fillcolor = '#e1d5e7' # 紫色
elif node_type == 'decorator':
shape = 'diamond'
style = 'filled'
fillcolor = '#f5f5f5' # 浅灰
border_color = '#333333'
# 特别标记安全相关节点
if node.get('name') in ['battery_above', 'gps_status', 'SafetyMonitor']:
@@ -111,6 +116,11 @@ def _add_nodes_and_edges(node: dict, dot, parent_id: str | None = None) -> str:
# 递归处理子节点
children = node.get("children", [])
# 处理 decorator 类型的 child 字段(单一子节点)
if node_type == 'decorator' and 'child' in node:
children = [node['child']]
if not children:
return current_id