串口搜索和摄像头搜索

This commit is contained in:
cheng
2026-07-23 17:50:39 +08:00
parent b3fe4d976f
commit daa0ec8aec
44 changed files with 4705 additions and 45 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

+81
View File
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920 324" role="img">
<defs>
<linearGradient id="gIdle" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#dbeafe"/><stop offset="100%" stop-color="#bfdbfe"/>
</linearGradient>
<linearGradient id="gAct" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#fef3c7"/><stop offset="100%" stop-color="#fde68a"/>
</linearGradient>
<linearGradient id="gHold" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#fce7f3"/><stop offset="100%" stop-color="#fbcfe8"/>
</linearGradient>
<linearGradient id="gRec" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#d1fae5"/><stop offset="100%" stop-color="#a7f3d0"/>
</linearGradient>
<marker id="arr" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M0,0 L8,4 L0,8 Z" fill="#475569"/>
</marker>
<filter id="sh" x="-6%" y="-8%" width="112%" height="120%">
<feDropShadow dx="0" dy="2" stdDeviation="2.5" flood-color="#0f172a" flood-opacity="0.10"/>
</filter>
<style>
.cn{font:700 14px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#0f172a}
.en{font:600 11px Consolas,monospace;fill:#475569}
.sub{font:400 11px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#64748b}
.ed{font:500 11px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#334155}
.nt{font:400 11px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#64748b}
</style>
</defs>
<g filter="url(#sh)"><rect x="24" y="40" width="148" height="72" rx="10" fill="url(#gIdle)" stroke="#2563eb" stroke-width="1.5"/>
<text x="98" y="66" text-anchor="middle" class="cn">等待触发</text>
<text x="98" y="84" text-anchor="middle" class="en">open_wait</text>
<text x="98" y="100" text-anchor="middle" class="sub">已就绪 armed</text></g>
<path d="M172 76 H208" stroke="#64748b" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="190" y="68" text-anchor="middle" class="ed">侧边触发</text>
<g filter="url(#sh)"><rect x="208" y="40" width="148" height="72" rx="10" fill="url(#gAct)" stroke="#d97706" stroke-width="1.5"/>
<text x="282" y="66" text-anchor="middle" class="cn">闭合中</text>
<text x="282" y="84" text-anchor="middle" class="en">closing</text>
<text x="282" y="100" text-anchor="middle" class="sub">寻找物体</text></g>
<path d="M356 76 H392" stroke="#64748b" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="374" y="68" text-anchor="middle" class="ed">双侧接触</text>
<g filter="url(#sh)"><rect x="392" y="40" width="148" height="72" rx="10" fill="url(#gAct)" stroke="#d97706" stroke-width="1.5"/>
<text x="466" y="66" text-anchor="middle" class="cn">夹持加力</text>
<text x="466" y="84" text-anchor="middle" class="en">gripping</text>
<text x="466" y="100" text-anchor="middle" class="sub">低力 → 基础力</text></g>
<path d="M540 76 H576" stroke="#64748b" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="558" y="68" text-anchor="middle" class="ed">到达保持力</text>
<g filter="url(#sh)"><rect x="576" y="40" width="148" height="72" rx="10" fill="url(#gHold)" stroke="#db2777" stroke-width="1.5"/>
<text x="650" y="66" text-anchor="middle" class="cn">夹持检测</text>
<text x="650" y="84" text-anchor="middle" class="en">hold_check</text>
<text x="650" y="100" text-anchor="middle" class="sub">自适应补力 / 释放检测</text></g>
<path d="M724 76 H760" stroke="#64748b" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="742" y="68" text-anchor="middle" class="ed">取物释放</text>
<g filter="url(#sh)"><rect x="760" y="40" width="136" height="72" rx="10" fill="url(#gRec)" stroke="#059669" stroke-width="1.5"/>
<text x="828" y="66" text-anchor="middle" class="cn">张开恢复</text>
<text x="828" y="84" text-anchor="middle" class="en">open_recover</text>
<text x="828" y="100" text-anchor="middle" class="sub">位置 / 力恢复</text></g>
<path d="M828 112 V204 H98 V112" fill="none" stroke="#2563eb" stroke-width="1.5" marker-end="url(#arr)"/>
<rect x="340" y="188" width="240" height="24" rx="4" fill="#eff6ff" stroke="#bfdbfe"/>
<text x="460" y="204" text-anchor="middle" class="ed" fill="#1e40af">恢复完成 + 休息时间(rearm)→ 再次就绪</text>
<path d="M282 112 V152 H828" fill="none" stroke="#dc2626" stroke-width="1.2" stroke-dasharray="5 4"/>
<rect x="200" y="128" width="164" height="22" rx="4" fill="#fef2f2" stroke="#fecaca"/>
<text x="282" y="143" text-anchor="middle" class="ed" fill="#b91c1c">闭合超时 close_timeout → 张开</text>
<rect x="24" y="232" width="872" height="76" rx="8" fill="#f8fafc" stroke="#e2e8f0"/>
<text x="40" y="254" class="cn" font-size="12">阶段说明</text>
<text x="40" y="274" class="nt">① 等待触发:夹爪张开,单侧力超阈且为新上升沿时进入闭合。</text>
<text x="40" y="294" class="nt">② 闭合~夹持:物体接触后低力保持,分步加力至 hold_force,并按切向负载自适应补力。</text>
<text x="40" y="314" class="nt">③ 释放~恢复:力变化超阈则张开;满足恢复条件并经过 rearm_seconds 后,方可再次触发。</text>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 880 520" role="img">
<defs>
<linearGradient id="sensorGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#dbeafe"/><stop offset="100%" stop-color="#bfdbfe"/>
</linearGradient>
<linearGradient id="procGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#e0e7ff"/><stop offset="100%" stop-color="#c7d2fe"/>
</linearGradient>
<linearGradient id="ctrlGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#fef3c7"/><stop offset="100%" stop-color="#fde68a"/>
</linearGradient>
<linearGradient id="guiGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#d1fae5"/><stop offset="100%" stop-color="#a7f3d0"/>
</linearGradient>
<linearGradient id="hwGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#f1f5f9"/><stop offset="100%" stop-color="#e2e8f0"/>
</linearGradient>
<marker id="arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M0,0 L8,4 L0,8 Z" fill="#475569"/>
</marker>
<filter id="shadow" x="-4%" y="-4%" width="108%" height="112%">
<feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#0f172a" flood-opacity="0.10"/>
</filter>
<style>
.t1{font:700 15px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#0f172a}
.t2{font:400 12px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#475569}
.tl{font:700 11px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#64748b;letter-spacing:.08em}
.te{font:500 11px "Microsoft YaHei","Noto Sans SC",sans-serif;fill:#334155}
.tp{font:600 10px Consolas,monospace;fill:#1e40af}
</style>
</defs>
<rect x="24" y="52" width="832" height="108" rx="8" fill="#f8fafc" stroke="#e2e8f0"/>
<text x="40" y="72" class="tl">感知层</text>
<rect x="24" y="176" width="832" height="148" rx="8" fill="#fafafa" stroke="#e2e8f0"/>
<text x="40" y="196" class="tl">软件处理层</text>
<rect x="24" y="340" width="832" height="108" rx="8" fill="#f8fafc" stroke="#e2e8f0"/>
<text x="40" y="360" class="tl">执行与呈现层</text>
<g filter="url(#shadow)">
<rect x="56" y="88" width="168" height="56" rx="8" fill="url(#sensorGrad)" stroke="#3b82f6" stroke-width="1.5"/>
<text x="140" y="112" text-anchor="middle" class="t1">左触觉传感器</text>
<text x="140" y="130" text-anchor="middle" class="t2">USB 摄像头 + 敏感面</text>
</g>
<g filter="url(#shadow)">
<rect x="656" y="88" width="168" height="56" rx="8" fill="url(#sensorGrad)" stroke="#3b82f6" stroke-width="1.5"/>
<text x="740" y="112" text-anchor="middle" class="t1">右触觉传感器</text>
<text x="740" y="130" text-anchor="middle" class="t2">USB 摄像头 + 敏感面</text>
</g>
<path d="M224 116 H340" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<path d="M656 116 H540" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="440" y="108" text-anchor="middle" class="te">视频帧采集</text>
<g filter="url(#shadow)">
<rect x="300" y="212" width="280" height="76" rx="10" fill="url(#procGrad)" stroke="#6366f1" stroke-width="1.5"/>
<text x="440" y="240" text-anchor="middle" class="t1">触觉力计算 / 光流处理</text>
<text x="440" y="260" text-anchor="middle" class="t2">法向力 · 切向力 · 光流/幅值图像</text>
<text x="440" y="276" text-anchor="middle" class="t2">Orisys SDK · OpenCV DIS</text>
</g>
<path d="M140 144 V188 H300" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<path d="M740 144 V188 H580" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<g filter="url(#shadow)">
<rect x="56" y="220" width="200" height="60" rx="8" fill="url(#ctrlGrad)" stroke="#d97706" stroke-width="1.5"/>
<text x="156" y="246" text-anchor="middle" class="t1">智能夹持状态机</text>
<text x="156" y="264" text-anchor="middle" class="t2">触发 · 闭合 · 加力 · 释放</text>
</g>
<path d="M300 250 H256" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="278" y="242" text-anchor="middle" class="te">力信号</text>
<g filter="url(#shadow)">
<rect x="624" y="220" width="200" height="60" rx="8" fill="url(#hwGrad)" stroke="#64748b" stroke-width="1.5"/>
<text x="724" y="246" text-anchor="middle" class="t1">夹爪控制器</text>
<text x="724" y="264" text-anchor="middle" class="t2">Modbus RTU 从站</text>
</g>
<path d="M256 250 H420" fill="none" stroke="#64748b" stroke-width="1.5"/>
<path d="M420 250 H624" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="440" y="242" text-anchor="middle" class="tp">Modbus RTU / 串口</text>
<g filter="url(#shadow)">
<rect x="624" y="368" width="200" height="56" rx="8" fill="url(#hwGrad)" stroke="#475569" stroke-width="1.5"/>
<text x="724" y="392" text-anchor="middle" class="t1">智能夹爪(执行机构)</text>
<text x="724" y="410" text-anchor="middle" class="t2">位置 · 力度 · 开/合/保持</text>
</g>
<path d="M724 280 V368" fill="none" stroke="#475569" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="738" y="328" class="te">驱动</text>
<g filter="url(#shadow)">
<rect x="240" y="356" width="280" height="80" rx="10" fill="url(#guiGrad)" stroke="#059669" stroke-width="1.5"/>
<text x="380" y="384" text-anchor="middle" class="t1">GUI 监控界面</text>
<text x="380" y="404" text-anchor="middle" class="t2">3D 模型 · 光流画面 · 力曲线 · 状态</text>
<text x="380" y="422" text-anchor="middle" class="t2">PyQt5 · PyOpenGL · pyqtgraph</text>
</g>
<path d="M156 280 V320 H380 V356" fill="none" stroke="#059669" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="168" y="312" class="te">状态 / 动作</text>
<path d="M440 288 V356" fill="none" stroke="#059669" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="452" y="328" class="te">图像 / 力值</text>
<path d="M624 396 H520 V250 H256" fill="none" stroke="#94a3b8" stroke-width="1.2" stroke-dasharray="5 4" marker-end="url(#arrow)"/>
<text x="572" y="388" text-anchor="middle" class="te">位置反馈</text>
<g transform="translate(56,468)">
<line x1="0" y1="8" x2="28" y2="8" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="36" y="12" class="t2">数据 / 控制流</text>
<line x1="140" y1="8" x2="168" y2="8" stroke="#94a3b8" stroke-width="1.2" stroke-dasharray="5 4" marker-end="url(#arrow)"/>
<text x="176" y="12" class="t2">反馈</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because it is too large Load Diff