feat: load v_shape from the profile YAML, add the dock measuring guide

Read v_shape per profile and fail loud on an unknown value. The start log now prints the loaded v_shape so it can be checked without opening the YAML on the robot. Add doc/MEASURE_AND_CONFIGURE.md with figures and link it from the README.
This commit is contained in:
2026-10-27 13:09:30 +07:00
parent cc1ea74445
commit 5bbcf37f1d
10 changed files with 844 additions and 2 deletions

48
doc/fig/dock_shape.svg Normal file
View File

@@ -0,0 +1,48 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 236" width="640" height="236">
<style>
text { font-family: "DejaVu Sans", Arial, sans-serif; font-size: 13px; fill: #1b2733; }
.mu { fill: #5a6b74; font-size: 12px; }
.halo { paint-order: stroke; stroke: #ffffff; stroke-width: 4px; stroke-linejoin: round; }
.wt { fill: #b9611a; font-weight: bold; }
.wing { stroke: #d27a24; stroke-linecap: round; fill: none; }
.tape { fill: url(#h); stroke: #7d8b93; stroke-width: 1; }
.fan { stroke: #0a7684; stroke-width: .9; opacity: .6; }
.robot { fill: none; stroke: #42535e; stroke-width: 1.6; }
.lidar { fill: #42535e; }
.divider { stroke: #c7d2d7; stroke-width: 1; }
</style>
<defs>
<pattern id="h" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
<rect width="6" height="6" fill="#dfe5e8"/>
<line x1="0" y1="0" x2="0" y2="6" stroke="#7d8b93" stroke-width="1.6"/>
</pattern>
</defs>
<rect width="640" height="236" fill="#ffffff"/>
<line x1="320" y1="36" x2="320" y2="226" class="divider"/>
<text x="160" y="24" text-anchor="middle" class="wt">V lồi — v_shape: convex</text>
<text x="480" y="24" text-anchor="middle" class="wt">V lõm — v_shape: concave</text>
<line x1="160" y1="150" x2="86" y2="76" class="wing" stroke-width="8"/>
<line x1="160" y1="150" x2="234" y2="76" class="wing" stroke-width="8"/>
<polygon points="133.13,128.79 107.67,103.33 104.14,106.86 129.6,132.32" class="tape"/>
<polygon points="186.87,128.79 212.33,103.33 215.86,106.86 190.4,132.32" class="tape"/>
<line x1="160" y1="185" x2="118" y2="119" class="fan"/>
<line x1="160" y1="185" x2="202" y2="119" class="fan"/>
<rect x="120" y="185" width="80" height="26" rx="4" class="robot"/>
<circle cx="160" cy="187" r="4" class="lidar"/>
<text x="160" y="203" text-anchor="middle" class="mu">robot</text>
<text x="160" y="172" text-anchor="middle" class="mu halo">đỉnh gần robot nhất</text>
<text x="160" y="230" text-anchor="middle">dải dán MẶT NGOÀI</text>
<line x1="480" y1="70" x2="406" y2="144" class="wing" stroke-width="8"/>
<line x1="480" y1="70" x2="554" y2="144" class="wing" stroke-width="8"/>
<polygon points="458.79,96.87 433.33,122.33 436.86,125.86 462.32,100.4" class="tape"/>
<polygon points="501.21,96.87 526.67,122.33 523.14,125.86 497.68,100.4" class="tape"/>
<line x1="480" y1="185" x2="448" y2="112" class="fan"/>
<line x1="480" y1="185" x2="512" y2="112" class="fan"/>
<rect x="440" y="185" width="80" height="26" rx="4" class="robot"/>
<circle cx="480" cy="187" r="4" class="lidar"/>
<text x="480" y="203" text-anchor="middle" class="mu">robot</text>
<text x="480" y="172" text-anchor="middle" class="mu halo">mút cánh gần robot</text>
<text x="480" y="230" text-anchor="middle">dải dán MẶT TRONG</text>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB