<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Housz</title>
        <link>https://www.housz.cn/</link>
        <description>Feynman Technique</description>
        <lastBuildDate>Wed, 30 Sep 2026 08:56:54 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, Housz</copyright>
        <item>
            <title><![CDATA[vim常用操作]]></title>
            <link>https://www.housz.cn/article/vim-recipes</link>
            <guid>https://www.housz.cn/article/vim-recipes</guid>
            <pubDate>Fri, 02 Jul 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-d53a2927fff849c7ac07da3419b507ca"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-467008f7135b47598ddcecff41134910" data-id="467008f7135b47598ddcecff41134910"><span><div id="467008f7135b47598ddcecff41134910" class="notion-header-anchor"></div><a class="notion-hash-link" href="#467008f7135b47598ddcecff41134910" title="配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置</span></span></h3><div class="notion-text notion-block-a2a8c54b92844042be7de75cfaa90bf8">语法高亮syntax on
行号set nu</div><div class="notion-text notion-block-749b1dd3ede945679dee457dd65e3aff">tab/制表符长度 set ts=4 sw=4</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-153be2e0568342ba8a57573623f5355b" data-id="153be2e0568342ba8a57573623f5355b"><span><div id="153be2e0568342ba8a57573623f5355b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#153be2e0568342ba8a57573623f5355b" title="控制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">控制</span></span></h3><div class="notion-text notion-block-fff3ea0e0ffe801cb572d9c0bf80ce0b"><code class="notion-inline-code">u</code> undo </div><div class="notion-text notion-block-7890db54b79b4c7983e63922dbb48c16"><code class="notion-inline-code">ctrl+r</code> redo</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-17f1349f35b745bc8a9675745ccb57cb" data-id="17f1349f35b745bc8a9675745ccb57cb"><span><div id="17f1349f35b745bc8a9675745ccb57cb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#17f1349f35b745bc8a9675745ccb57cb" title="光标控制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">光标控制</span></span></h3><div class="notion-text notion-block-9083779d132f40689fcddcc6e1bafd2e"><code class="notion-inline-code">h jk l</code> ← ↓↑ →
<code class="notion-inline-code">w</code> word →
<code class="notion-inline-code">b</code> back word ←</div><div class="notion-text notion-block-22eac3fa42bd4fa69bd569db049dd225"><code class="notion-inline-code">ctrl+f</code> forward page down
<code class="notion-inline-code">ctrl+b</code> backward page up</div><div class="notion-text notion-block-3c7b497eacb942519adc8183d3c4da51"><code class="notion-inline-code">88gg</code> goto line 88 
<code class="notion-inline-code">10j</code> down 10 lines 
<code class="notion-inline-code">10k</code> up 10 lines 
<code class="notion-inline-code">G</code> goto line buttom </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-23f522448c3648a095e97f4d6781ae43" data-id="23f522448c3648a095e97f4d6781ae43"><span><div id="23f522448c3648a095e97f4d6781ae43" class="notion-header-anchor"></div><a class="notion-hash-link" href="#23f522448c3648a095e97f4d6781ae43" title="搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">搜索</span></span></h3><div class="notion-text notion-block-7ab21422e3614059893b7b659b04cb32"><code class="notion-inline-code">/123</code> search “123” 
<code class="notion-inline-code">n</code> next word 
<code class="notion-inline-code">shift+n (N)</code> previous word </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-e4fad9691366409d84c8bf8f642a4e9b" data-id="e4fad9691366409d84c8bf8f642a4e9b"><span><div id="e4fad9691366409d84c8bf8f642a4e9b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e4fad9691366409d84c8bf8f642a4e9b" title="复制剪切粘贴"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">复制剪切粘贴</span></span></h3><div class="notion-text notion-block-9587458eeef74a15ac82e859e837db52">
<code class="notion-inline-code">c[n]c</code> cut [next lines] 
<code class="notion-inline-code">p</code> paste 
<code class="notion-inline-code">[n]yy</code> copy [next lines] 
<code class="notion-inline-code">[n]dd</code> delete [next lines] </div><div class="notion-text notion-block-bdf474d9e48d43bf87856d794f397aee"><code class="notion-inline-code">v</code> – VISUAL – 
press <code class="notion-inline-code">← ↓↑ →</code> to select</div><div class="notion-text notion-block-fcfcb8260fba45228bdbdfc151ec8d94"><code class="notion-inline-code">ctrl+n</code> auto complete (default) </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-5be0e37a67e74bf9acf094a3c35ebcad" data-id="5be0e37a67e74bf9acf094a3c35ebcad"><span><div id="5be0e37a67e74bf9acf094a3c35ebcad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5be0e37a67e74bf9acf094a3c35ebcad" title="插件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">插件</span></span></h3><div class="notion-text notion-block-052206f81536412491c13c947c0d2e82">
vim-plug <a class="notion-link" href="https://github.com/junegunn/vim-plug" target="_blank" rel="noopener noreferrer">https://github.com/junegunn/vim-plug</a><a class="notion-link" href="http://vimawesome.com/" target="_blank" rel="noopener noreferrer">vimawesome.com</a> <a class="notion-link" href="https://vimawesome.com/plugin/nerdtree-red" target="_blank" rel="noopener noreferrer">https://vimawesome.com/plugin/nerdtree-red</a></div><div class="notion-text notion-block-27b6dece996b48c58ca76a0f5c8ed266">uninstall :PlugClean
</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robot]]></title>
            <link>https://www.housz.cn/article/robot</link>
            <guid>https://www.housz.cn/article/robot</guid>
            <pubDate>Mon, 01 Jul 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1f891faa9c114b24b9f9a46ef7d3a67c"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><a class="notion-page-link notion-block-fa13ec98b43142d7a0764914a64792fc" href="/fa13ec98b43142d7a0764914a64792fc"><span class="notion-page-title"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-title-icon notion-page-icon" role="img" aria-label="🗒️">🗒️</span></div><span class="notion-page-title-text">Robot：机器人描述文件</span></span></a><a class="notion-page-link notion-block-f59166ec210c473881be08e5d412f30a" href="/f59166ec210c473881be08e5d412f30a"><span class="notion-page-title"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-title-icon notion-page-icon" role="img" aria-label="🗒️">🗒️</span></div><span class="notion-page-title-text">Robot：obj模型</span></span></a><a class="notion-page-link notion-block-eb1a64963510492d9b3832d022a05560" href="/eb1a64963510492d9b3832d022a05560"><span class="notion-page-title"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-title-icon notion-page-icon" role="img" aria-label="🗒️">🗒️</span></div><span class="notion-page-title-text">Robot：冗余约束</span></span></a><div class="notion-blank notion-block-ee15a4961d744c9fbdb8e05ebcf16bd0"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visual Studio + CMake + vcpkg]]></title>
            <link>https://www.housz.cn/article/visualstudio-cmake-vcpkg</link>
            <guid>https://www.housz.cn/article/visualstudio-cmake-vcpkg</guid>
            <pubDate>Fri, 14 Jun 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-7508be0902974845b71e740deee5a039"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-b90c36724159472b9aca63955abda727"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A79fe83bd-0afa-4f0d-9788-6ed4c8025096%3AUntitled.png?table=block&amp;id=b90c3672-4159-472b-9aca-63955abda727&amp;t=b90c3672-4159-472b-9aca-63955abda727" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-bf10d11da352462192eb5a894748da56"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robot：obj模型]]></title>
            <link>https://www.housz.cn/article/robot-import-obj</link>
            <guid>https://www.housz.cn/article/robot-import-obj</guid>
            <pubDate>Mon, 15 Jul 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-77747a5741324dab99645b0513c482e1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-23057e2ff2674136bee6587256b44772" data-id="23057e2ff2674136bee6587256b44772"><span><div id="23057e2ff2674136bee6587256b44772" class="notion-header-anchor"></div><a class="notion-hash-link" href="#23057e2ff2674136bee6587256b44772" title="在线测试平台："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">在线测试平台：</span></span></h2><div class="notion-text notion-block-c179eeaa3039427c9939312bcbe0b737"><a class="notion-link" href="https://simdemos.housz.cn/robot/demos/customise/index.html" target="_blank" rel="noopener noreferrer">https://simdemos.housz.cn/robot/demos/customise/index.html</a></div><div class="notion-blank notion-block-28035b6794ce450c9c3ecaa522744209"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3139185357974387a8936ece6b8d84eb" data-id="3139185357974387a8936ece6b8d84eb"><span><div id="3139185357974387a8936ece6b8d84eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3139185357974387a8936ece6b8d84eb" title="单个obj测试"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">单个obj测试</span></span></h2><div class="notion-text notion-block-1aeb70a7d87c4c6c98a2eb63ef962e67">首先导入一个简单的立方体（box123.obj），立方体x,y,z方向尺寸分别为：1，2，3。box123.obj文件如下：</div><details class="notion-toggle notion-block-3195118060054b58a16ff30ada92276d"><summary><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3195118060054b58a16ff30ada92276d" data-id="3195118060054b58a16ff30ada92276d"><span><div id="3195118060054b58a16ff30ada92276d" class="notion-header-anchor"></div><span class="notion-h-title">box123.obj</span></span></h4></summary><div></div></details><div class="notion-text notion-block-5a12725efee24892a58f96329a2b4855">编写一个简单的固定关节（fixed），把这个obj模型放在场景中观察（把test.json和box123.obj保存到本地并同时上传到测试平台）：</div><details class="notion-toggle notion-block-7d7781274771444abcf57a4c25cdbf80"><summary><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-7d7781274771444abcf57a4c25cdbf80" data-id="7d7781274771444abcf57a4c25cdbf80"><span><div id="7d7781274771444abcf57a4c25cdbf80" class="notion-header-anchor"></div><span class="notion-h-title">test.json</span></span></h4></summary><div></div></details><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0308004a3aff4660888367317c42c21f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A2838125a-76ea-4830-9ed4-aad9b8aa4b70%3AUntitled.png?table=block&amp;id=0308004a-3aff-4660-8883-67317c42c21f&amp;t=0308004a-3aff-4660-8883-67317c42c21f" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-80ab10c4dd5a4166875b78eb2337775f"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-ad43e78621884c06b2de7f6ece278030" data-id="ad43e78621884c06b2de7f6ece278030"><span><div id="ad43e78621884c06b2de7f6ece278030" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ad43e78621884c06b2de7f6ece278030" title="obj+关节"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">obj+关节</span></span></h2><div class="notion-text notion-block-ad9ea092e15849f59fc904fce7b3828b">用一个滑动关节推动这个box123进行伸缩。</div><div class="notion-text notion-block-1fc694719f7a481b933cd44c0adfc7ac">编写描述文件prismatic_single_obj.json：</div><details class="notion-toggle notion-block-d186f2c5eb7b4cb1bfa3b3266a153f43"><summary><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-d186f2c5eb7b4cb1bfa3b3266a153f43" data-id="d186f2c5eb7b4cb1bfa3b3266a153f43"><span><div id="d186f2c5eb7b4cb1bfa3b3266a153f43" class="notion-header-anchor"></div><span class="notion-h-title">prismatic_single_obj.json</span></span></h4></summary><div><div class="notion-blank notion-block-31224298f5bf4552b762f52b5dc64dfd"> </div></div></details><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9b8e77c017094b24876094733f10f0ad"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3290c150-6a90-4ffe-93cc-03e7ef704ceb%3AUntitled.png?table=block&amp;id=9b8e77c0-1709-4b24-8760-94733f10f0ad&amp;t=9b8e77c0-1709-4b24-8760-94733f10f0ad" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1ca77751658f4fad9e65ca2c3f9929d8">俯视图示意：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2553c05c8d564fafb7fc407cb1ea810c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A90bf198d-dabf-4edb-adc1-a523afdb96fb%3AUntitled.png?table=block&amp;id=2553c05c-8d56-4faf-b7fc-407cb1ea810c&amp;t=2553c05c-8d56-4faf-b7fc-407cb1ea810c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-f2f8dbf82b6c4707b16f45e29ca74c4d">注意joint2的&quot;origin_translation&quot;: [<b>2.5</b>, 0, 0]。
</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robot：机器人描述文件]]></title>
            <link>https://www.housz.cn/article/robot-description</link>
            <guid>https://www.housz.cn/article/robot-description</guid>
            <pubDate>Sat, 01 Jun 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-8b2f6acd38a34d9aaf869a0916c2c779"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><div class="notion-text notion-block-14f2d0519dde45d6b586e0b25f1edc4e">一个多关节级联的实例。（按住左键拖动转动视角，按住右键拖动任意移动视角，滚轮放大缩小。右侧滑动条可自由控制关节角度）</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-42c134e6e2354d349c2f3e4b36a389f8" data-id="42c134e6e2354d349c2f3e4b36a389f8"><span><div id="42c134e6e2354d349c2f3e4b36a389f8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#42c134e6e2354d349c2f3e4b36a389f8" title="0 预备知识"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">0 预备知识</span></span></h2><div class="notion-blank notion-block-89184dfed63543c3a4118b373aa2b539"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-03b4a6c6890f48bc9e73c30d7c88ea41" data-id="03b4a6c6890f48bc9e73c30d7c88ea41"><span><div id="03b4a6c6890f48bc9e73c30d7c88ea41" class="notion-header-anchor"></div><a class="notion-hash-link" href="#03b4a6c6890f48bc9e73c30d7c88ea41" title="0.0 符号约定"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">0.0 符号约定</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3450a98142e2451880dbbbde172bb888" data-id="3450a98142e2451880dbbbde172bb888"><span><div id="3450a98142e2451880dbbbde172bb888" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3450a98142e2451880dbbbde172bb888" title="坐标系"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">坐标系</span></span></h4><div class="notion-text notion-block-cb13e7ec4c174569a1e9e5b889f3fe31">采用右手坐标系。面向屏幕时，屏幕右方为<b>x</b>轴正方向，上方为<b>y</b>轴正方向，屏幕往外是<b>z</b>轴正方向：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d696fae997ff42a198a6e5290ce01c49"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:336px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A92303670-493e-4da2-95b2-186fafef9c5b%3AUntitled.png?table=block&amp;id=d696fae9-97ff-42a1-98a6-e5290ce01c49&amp;t=d696fae9-97ff-42a1-98a6-e5290ce01c49" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-9742d2a400a340898d4aeb9fe90806cb">一般约定坐标系红色为x轴，绿色为y轴，蓝色为z轴（xyz依次对应RGB）。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-fb241852669d4651b707230ccf7ea9f7" data-id="fb241852669d4651b707230ccf7ea9f7"><span><div id="fb241852669d4651b707230ccf7ea9f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fb241852669d4651b707230ccf7ea9f7" title="单位制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">单位制</span></span></h4><div class="notion-text notion-block-57734d4b2f6044029d052fab56431286"><b>角度</b>采用<b>弧度制，浮点数，取值范围为R</b>。例如下图中，向量<code class="notion-inline-code">(0,0,1)</code>绕<b>z轴</b>旋转了<code class="notion-inline-code">π/2</code>到<code class="notion-inline-code">(0,1,0)</code> 。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-91839fce0f094e018559ea5efc621e3a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A5e9c88fd-5d85-4078-ba7b-47124cc8744b%3AUntitled.png?table=block&amp;id=91839fce-0f09-4e01-8559-ea5efc621e3a&amp;t=91839fce-0f09-4e01-8559-ea5efc621e3a" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-054b1b69fa8c478a93162fc4c394097a"><b>长度</b>单位为<b>米，浮点数，取值范围为R</b>。</div><div class="notion-text notion-block-8d617caeb520441ba58a30087fa907ce"><b>颜色</b>采用<b>RGB</b>格式，每个分量为浮点数，取值范围为<code class="notion-inline-code">[0, 255]</code>。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b10049a59c464effa814f9ca8648d3c7" data-id="b10049a59c464effa814f9ca8648d3c7"><span><div id="b10049a59c464effa814f9ca8648d3c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b10049a59c464effa814f9ca8648d3c7" title="0.1 JSON格式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">0.1 JSON格式</span></span></h3><div class="notion-text notion-block-d9367e327583494ba7dea1bc0cd0bf0f">JSON格式是一种通用的纯文本数据交换格式，常用于程序之间传递格式化的信息。相比于XML等其他数据格式，JSON能兼顾人类理解和机器解析的效率。目前绝大多数编程语言都能方便地对JSON格式进行读写。</div><div class="notion-text notion-block-478abd52e7664e54b224ab5203efdce0">
JSON由两种数据结构构成：对象（object）和数组（array）。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-7050b314d579497bb780804be98c1ddc" data-id="7050b314d579497bb780804be98c1ddc"><span><div id="7050b314d579497bb780804be98c1ddc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7050b314d579497bb780804be98c1ddc" title="
对象（object）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">
对象（object）</span></span></h4><div class="notion-text notion-block-f48c6b819ed44162b0f4854b4fd33b6e">对象由键值对组成的无序集合，<b>键</b>是字符串，<b>值</b>可以是任何类型，包括对象和数组。对象由一对花括号<code class="notion-inline-code">{ }</code>包围，键和值之间用冒号<code class="notion-inline-code">:</code>分隔。键值对之间用逗号<code class="notion-inline-code">,</code>分隔。</div><div class="notion-text notion-block-5cb7fcc97d6a402f81d79783afb44b5f">例如描述一个学生的信息：</div><div class="notion-blank notion-block-398d3cb1f0724b9d884e5477446f9c38"> </div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-c96d6ef17a874f2bbb04687637e37448" data-id="c96d6ef17a874f2bbb04687637e37448"><span><div id="c96d6ef17a874f2bbb04687637e37448" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c96d6ef17a874f2bbb04687637e37448" title="数组（array）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数组（array）</span></span></h4><div class="notion-text notion-block-dd1a5aa3b8064bd299c2fbb81e0f46ec">数组是值（value）的有序集合，每个值可以是任何类型，包括对象和数组。数组由一对方括号<code class="notion-inline-code">[ ]</code>包裹，值之间用逗号<code class="notion-inline-code">,</code>分隔。</div><div class="notion-text notion-block-32aa1bd4e0934c5da95dd6f2d44f35b3">例如给这个学生加入课程信息：</div><div class="notion-blank notion-block-d6d296fa77f646a5af56aa3089bd5803"> </div><div class="notion-text notion-block-bc03bd09b42142199ef6e3c62f84c2cc">嵌套</div><div class="notion-text notion-block-7f913f498c9646d3aec6d5977d817c15">对象和数组之间可以任意嵌套使用。例如创建一个<b>联系方式</b>的对象：</div><div class="notion-text notion-block-1b387d27ffcb40d8a7ccbef79c696149">给学生加入联系方式：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-5eb660948241486a864fae5998f57ff8" data-id="5eb660948241486a864fae5998f57ff8"><span><div id="5eb660948241486a864fae5998f57ff8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5eb660948241486a864fae5998f57ff8" title="1 机器人拓扑结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1 机器人拓扑结构</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-655f00e9ca294fb58b0a7abafc585b67" data-id="655f00e9ca294fb58b0a7abafc585b67"><span><div id="655f00e9ca294fb58b0a7abafc585b67" class="notion-header-anchor"></div><a class="notion-hash-link" href="#655f00e9ca294fb58b0a7abafc585b67" title="1.0 定义：开链和闭链机器人"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.0 定义：开链和闭链机器人</span></span></h3><div class="notion-text notion-block-2e02f931649d41de9d0f1015175278c0">首先直观定义开链和闭链机器人。例如一个挖掘机是一个典型的闭链机器人。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3f33b3a20ce3456eaf4a3c5aac45de96"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad191fe71-79c1-4c2e-a815-da18ca219acc%3AUntitled.png?table=block&amp;id=3f33b3a2-0ce3-456e-af4a-3c5aac45de96&amp;t=3f33b3a2-0ce3-456e-af4a-3c5aac45de96" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-0f693d1d228446e9ba4e30d4c15ca713">因为它有由液压油缸组成的闭环结构，如图中的三个三角形：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-04a2fc79ca364897a82de8aa05e9606b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A59941f73-e2dd-4523-b66f-e845824a58e1%3AUntitled.png?table=block&amp;id=04a2fc79-ca36-4897-a82d-e8aa05e9606b&amp;t=04a2fc79-ca36-4897-a82d-e8aa05e9606b" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-898112b7598447249ba88e89f7dabed0">而开链机器人没有这样的闭环结构，例如典型的机械臂型机器人：</div><div class="notion-row notion-block-eff02c7e98884dd89103890892f1cff9"><div class="notion-column notion-block-ab7c1d994b1e48019351da68520e7348" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-585ddccb222f4e79a1055643a70a88ac"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:144px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac49ab343-ff5a-4e41-b024-d0fbb496fe09%3AUntitled.png?table=block&amp;id=585ddccb-222f-4e79-a105-5643a70a88ac&amp;t=585ddccb-222f-4e79-a105-5643a70a88ac" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-5817cf62574046158f0bc48cd6222e71" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-101c04b3c47e48f993e3cc98069e2e69"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:144px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Addcf2238-a304-4287-9481-b2e82d172f79%3AUntitled.png?table=block&amp;id=101c04b3-c47e-48f9-93e3-cc98069e2e69&amp;t=101c04b3-c47e-48f9-93e3-cc98069e2e69" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-text notion-block-55384149f6d44551892b8847b30902e7">本节首先考虑不含闭环结构的开链机器人结构。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b1fbb246a24f4a578c9e1d205540e81c" data-id="b1fbb246a24f4a578c9e1d205540e81c"><span><div id="b1fbb246a24f4a578c9e1d205540e81c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b1fbb246a24f4a578c9e1d205540e81c" title="1.1 拓扑结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.1 拓扑结构</span></span></h3><div class="notion-text notion-block-fe02795a7aa2420ba781eb97a80f572e">开链机器人的结构可以用树形结构来描述：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-00feb2cf969f4441b484f6f3cc2bf46c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:576px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A87ddeaea-7ec3-4e1c-8eb9-49def26f8a4c%3AUntitled.png?table=block&amp;id=00feb2cf-969f-4441-b484-f6f3cc2bf46c&amp;t=00feb2cf-969f-4441-b484-f6f3cc2bf46c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-286558f411d3455caa52f8fc67f60f16">图中的方块表示机器人的<b>部件（link）</b>，黄点表示连接部件的<b>关节（joint)</b>。</div><div class="notion-text notion-block-827d02eafb23459c83b85a63be5bcf96">我们可以用树的数据结构来表示机器人的拓扑结构。图中的<b>节点（node）</b>表示机器人的<b>部件</b>，<b>边（edge）</b>表示机器人<b>的关节。</b></div><div class="notion-row notion-block-c2e4904afe184e1cb0ae24b1dc3ee702"><div class="notion-column notion-block-512a0dd2b4dd47c298f8cc85ce130ba2" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-7f4fef0f5dbd46378b9a0ed65ad7277a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3707578a-b945-4969-92dd-a83cc2ac1a35%3AUntitled.png?table=block&amp;id=7f4fef0f-5dbd-4637-8b9a-0ed65ad7277a&amp;t=7f4fef0f-5dbd-4637-8b9a-0ed65ad7277a" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-eb4dd263eae34eada0f75ae093a21965" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-a7fa97048be3498a9e1bddc6e77b9308"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A93417338-769d-4a77-b4ec-18fc4414b8e7%3AUntitled.png?table=block&amp;id=a7fa9704-8be3-498a-9e1b-ddc6e77b9308&amp;t=a7fa9704-8be3-498a-9e1b-ddc6e77b9308" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-text notion-block-ea0cd9bc3eea4fc8866c1e821b3339c0">可以观察到整个拓扑图的特点：</div><ul class="notion-list notion-list-disc notion-block-6b2da84ad5644cbbbd7a9d57c3f1b269"><li>没有环状结构；</li></ul><ul class="notion-list notion-list-disc notion-block-ff52115440604d748dc8027b057c68db"><li>除第一个节点外（机器人底座部件对应的节点），每个节点都对应唯一的一个父节点，二者通过唯一的一个关节来连接。可认为底座部件的父节点为世界（world）。</li></ul><div class="notion-blank notion-block-e0b08d341f874a23b6e4846e9b8c345c"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-20272349b6fb41a9a4f49333d5fed378" data-id="20272349b6fb41a9a4f49333d5fed378"><span><div id="20272349b6fb41a9a4f49333d5fed378" class="notion-header-anchor"></div><a class="notion-hash-link" href="#20272349b6fb41a9a4f49333d5fed378" title="2 开链机器人的描述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2 开链机器人的描述</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-bc2fe34e15224aad8d77e23447086c3a" data-id="bc2fe34e15224aad8d77e23447086c3a"><span><div id="bc2fe34e15224aad8d77e23447086c3a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#bc2fe34e15224aad8d77e23447086c3a" title="2.0 刚体运动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.0 刚体运动</span></span></h3><div class="notion-text notion-block-1e9b7176865f4debaa5d30f98d862430">我们把机器人的每个部件当作理想刚体，即只能进行<b>移动（translation）</b>和<b>转动（rotation）</b>，而不能进行任何变形。</div><div class="notion-text notion-block-36ca2f0ed7e7454f9b333521cc0bb9d9">例如拿出机器人的任意一个部件，把这个部件简化为一个长方体来考虑：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d38c19a44fab4c39ad9cdd20ab4350a8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A23c6f135-6256-4abb-9ef0-63925b497512%3AUntitled.png?table=block&amp;id=d38c19a4-4fab-4c39-ad9c-dd20ab4350a8&amp;t=d38c19a4-4fab-4c39-ad9c-dd20ab4350a8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-a74ab319b05d4dc09ac8e356cd5afbae"> </div><div class="notion-text notion-block-e36408be461b481d95485cd5b0244399">假设图中黄色点为这个部件的坐标原点（坐标原点的选取约定见2.1节）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2be75a98653042ada85476b79dab7ac3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A5020c21c-54e1-44cc-9ec2-784f20d10478%3AUntitled.png?table=block&amp;id=2be75a98-6530-42ad-a854-76b79dab7ac3&amp;t=2be75a98-6530-42ad-a854-76b79dab7ac3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-4862c211e9a442efb5758f8f7a6debc2">三维空间中的自由刚体可以做：沿x，y，z轴任意移动、绕x，y，z轴任意转动，因此三维空间自由刚体有六个自由度。</div><div class="notion-text notion-block-f728ed27ccd641538a99afbab695ce57">这里说的”六个自由度“可以简单理解为：给出六个坐标（移动距离<code class="notion-inline-code">translation = {x, y, z}</code>和旋转角度<code class="notion-inline-code">orientation= {x, y, z}</code>）就能唯一确定这个刚体的空间位姿（位置+姿态）。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-ea0e458b3f7a45189a7ac712fd268469" data-id="ea0e458b3f7a45189a7ac712fd268469"><span><div id="ea0e458b3f7a45189a7ac712fd268469" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ea0e458b3f7a45189a7ac712fd268469" title="刚体运动举例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">刚体运动举例</span></span></h4><div class="notion-text notion-block-fb59a5a018ba4e2aa653d6e39a068c20">①绕z轴旋转一定角度<b>θ</b>：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ac836b23f43b4f8096595504b4092854"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af5b543be-dd14-451a-b844-7898b33e7ef4%3AUntitled.png?table=block&amp;id=ac836b23-f43b-4f80-9659-5504b4092854&amp;t=ac836b23-f43b-4f80-9659-5504b4092854" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-5320a4cb2cc647029a22cf56bc363e86">这个运动是：绕初始坐标系的z轴正向旋转了<b>θ度</b>，可以表示为：</div><div class="notion-text notion-block-9ad6ae1c2c384882a28d15759f190b9c"><code class="notion-inline-code">orientation= {0, 0,</code><code class="notion-inline-code"><b> θ</b></code><code class="notion-inline-code">}, translation = {0, 0, 0}</code></div><div class="notion-text notion-block-e4b53cd0a77b4ddf816e07a6434bb220">②沿x轴移动一定距离<b>Δx</b>：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9c1dd74439994ea4859b0f41c22329ed"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af9f39fdd-747d-4cc0-a5a9-05ebbf0ad6e1%3AUntitled.png?table=block&amp;id=9c1dd744-3999-4ea4-859b-0f41c22329ed&amp;t=9c1dd744-3999-4ea4-859b-0f41c22329ed" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-fa7eb53ee07349ae810d180b108e0712">注意这些运动都是相对于初始坐标系来讲的。任何时候考虑刚体运动首先都要确定参考系。</div><div class="notion-text notion-block-4ff447a33ed4419d8e131432d05c963f">这个运动是：沿着x轴方向移动了<b>Δx</b>，可以表示为：</div><div class="notion-text notion-block-22590a4dc366416a9fef605f7be4e2e6"><code class="notion-inline-code">orientation= {0, 0, 0}, translation = {</code><code class="notion-inline-code"><b>Δx</b></code><code class="notion-inline-code">, 0, 0}</code></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-6ddf28bc4e65412b86197840c64f78c6" data-id="6ddf28bc4e65412b86197840c64f78c6"><span><div id="6ddf28bc4e65412b86197840c64f78c6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6ddf28bc4e65412b86197840c64f78c6" title="刚体运动合成*"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">刚体运动合成*</span></span></h4><div class="notion-text notion-block-364ac38fe07e4c1f95271cb3a079d612">刚体的运动不一定只有移动或者只有转动，更常见的情况是又有移动又有转动。</div><div class="notion-text notion-block-5e4d68adab8c4510abfdaf90f17fa1dd">注意，我们始终是站在初始坐标系的角度来考虑运动，因此”先旋转再平移“和”先平移再旋转“是不同的。下图左边为先旋转再平移，右边为先平移再旋转。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0a6d1e54e50a470086e7eb27997c98a1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:384px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7bb3fe71-f44f-4c4a-bd23-8e983c7d128a%3AUntitled.png?table=block&amp;id=0a6d1e54-e50a-4700-86e7-eb27997c98a1&amp;t=0a6d1e54-e50a-4700-86e7-eb27997c98a1" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2d9f37b1569b47a0a5df1b23a2650783">我们约定采用先旋转再平移的变换。上图左边的运动为先旋转了θ度到位形①，又沿着x轴平移了Δx到位形②。②描述为：</div><div class="notion-text notion-block-53be54c6d30f4083aa211d2e4f2d5fcb"><code class="notion-inline-code">orientation= {</code><code class="notion-inline-code"><b>θ</b></code><code class="notion-inline-code">, 0, 0}, translation = {</code><code class="notion-inline-code"><b>Δx</b></code><code class="notion-inline-code">, 0, 0}</code> 。</div><div class="notion-text notion-block-a98e98072ab84ff083364a58bf337eaf">*这种旋转+平移的变换统称为刚体变换，可用4x4矩阵变换矩阵表示。参考：</div><div class="notion-text notion-block-3e09714099d643d1b444bf27234c46bd"><a class="notion-link" href="https://en.wikipedia.org/wiki/Rotation_matrix" target="_blank" rel="noopener noreferrer">Rotation matrix - Wikipedia</a></div><div class="notion-text notion-block-22f637501d394cd3a0e95064327dffec"><a class="notion-link" href="https://en.wikipedia.org/wiki/Transformation_matrix" target="_blank" rel="noopener noreferrer">Transformation matrix - Wikipedia</a></div><div class="notion-text notion-block-36ce4e9fafe04090aa7e5223e40b4a78"><a class="notion-link" href="https://krasjet.github.io/quaternion/quaternion.pdf" target="_blank" rel="noopener noreferrer">krasjet.github.io/quaternion/quaternion.pdf</a></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-db4b484ca9de4e09a5e08193401e1e58" data-id="db4b484ca9de4e09a5e08193401e1e58"><span><div id="db4b484ca9de4e09a5e08193401e1e58" class="notion-header-anchor"></div><a class="notion-hash-link" href="#db4b484ca9de4e09a5e08193401e1e58" title="2.1 机器人部件描述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.1 机器人部件描述</span></span></h3><div class="notion-text notion-block-d1503c5708a64b92af9ac39b1cec716d">知道了如何描述基本的刚体运动，我们就可以用JSON格式化描述一个具体的部件了。</div><div class="notion-text notion-block-eb67eb81627d45bc8874afa31ba691a7">下面是一个关节部件的例子,接下来逐条解释各个属性.</div><details class="notion-toggle notion-block-d33d4322dc0e429ca5d06aaa610cbdb3"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-d33d4322dc0e429ca5d06aaa610cbdb3" data-id="d33d4322dc0e429ca5d06aaa610cbdb3"><span><div id="d33d4322dc0e429ca5d06aaa610cbdb3" class="notion-header-anchor"></div><span class="notion-h-title"><b>名字（name）</b></span></span></h4></summary><div><div class="notion-text notion-block-437ae033df5748968c4abf12328ac174">首先为部件定义唯一的<b>名字（name）</b>。注意部件以名字为<b>唯一标识符</b>，不能与其他部件重名。</div></div></details><details class="notion-toggle notion-block-aef4e408e9fc42819b2e59301f2c19bf"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-aef4e408e9fc42819b2e59301f2c19bf" data-id="aef4e408e9fc42819b2e59301f2c19bf"><span><div id="aef4e408e9fc42819b2e59301f2c19bf" class="notion-header-anchor"></div><span class="notion-h-title">部件偏移量</span></span></h4></summary><div><div class="notion-text notion-block-e0a89fd8caaa4a0896ad60d4abd02089">再为部件定义相对于其自身坐标系的平移（origin_translation）和旋转（origin_orientation）。一般默认没有任何运动即可。</div></div></details><details class="notion-toggle notion-block-18d3bf4dacfe4cb1a1f3d62f9ebf4acb"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-18d3bf4dacfe4cb1a1f3d62f9ebf4acb" data-id="18d3bf4dacfe4cb1a1f3d62f9ebf4acb"><span><div id="18d3bf4dacfe4cb1a1f3d62f9ebf4acb" class="notion-header-anchor"></div><span class="notion-h-title"><b>模型（visual）</b></span></span></h4></summary><div><div class="notion-text notion-block-cdd34cec6eb648c4a00de36f9eb62f1a">定义部件的外观<b>模型（visual）</b>。</div><h4 class="notion-h notion-h3 notion-block-f5e23cca7d514d5da5f3db61e354e445" data-id="f5e23cca7d514d5da5f3db61e354e445"><span><div id="f5e23cca7d514d5da5f3db61e354e445" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f5e23cca7d514d5da5f3db61e354e445" title="几何偏移量"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">几何偏移量</span></span></h4><div class="notion-text notion-block-e97ed84f578742e98218606e31b70451">首先解释<b>visual</b>里面的<b>origin_translation</b>和<b>origin_orientation</b>属性<b>。</b></div><div class="notion-text notion-block-df62d577ce974f32b0d3963fa1b0ff87">通常,在使用blender之类的建模软件或者用代码生成三维模型时,会把<b>模型原点</b>放在<b>坐标原点(0, 0, 0)</b>,如下图:</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-e0aa9d9594a74f538dee50779a23f60a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A78ddd373-efc4-456a-b940-5a9fd1914596%3AUntitled.png?table=block&amp;id=e0aa9d95-94a7-4f53-8dee-50779a23f60a&amp;t=e0aa9d95-94a7-4f53-8dee-50779a23f60a" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-18c1837ccbaa4e04b97b8a839f34cbcf">假设我们要让这个模型绕z轴旋转<code class="notion-inline-code">π/4</code> (图中蓝色为旋转轴示意图):</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-fc2554a8d7644649970b05b9e2bcba6d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A48873f01-f3a9-4781-930e-ee31e00862dc%3AUntitled.png?table=block&amp;id=fc2554a8-d764-4649-970b-05b9e2bcba6d&amp;t=fc2554a8-d764-4649-970b-05b9e2bcba6d" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-48b689aa4d1e47d88d0947d91e858d55"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A151549dc-bdcf-4713-b089-2333f7df4250%3AUntitled.png?table=block&amp;id=48b689aa-4d1e-47d8-8d09-47d91e858d55&amp;t=48b689aa-4d1e-47d8-8d09-47d91e858d55" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-55040744d98d44688bd54c3db9acaf65">而很多机械部件的旋转轴并不在部件中心,更普遍的是在部件的某一侧.如下图机械臂的某部件:</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-772b62cdc01443d8b77d08cbc622cbcd"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:336px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aaa17f8a8-8b29-4ec5-959e-bd2a70ece49e%3AUntitled.png?table=block&amp;id=772b62cd-c014-43d8-b77d-08cbc622cbcd&amp;t=772b62cd-c014-43d8-b77d-08cbc622cbcd" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-7b639018028e420fa5b0607ee66dfbc8"> </div><div class="notion-text notion-block-6e1ab0feef034adfa10ada9db14f1177">因此,如果部件的模型原点不和旋转轴重合,就要定义一个偏移量,来让程序知道正确的旋转轴位置.</div><div class="notion-blank notion-block-7b0d85944057405fb73c54aefcfabe7d"> </div><div class="notion-text notion-block-ace50b3b7bd042e1a82f3c4510c97a15">如下图,让模型相对于模型原点沿x轴移2,再绕z轴旋转<code class="notion-inline-code">π/4</code> :</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-38ae6870384d40a6bcef230b2c4a58df"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac1d40951-7d6f-4fe6-bcce-716e3ded60e7%3AUntitled.png?table=block&amp;id=38ae6870-384d-40a6-bcef-230b2c4a58df&amp;t=38ae6870-384d-40a6-bcef-230b2c4a58df" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-573b1ac798d147f2b0a4e7d3f89e293e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A549ccb82-0356-43e9-8152-370d61092a88%3AUntitled.png?table=block&amp;id=573b1ac7-98d1-47f2-b0a4-e7d3f89e293e&amp;t=573b1ac7-98d1-47f2-b0a4-e7d3f89e293e" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-5d9c026015de4ef1935f13cc0079d6f9">这就对应着描述文件里的:</div><div class="notion-text notion-block-6351edef6eb9409580c8423fce6ec646">旋转偏移量<b>origin_orientation</b>也是同理.</div><div class="notion-text notion-block-b72b6aaabdc34933a87b41f5355214d9">注意,下面的情况<b>origin_translation和origin_orientation都为[0,0,0]即可:</b></div><ul class="notion-list notion-list-disc notion-block-4e63cce588704ac5bcc9e763fd4b3f59"><li>模型文件生成后,模型原点已经和旋转轴原点重合.(方便起见,推荐生成模型时就让模型原点就已经和旋转轴原点原点重合).如何链接外部文件见下一小节.</li></ul><ul class="notion-list notion-list-disc notion-block-5a5a3ed7cb8943b4934443d621c26ec9"><li><b>&quot;geometry&quot;</b>的<b>&quot;type&quot;</b>为”box””cylinder”等系统预设的基础几何体,例如:</li><ul class="notion-list notion-list-disc notion-block-5a5a3ed7cb8943b4934443d621c26ec9"></ul></ul><h4 class="notion-h notion-h3 notion-block-4c5ed439ccbe4b1a90fce4db49ed579a" data-id="4c5ed439ccbe4b1a90fce4db49ed579a"><span><div id="4c5ed439ccbe4b1a90fce4db49ed579a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4c5ed439ccbe4b1a90fce4db49ed579a" title="几何体(geometry)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">几何体(geometry)</span></span></h4><div class="notion-text notion-block-6d7a13a9dfd340c39875064e867f170c">再介绍描述几何体信息的<b>&quot;geometry&quot;</b>属性:</div><div class="notion-text notion-block-0627dd17e5f242d99f547e2c1502c138">几何体“type”属性定义了几何体的类型信息.可分为:</div><ul class="notion-list notion-list-disc notion-block-43472c1755204e69a9701328e70bf619"><li>基本集合体(简单的几何形状)，如<b>长方体（box）</b>，<b>圆柱体（cylinder）</b>等。只需要描述几何参数即可.</li><ul class="notion-list notion-list-disc notion-block-43472c1755204e69a9701328e70bf619"><div class="notion-text notion-block-671748e5a2f34f428109842003e18d19">例如xyz方向尺寸分别为3, 0.2, 0.2的长方体（box）.系统会根据尺寸自动生成模型：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-c9367e9447c3468dba3ad60e682873a8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af23904b6-7efb-4eb7-92c2-fd6f3337eb1b%3AUntitled.png?table=block&amp;id=c9367e94-47c3-468d-ba3a-d60e682873a8&amp;t=c9367e94-47c3-468d-ba3a-d60e682873a8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1a983d0110124caa8973722f48a4b994">（此处可以看出如果，&quot;box&quot;的模型原点在最左侧，不需要手动设定偏移）</div><div class="notion-text notion-block-21c23cc33b3f41919f4e7319db867367">再例如半径分别为0.2，0.1，高度为2的圆柱体（cylinder）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-8c6263e0bdbd482e9b74593d83ef75a3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa45f0794-d29e-42e2-b7c0-ac269bce862d%3AUntitled.png?table=block&amp;id=8c6263e0-bdbd-482e-9b74-593d83ef75a3&amp;t=8c6263e0-bdbd-482e-9b74-593d83ef75a3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-265b7c436bdb4287838a7a850f021960">（此处可以看出，圆柱体默认是沿着x方向躺着的，模型原点在底部）</div></ul></ul><ul class="notion-list notion-list-disc notion-block-b4de41cfc423465986db5f95de6e3d1e"><li>外部链接模型（暂时只支持.obj格式），<b>“type”为“mesh”</b>类型：</li><ul class="notion-list notion-list-disc notion-block-b4de41cfc423465986db5f95de6e3d1e"><div class="notion-text notion-block-7c90cc60e423416ca67337bc389894ab">例如，外部连接一个机械臂部件：</div><div class="notion-text notion-block-0617df035d8643f4ac000ca7b5f2b253">其中&quot;url&quot;指定模型路径，&quot;scale&quot;指定在xyz方向上的缩放比例</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/single_obj/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure></ul></ul><h4 class="notion-h notion-h3 notion-block-e80baf733b444228bcc45ef45be4dae5" data-id="e80baf733b444228bcc45ef45be4dae5"><span><div id="e80baf733b444228bcc45ef45be4dae5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e80baf733b444228bcc45ef45be4dae5" title="材质(geometry)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">材质(geometry)</span></span></h4><div class="notion-text notion-block-9907c960ed3d46978ad7931702102c01">暂时支持自定义模型的颜色&quot;color&quot;属性。下面是同一个模型分别为[0, 120, 10]和[120, 10, 0]的效果：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-5be69667a1f241ebb1e0f33c6269c6b0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A5c499ea6-a7b8-4ef6-ba60-5c009bbf770d%3AUntitled.png?table=block&amp;id=5be69667-a1f2-41eb-b1e0-f33c6269c6b0&amp;t=5be69667-a1f2-41eb-b1e0-f33c6269c6b0" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-102206d611e94820b94a0d89dc6ece00"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Acab86126-5be5-4101-a435-9db489765b79%3AUntitled.png?table=block&amp;id=102206d6-11e9-4820-b94a-0d89dc6ece00&amp;t=102206d6-11e9-4820-b94a-0d89dc6ece00" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-7c1df091833d4f219930325c731cd288">todo：支持obj格式的贴图</div></div></details><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-91843ecee0094aecb2a1afdf3ca78b0c" data-id="91843ecee0094aecb2a1afdf3ca78b0c"><span><div id="91843ecee0094aecb2a1afdf3ca78b0c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#91843ecee0094aecb2a1afdf3ca78b0c" title="2.2 机器人关节描述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.2 机器人<b>关节</b>描述</span></span></h3><div class="notion-row notion-block-fd4612c1c683452292db479209d3d5b8"><div class="notion-column notion-block-6d9d1b7b587b4738a4af4685618e336d" style="width:calc((100% - (2 * min(32px, 4vw))) * 0.3333333333333334)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-7a616c72a1464be0b287ce434ae7044e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:392px"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A58758a3c-113a-4e4b-ab43-c7dbcfe07b50%3AUntitled.png?table=block&amp;id=7a616c72-a146-4be0-b287-ce434ae7044e&amp;t=7a616c72-a146-4be0-b287-ce434ae7044e" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-cdbd632a5ea04b36aff64377fe923a5d" style="width:calc((100% - (2 * min(32px, 4vw))) * 0.33333333333333337)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-99578d6dccdd461ab224e810724c4bc0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:413px"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Adbcbfda6-7c3d-4e55-998c-2b531852eb79%3AUntitled.png?table=block&amp;id=99578d6d-ccdd-461a-b224-e810724c4bc0&amp;t=99578d6d-ccdd-461a-b224-e810724c4bc0" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-f838a6ca4d04447099a71556c56cc698" style="width:calc((100% - (2 * min(32px, 4vw))) * 0.3333333333333333)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1eaa04fdff48465480f221c05a9e7f9d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:144px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A077255af-f280-48d3-93e2-746292384a23%3AUntitled.png?table=block&amp;id=1eaa04fd-ff48-4654-80f2-21c05a9e7f9d&amp;t=1eaa04fd-ff48-4654-80f2-21c05a9e7f9d" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-text notion-block-a43355e1551e41599126854927a9761c">交互实例（按住左键拖动转动视角，按住右键拖动任意移动视角，滚轮放大缩小。右侧滑动条可自由控制关节角度）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/single_revolute/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><div class="notion-text notion-block-2e3cb00280f94e058a7ccb9e0f6d7d63">以上图最简单的旋转关节为例。图中白色圆柱是关节的示意图，表示其允许绕z轴转动。</div><div class="notion-text notion-block-80ea07a1572549cc80d671e1909eab99">我们依然用一个简单的图示来表示：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-05f9f95753df4de9998a4d1f1183a696"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:336px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A60135b3a-55ae-4129-9b22-2223ef1256c7%3AUntitled.png?table=block&amp;id=05f9f957-53df-4de9-998a-4d1f1183a696&amp;t=05f9f957-53df-4de9-998a-4d1f1183a696" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-621cb4542b7a4297ad86b6b52edefa2b">对于一个关节joint，它的作用是连接两个独立的部件（link）。</div><ul class="notion-list notion-list-disc notion-block-63bd3ffbd6dd4c4a96eae7ee72b7efcd"><li>一个joint有且仅有一个<b>父link</b>、有且仅有一个<b>子link</b>。这个例子中，joint1的父子部件分别为link0和link1。</li></ul><ul class="notion-list notion-list-disc notion-block-f8d4d138856c454c9526fd0001bfaba3"><li>joint控制其对应的子link的运动。这个例子中，可以理解为joint1旋转，绑在其上的link1随着它旋转。通常joint<b>1</b>可被称为link<b>1</b>的关节。</li></ul><ul class="notion-list notion-list-disc notion-block-7b76129aac6f4a4ca96269d6b2c3b2fd"><li>joint对于其子link的位置就是子link原点的位置（参考visual的几何偏移量）。joint相对于其父link的位置由关节偏移量定义（见下）</li></ul><div class="notion-text notion-block-0e8fde376474485994bceb20cfec725b">接下来就以这个例子，逐条解释关节的每个属性。</div><details class="notion-toggle notion-block-8851c16e8eef487ea1503eb19ea482fa"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-8851c16e8eef487ea1503eb19ea482fa" data-id="8851c16e8eef487ea1503eb19ea482fa"><span><div id="8851c16e8eef487ea1503eb19ea482fa" class="notion-header-anchor"></div><span class="notion-h-title"><b>名字（name）</b></span></span></h4></summary><div><div class="notion-text notion-block-590a384640984745bcb7664935eaa236">首先为关节定义唯一的<b>名字（name）</b>。注意，和部件一样，关节以名字为<b>唯一标识符</b>，不能与其他关节重名。</div></div></details><details class="notion-toggle notion-block-1caeb8d0aef0431ca088552091fb29ba"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-1caeb8d0aef0431ca088552091fb29ba" data-id="1caeb8d0aef0431ca088552091fb29ba"><span><div id="1caeb8d0aef0431ca088552091fb29ba" class="notion-header-anchor"></div><span class="notion-h-title"><b>父节点和子节点（</b>parent, child)</span></span></h4></summary><div><div class="notion-text notion-block-01584dd4ebc14c2a86230e2a06b169d8">为关节指定它连接的父子部件（这里体现了命名必须唯一，否则无法正确找到父子部件）：</div></div></details><details class="notion-toggle notion-block-f472ba7dcfda498f890b3dd12fcfebf8"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-f472ba7dcfda498f890b3dd12fcfebf8" data-id="f472ba7dcfda498f890b3dd12fcfebf8"><span><div id="f472ba7dcfda498f890b3dd12fcfebf8" class="notion-header-anchor"></div><span class="notion-h-title">类型（type）</span></span></h4></summary><div><div class="notion-text notion-block-217297b489f040359f9af4bb49550563">关节的类型，目前支持三种关节：</div><ul class="notion-list notion-list-disc notion-block-9f95977f6395478db39aaf9a3607c865"><li>转动关节（revolute）：部件间绕某轴相对转动</li></ul><ul class="notion-list notion-list-disc notion-block-4e56912c536f471caf45d0a227605416"><li>滑动关节（prismatic）：部件间沿某轴相对移动</li></ul><ul class="notion-list notion-list-disc notion-block-2f620d9f828f4ea19a7642a980692f0b"><li>固定关节（fixed）：固定两个部件的相对位置</li></ul><div class="notion-text notion-block-fbb83344f6ad4c5fbcd9029a66b78cb3">后文会分别说明这三种关节的用法。</div></div></details><details class="notion-toggle notion-block-9b02fca458e647f6afaef048acd3f864"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-9b02fca458e647f6afaef048acd3f864" data-id="9b02fca458e647f6afaef048acd3f864"><span><div id="9b02fca458e647f6afaef048acd3f864" class="notion-header-anchor"></div><span class="notion-h-title">关节偏移量</span></span></h4></summary><div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-99ca7f921bce4714859d258f2b8d18a3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:384px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A593837c9-f1d6-425c-8ec4-fee7364c36bd%3AUntitled.png?table=block&amp;id=99ca7f92-1bce-4714-859d-258f2b8d18a3&amp;t=99ca7f92-1bce-4714-859d-258f2b8d18a3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-c8c6331f374041828679127fee0cd8e6">joint相对于父link原点的位姿由origin_translation和origin_orientation两个偏移量定义。若两个都是[0,0,0]则link0和link1原点就会重合：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-70c761983f2341b6a3a8df869e0363f8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A9d7fc481-69c6-4885-9320-69c02147655d%3AUntitled.png?table=block&amp;id=70c76198-3f23-41b6-a3a8-df869e0363f8&amp;t=70c76198-3f23-41b6-a3a8-df869e0363f8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-3fb29c4465ff4685abe334678e6a7e12">此处我们可以看出，joint的位姿是相对于其父link原点的<b>相对坐标：</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-280855904f1b459d858294f0b1aa21ee"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6325dbdb-0e08-474f-82f7-00e9038d1f7b%3AUntitled.png?table=block&amp;id=28085590-4f1b-459d-8582-94f0b1aa21ee&amp;t=28085590-4f1b-459d-8582-94f0b1aa21ee" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-65dc837e4b4145dba62ecc53d3370d5f">这里joint2连接link1和link2。joint2的偏移量是</div></div></details><details class="notion-toggle notion-block-741dbf682e8f4d2dbf2f16e58d422c0a"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-741dbf682e8f4d2dbf2f16e58d422c0a" data-id="741dbf682e8f4d2dbf2f16e58d422c0a"><span><div id="741dbf682e8f4d2dbf2f16e58d422c0a" class="notion-header-anchor"></div><span class="notion-h-title">轴（axis）</span></span></h4></summary><div><div class="notion-text notion-block-41315d5c7e9748df926574611236edfc">分类讨论三种关节的轴：</div><div class="notion-text notion-block-e2859b93054e472ab3fde303ca0a7799">1 转动关节（revolute）</div><div class="notion-text notion-block-9ae5afe01c944249a595c8b067c3bb68">我们规定，一个转动关节只能绕其自身xyz轴的<b>某一个轴</b>旋转。&quot;axis&quot;定义为：</div><div class="notion-text notion-block-336c8e56ca5d40878c1894d17519e1d9">效果如下：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-7208e80950474b999c449458a675ca5e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ae4d30f72-f3e2-4642-99a7-1252b275eac1%3AUntitled.png?table=block&amp;id=7208e809-5047-4b99-9c44-9458a675ca5e&amp;t=7208e809-5047-4b99-9c44-9458a675ca5e" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d5539a088f72498ca6cd59d83f6383fc"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A959b64a9-9c5c-461b-95f1-0407a8cafec9%3AUntitled.png?table=block&amp;id=d5539a08-8f72-498c-a6cd-59d83f6383fc&amp;t=d5539a08-8f72-498c-a6cd-59d83f6383fc" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-fb823040b6c14199af5e932a600047f0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac4616137-9656-4d36-a9dc-60a8a13a3b8f%3AUntitled.png?table=block&amp;id=fb823040-b6c1-4199-af5e-932a600047f0&amp;t=fb823040-b6c1-4199-af5e-932a600047f0" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-80e6247710a44eb1854e6e5269cde102">2 滑动关节（prismatic）</div><div class="notion-text notion-block-e82ca1079fef483e8c1e89ab1a88fbde">同样，滑动关节也只能沿着xyz轴的<b>某一个轴平移。</b>&quot;axis&quot;定义为：</div><div class="notion-text notion-block-ebde32e342944b408475e0c179b524d1">例如下面为沿x轴运动的油缸，只允许关节在x方向移动。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1d2b54c56ded4111871a4e203bbb6e90"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A8590db92-8004-4aa3-b51c-45576a5a64da%3AUntitled.png?table=block&amp;id=1d2b54c5-6ded-4111-871a-4e203bbb6e90&amp;t=1d2b54c5-6ded-4111-871a-4e203bbb6e90" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-3aca72519fb543acb82fc262b643f85b">3 固定关节（fixed）</div><div class="notion-text notion-block-e81002344db9438fa6f5453e4e3f71a4">固定关节不需要定义轴，直接省略&quot;axis&quot;属性即可。</div><div class="notion-blank notion-block-28ca990e44ca4ce2911627c58672a12b"> </div></div></details><details class="notion-toggle notion-block-bbad69a1dd2e4c35be23a1d288a9613f"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-bbad69a1dd2e4c35be23a1d288a9613f" data-id="bbad69a1dd2e4c35be23a1d288a9613f"><span><div id="bbad69a1dd2e4c35be23a1d288a9613f" class="notion-header-anchor"></div><span class="notion-h-title">限位（limit）</span></span></h4></summary><div><div class="notion-text notion-block-3920cfcb8fbf46cdb0729796e0af1c32">现实中的机械结构不可能转动到任意角度或滑动到任意位置，例如人的胳膊弯曲的角度是有上下限的、液压油缸行程也是有上下限的。分类讨论三种关节的限位：</div><div class="notion-text notion-block-2eca468f16584018ab40c2741a9234a3">1 转动关节（revolute）</div><div class="notion-text notion-block-9f40a41c66c64b398bd0f81e335adb3a">定义转动关节旋转角度的上限&quot;lower&quot;和下限&quot;upper&quot;，都是弧度制的度数。例如最高向正方向转<code class="notion-inline-code">π/2</code> ，最低向负方向转<code class="notion-inline-code">π/2</code> .</div><div class="notion-text notion-block-b4f85de9204049739d4d594781a2852c">效果如下：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-55756263a47b48a18aaad0040b7a4759"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A087dc199-c251-4cb0-ba40-ee6c4e65c0de%3AUntitled.png?table=block&amp;id=55756263-a47b-48a1-8aaa-d0040b7a4759&amp;t=55756263-a47b-48a1-8aaa-d0040b7a4759" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-67a34826f97c497b89170d3dd45ed23c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad0854c75-38b7-405a-aec6-a158a2b34180%3AUntitled.png?table=block&amp;id=67a34826-f97c-497b-8917-0d3dd45ed23c&amp;t=67a34826-f97c-497b-8917-0d3dd45ed23c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-7948c909b8de4be0b8c60feaabff4b96">2 滑动关节（prismatic）</div><div class="notion-text notion-block-b5b99053ca294e29b6b536e63c1cff2f">定义滑动关节平移距离的上限&quot;lower&quot;和下限&quot;upper&quot;。例如最高向正方向移动2.0 ，最低向负方向转移动-2.0。</div><div class="notion-text notion-block-b07c13c32ea94af2a72047988792a1b6">效果如下：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-8d3118ae1101424db80f031b6e397900"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A85468664-514c-48e2-900c-1e7277d768a0%3AUntitled.png?table=block&amp;id=8d3118ae-1101-424d-b80f-031b6e397900&amp;t=8d3118ae-1101-424d-b80f-031b6e397900" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ae19b1fbfae74f9a8d95efc63aa458b6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:192px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A9ed15474-5202-4218-924a-18331e750810%3AUntitled.png?table=block&amp;id=ae19b1fb-fae7-4f9a-8d95-efc63aa458b6&amp;t=ae19b1fb-fae7-4f9a-8d95-efc63aa458b6" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-7b3355ed088241a6a5204966210c0570">3 固定关节（fixed）</div><div class="notion-text notion-block-c38da56816c14275888959f9586520fd">固定关节不需要定义限位，直接省略&quot;limit&quot;属性即可。</div></div></details><details class="notion-toggle notion-block-db3cb4bfb8664e779348724389d249b6"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-db3cb4bfb8664e779348724389d249b6" data-id="db3cb4bfb8664e779348724389d249b6"><span><div id="db3cb4bfb8664e779348724389d249b6" class="notion-header-anchor"></div><span class="notion-h-title">特殊情况：根部件</span></span></h4></summary><div><div class="notion-text notion-block-78132579cea948e9b8c24693f29288ed">每个部件都有其对应的关节，如上面的link1的关节是joint1.但是图中并未有link0所对应的关节，因为link0本身已经是根节点，没有父节点。</div><div class="notion-text notion-block-f5d5b5898d3c4790aba2d294008c2fc6">为link0定义一个抽象的父节点base_link。link0通过joint0和base_link连接。</div><div class="notion-text notion-block-e23bff07a5294452b35c4a8d589b9843">概念上可认为base_link绑定在场景的世界坐标的原点处。base_link是一个虚拟的概念，并不存在几何实体。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-a6c0bd32646544c389a1a6e6a0a881d2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:432px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af16cd9cc-e5a1-4448-bc87-cbaaf829ba79%3AUntitled.png?table=block&amp;id=a6c0bd32-6465-44c3-89a1-a6e6a0a881d2&amp;t=a6c0bd32-6465-44c3-89a1-a6e6a0a881d2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-b11b347607504fbc8af2f0e746dfb846">base_link只是抽象概念，不需要定义。</div><div class="notion-text notion-block-d2e7a45b862444f185078b4993dbd2a6">joint0定义为一个fixed关节，定义如下：</div><div class="notion-text notion-block-7365a1dc88b84e74ba8311e4f447c2d7">parent为base_link，系统就会认为这个joint为根节点的joint。</div><div class="notion-text notion-block-8d9e487497a7422899a1dfd0b28248ae">偏移量origin_translation和origin_orientation定义了joint0相对于base_link的偏移，而base_link是世界坐标的原点，因此我们通过这两个偏移量控制整个机器人的世界坐标。下面的例子中可滑动joint0的位置xyz转动xyz来查看改变机器人世界坐标的效果。</div></div></details><div class="notion-text notion-block-d0b81b5e36b34decbbde4d951b26f629">下面是转动关节的实例（轴为z轴，限位范围<code class="notion-inline-code">[π/2,π/2]</code>）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/single_revolute/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><div class="notion-text notion-block-d713049e39644e2d84fda3a5eb81166c">下面是滑动关节的实例（轴为x轴，限位范围<code class="notion-inline-code">[-2, 2]</code>）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/single_prismatic/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-9a5a7a8158c94acc8441f9c75ec8854b" data-id="9a5a7a8158c94acc8441f9c75ec8854b"><span><div id="9a5a7a8158c94acc8441f9c75ec8854b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9a5a7a8158c94acc8441f9c75ec8854b" title="2.3 完整的机器人描述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.3 完整的机器人描述</span></span></h3><div class="notion-text notion-block-86af7522521043f8b6ca2a833e3ab37d">有了机器人的<b>部件（link）</b>和<b>关节（joint）</b>，我们就能把他们组成一个完整的机器人了。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-1ad36b1e6576448680d44dba2b3d8375" data-id="1ad36b1e6576448680d44dba2b3d8375"><span><div id="1ad36b1e6576448680d44dba2b3d8375" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1ad36b1e6576448680d44dba2b3d8375" title="例子1：旋转部件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子1：旋转部件</span></span></h4><div class="notion-text notion-block-c8af210f8c5e404490decdc9d833b50f">下面是一个完整的机器人描述文件，有两个部件，一个旋转关节：</div><details class="notion-toggle notion-block-d3ca416eaa444f1fa5b079843810c158"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-d3ca416eaa444f1fa5b079843810c158" data-id="d3ca416eaa444f1fa5b079843810c158"><span><div id="d3ca416eaa444f1fa5b079843810c158" class="notion-header-anchor"></div><span class="notion-h-title">描述文件和运行效果</span></span></h4></summary><div><div class="notion-text notion-block-7e9801d93c9f4581899dde4d6c3252cb">下面是这个描述文件定义的机器人：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/single_revolute/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><div class="notion-text notion-block-b3c1e2d4f3ae491898c7256360ba4c38">可以看出，一个机器人文件是一个JSON对象，由一对{}包围，一共有四个属性：</div><ul class="notion-list notion-list-disc notion-block-823196c8b3124f0e8c15c34f3752b966"><li>名字（name）</li></ul><ul class="notion-list notion-list-disc notion-block-b83457168e2a4d1381ecbbb313045f72"><li>部件（links）</li></ul><ul class="notion-list notion-list-disc notion-block-51cc3ee429414e8f99aac437393ad0fb"><li>关节（joints）</li></ul><ul class="notion-list notion-list-disc notion-block-55d033ac70b24febbd947f27523b7713"><li>约束（constraints）</li></ul><div class="notion-text notion-block-ca8f058042954de489ddcf80353498dd">下面解释这个对象的各个属性。</div></div></details><details class="notion-toggle notion-block-6080f43630ab425fac12c86442e4bb02"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-6080f43630ab425fac12c86442e4bb02" data-id="6080f43630ab425fac12c86442e4bb02"><span><div id="6080f43630ab425fac12c86442e4bb02" class="notion-header-anchor"></div><span class="notion-h-title"><b>名字（name）</b></span></span></h4></summary><div><div class="notion-text notion-block-4d84ec5278ee452ca5b301c17da0d52e">首先为这个机器人定义<b>名字（name）</b></div><div class="notion-blank notion-block-e4dfdb8d51fc4c35a32c97a4f31466e4"> </div></div></details><details class="notion-toggle notion-block-081c7de2858e4735b96df5e80c1b25a8"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-081c7de2858e4735b96df5e80c1b25a8" data-id="081c7de2858e4735b96df5e80c1b25a8"><span><div id="081c7de2858e4735b96df5e80c1b25a8" class="notion-header-anchor"></div><span class="notion-h-title">部件（links）</span></span></h4></summary><div><div class="notion-text notion-block-23d7abe8d23649ec8aa15ebf94696355">是一个数组，保存了机器人的所有部件。这里我们有两个，link0和link1</div><div class="notion-blank notion-block-514a152d9a654b57ad177b767c5fffb8"> </div></div></details><details class="notion-toggle notion-block-20641148cd7c4d869521f991aec9733c"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-20641148cd7c4d869521f991aec9733c" data-id="20641148cd7c4d869521f991aec9733c"><span><div id="20641148cd7c4d869521f991aec9733c" class="notion-header-anchor"></div><span class="notion-h-title">关节（joints）</span></span></h4></summary><div><div class="notion-text notion-block-462adae6f49d42b0a9004543e9156f01">是一个数组，保存了机器人的所有关节。这里我们有两个：连接base_link和link0的joint0，连接link0和link的joint1：</div><div class="notion-blank notion-block-8dc598f57d554ceba56092ad2752fb4b"> </div></div></details><details class="notion-toggle notion-block-40d844d5c78c4c198118114f3fa3180d"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-40d844d5c78c4c198118114f3fa3180d" data-id="40d844d5c78c4c198118114f3fa3180d"><span><div id="40d844d5c78c4c198118114f3fa3180d" class="notion-header-anchor"></div><span class="notion-h-title">约束（constraints）</span></span></h4></summary><div><div class="notion-text notion-block-3772b26552c44e1ba4ea90fdf7dd0d01">是一个数组，保存了机器人的所有约束。这里暂时为空，第四节会具体介绍。</div></div></details><div class="notion-blank notion-block-1c1098e4c54b495d82716ca44f13c3ee"> </div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-7d719d0a429745a996616aca3d3a0320" data-id="7d719d0a429745a996616aca3d3a0320"><span><div id="7d719d0a429745a996616aca3d3a0320" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7d719d0a429745a996616aca3d3a0320" title="例子2：滑动部件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子2：滑动部件</span></span></h4><div class="notion-text notion-block-c6ccd860606f4617a35e8796308a049d">下面是一个完整的机器人描述文件，有两个部件，一个滑动关节：</div><details class="notion-toggle notion-block-c6e441c9c4ae45599a1f2e2d8c0dcaa1"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-c6e441c9c4ae45599a1f2e2d8c0dcaa1" data-id="c6e441c9c4ae45599a1f2e2d8c0dcaa1"><span><div id="c6e441c9c4ae45599a1f2e2d8c0dcaa1" class="notion-header-anchor"></div><span class="notion-h-title">描述文件和运行效果</span></span></h4></summary><div><div class="notion-text notion-block-9d7a4ba48c3e45caa4fefffe5c7067c4">下面是这个描述文件定义的机器人：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/single_prismatic/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure></div></details><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-8ff287a098564b6fb1d3a16c75dbdd29" data-id="8ff287a098564b6fb1d3a16c75dbdd29"><span><div id="8ff287a098564b6fb1d3a16c75dbdd29" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8ff287a098564b6fb1d3a16c75dbdd29" title="例子3：自己尝试编写一个描述文件😃"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">例子3：自己尝试编写一个描述文件😃</span></span></h4><div class="notion-text notion-block-b469f0c2578f4061a9f884cc83024729">这里有一个可以自己上传机器人描述文件（.json格式）的在线程序：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:320px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/customise/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><div class="notion-text notion-block-d582f2c6ced94d4986e5496b49b78157">把上面两个例子的机器人描述保存为一个本地的.json文本文件。点击左上角按钮，上传这个文件看看效果。然后尝试自己修改.json里的部件、关节参数，加入新的部件、关节，上传查看效果。（暂不支持外部链接obj模型）。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-02bef8deb61646cb8ea7bffd39771f65" data-id="02bef8deb61646cb8ea7bffd39771f65"><span><div id="02bef8deb61646cb8ea7bffd39771f65" class="notion-header-anchor"></div><a class="notion-hash-link" href="#02bef8deb61646cb8ea7bffd39771f65" title="3 正向运动学*"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3 正向运动学*</span></span></h2><div class="notion-text notion-block-c4bb3d5ffa6c4e8d8098653d564a9a29">todo</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b1dc0af69d2248d5b5843f97bf72933a" data-id="b1dc0af69d2248d5b5843f97bf72933a"><span><div id="b1dc0af69d2248d5b5843f97bf72933a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b1dc0af69d2248d5b5843f97bf72933a" title="4 闭环结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4 闭环结构</span></span></h2><div class="notion-text notion-block-443d5357e4934e45ab0a9994d18f44c8">前面讨论的都是开链接机器人，接下来讨论带闭环结构的闭链机器人。</div><div class="notion-text notion-block-70a9f13436724de28f3c9e1495500dc5">这里暂时只讨论带有油缸结构的“三角闭环”。如下图起重机。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9a3dd8c77d554df0a4a115ca3bf65f11"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:336px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ad70bf540-b2a8-45fb-a056-c00ef8cd022b%3AUntitled.png?table=block&amp;id=9a3dd8c7-7d55-4df0-a4a1-15ca3bf65f11&amp;t=9a3dd8c7-7d55-4df0-a4a1-15ca3bf65f11" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-6966d696980c4cc1bbe7df772f5b2717">分析这个三角闭环结构的拓扑结构：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-febe870f86c04bf78d70308dc07a27a3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:384px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac31f2d74-1ff9-4df7-9bcb-721cd60580d8%3AUntitled.png?table=block&amp;id=febe870f-86c0-4bf7-8d70-308dc07a27a3&amp;t=febe870f-86c0-4bf7-8d70-308dc07a27a3" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-7d3adb7aabea439a8c43e7aac34f2d1e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:384px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6b68e266-196e-45f3-b167-b65a9e74a1c5%3AUntitled.png?table=block&amp;id=7d3adb7a-abea-439a-8c43-e7aac34f2d1e&amp;t=7d3adb7a-abea-439a-8c43-e7aac34f2d1e" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-33e757e342a2418ebabcf2e64c3e631d">下面为实例，拖动constraint0的length来伸缩油缸。</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:333px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/demos/constraint/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure><div class="notion-text notion-block-0be9063886d3449bbe0a2bdb3bb57783">我们把构成这一整个三角形闭环的<b>部件和关节</b>统称为一个约束（constraint）。</div><div class="notion-text notion-block-ca0f63884e124e238ff1a9db97608e2b">这个约束里包括部件：</div><ul class="notion-list notion-list-disc notion-block-d4347ecf4a4044b5b3d3a46751a58f89"><li>基座部件lifting_base</li></ul><ul class="notion-list notion-list-disc notion-block-28793b0cb13945ef9a825abc2176d8c0"><li>悬臂arm</li></ul><ul class="notion-list notion-list-disc notion-block-3d9a0bcfcde241cabf034fcd47e66e43"><li>油缸的活塞杆piston_rod</li></ul><ul class="notion-list notion-list-disc notion-block-fc88b1363a344e25b9d0e7803a4baa8d"><li>油缸的肛管cylinder_tube</li></ul><div class="notion-text notion-block-ce1ada9bb21a4689a5dc815728c73e1a">关节：</div><ul class="notion-list notion-list-disc notion-block-a2df1b449cbb4b1087162228ca0c8641"><li>连接lifting_base和arm的<b>关节L</b></li></ul><ul class="notion-list notion-list-disc notion-block-ceff9a36c79d48709cecbda7bf942a59"><li>连接lifting_base和cylinder_tube的<b>关节A</b></li></ul><ul class="notion-list notion-list-disc notion-block-07e904447a714701a83c839cfbfdb313"><li>连接arm和piston_rod的<b>关节B</b></li></ul><div class="notion-text notion-block-cee72f0c60f349249df1967b06982b98">这些约束和关节的定义和之前的格式一样。我们描述一个约束只需要指定这三个关节<b>L、A、B</b>即可。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-33a5d625ba54428a91ffb5f5e02853a9" data-id="33a5d625ba54428a91ffb5f5e02853a9"><span><div id="33a5d625ba54428a91ffb5f5e02853a9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33a5d625ba54428a91ffb5f5e02853a9" title="4.1 三角闭环结构描述格式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.1 三角闭环结构描述格式</span></span></h3><details class="notion-toggle notion-block-39c0c9ce3ef0401797c07a3e61c795b4"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-39c0c9ce3ef0401797c07a3e61c795b4" data-id="39c0c9ce3ef0401797c07a3e61c795b4"><span><div id="39c0c9ce3ef0401797c07a3e61c795b4" class="notion-header-anchor"></div><span class="notion-h-title">约束描述</span></span></h4></summary><div><div class="notion-text notion-block-2776b06d16c34cd28d647279d4fd93f7">下面是对这种三角形约束的描述格式：</div><ul class="notion-list notion-list-disc notion-block-1d939719f9544860875f5d6eeef738f1"><li>名字（name）：这个约束的名字，不能和其他约束重名</li></ul><ul class="notion-list notion-list-disc notion-block-49316bd6f51c456e83f6a5132206113a"><li>类型（type）：目前只有这一种约束，写triangle-prismatic即可</li></ul><ul class="notion-list notion-list-disc notion-block-47b3c45d28004531be0a9d4a1303bb65"><li>jointL</li></ul><ul class="notion-list notion-list-disc notion-block-ab048efb4421406cbe5534bddbeb85fc"><li>jointA</li></ul><ul class="notion-list notion-list-disc notion-block-30e268e749e140e79f8950a4ffc6a385"><li>jointB</li></ul><ul class="notion-list notion-list-disc notion-block-182b000fb09e4a3091f9c686f213e5e5"><li>初始长度（length）：如下图，jointA到jointB的初始长度，即油缸两端的初始距离</li></ul><ul class="notion-list notion-list-disc notion-block-32fb58e989174a52bbd70bf589a6ca83"><li>限位（limit）：油缸两端距离的最大最小值。</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0c50de64accc47ca90ef1614daf27c7d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A23d370e9-037f-4889-96c1-8b1343125914%3AUntitled.png?table=block&amp;id=0c50de64-accc-47ca-90ef-1614daf27c7d&amp;t=0c50de64-accc-47ca-90ef-1614daf27c7d" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-3d2bcb9bb95340ebbf373f280a27f88f"> </div></div></details><details class="notion-toggle notion-block-beb3d0c98b7f4955a240e50cabfc7a76"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-beb3d0c98b7f4955a240e50cabfc7a76" data-id="beb3d0c98b7f4955a240e50cabfc7a76"><span><div id="beb3d0c98b7f4955a240e50cabfc7a76" class="notion-header-anchor"></div><span class="notion-h-title">完整的机器人描述文件</span></span></h4></summary><div><div class="notion-text notion-block-8e890b38687846988bb1284bccd47e45">对比观察场景和描述文件中的部件和关节描述信息。</div></div></details><details class="notion-toggle notion-block-e781aa47214140bb90e245f60ca4a80e"><summary><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-e781aa47214140bb90e245f60ca4a80e" data-id="e781aa47214140bb90e245f60ca4a80e"><span><div id="e781aa47214140bb90e245f60ca4a80e" class="notion-header-anchor"></div><span class="notion-h-title">有多个约束的复杂例子</span></span></h4></summary><div><figure class="notion-asset-wrapper notion-asset-wrapper-embed"><div style="height:366px;position:relative"><iframe class="notion-asset-object-fit" src="https://simdemos.housz.cn/robot/index.html" title="iframe embed" frameBorder="0" loading="lazy" scrolling="auto" allowfullscreen=""></iframe></div></figure></div></details><div class="notion-blank notion-block-37b8c168519e4d6482e86b39a0a4b416"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-0197ec4678fe42f19c53fc0850a14ac7" data-id="0197ec4678fe42f19c53fc0850a14ac7"><span><div id="0197ec4678fe42f19c53fc0850a14ac7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0197ec4678fe42f19c53fc0850a14ac7" title="4.2 三角闭环约束求解*"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.2 三角闭环约束求解*</span></span></h3><div class="notion-text notion-block-f0a15370861443d0b815a435a13267d4">todo</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-0c54050bf8254882956a4e0db66e8cb6" data-id="0c54050bf8254882956a4e0db66e8cb6"><span><div id="0c54050bf8254882956a4e0db66e8cb6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0c54050bf8254882956a4e0db66e8cb6" title="5 逆向运动学*"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><s>5 逆向运动学*</s></span></span></h2><div class="notion-text notion-block-9aca751975a74e6e9740e79d35949bad">todo</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-02ca162e5a754b9699b89d7becc83391" data-id="02ca162e5a754b9699b89d7becc83391"><span><div id="02ca162e5a754b9699b89d7becc83391" class="notion-header-anchor"></div><a class="notion-hash-link" href="#02ca162e5a754b9699b89d7becc83391" title="5.0 逆向运动学原理*"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><s>5.0 逆向运动学原理*</s></span></span></h3><div class="notion-text notion-block-a17c6af83ea0459aa61423abc657b21c">todo</div><div class="notion-text notion-block-cda8ebe318664571a5ca0e984187e34e">解析法</div><div class="notion-text notion-block-f56f971ce07949698b5b31ed2c1fb63c">数值法</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2932f50cb64a44218819c25413896ad2" data-id="2932f50cb64a44218819c25413896ad2"><span><div id="2932f50cb64a44218819c25413896ad2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2932f50cb64a44218819c25413896ad2" title="5.1 解析法求解*"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><s>5.1 解析法求解*</s></span></span></h3><div class="notion-text notion-block-babfe296f7d64fa788987bc3aefd04ab">todo</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[微分算子及其离散化4：拉普拉斯]]></title>
            <link>https://www.housz.cn/article/grad-div-curl-laplace-3</link>
            <guid>https://www.housz.cn/article/grad-div-curl-laplace-3</guid>
            <pubDate>Sat, 15 Jun 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-04aed9df419b469cb34a5160d0af75d5"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-7b18bafd71fd4a029c002fece8a89934" data-id="7b18bafd71fd4a029c002fece8a89934"><span><div id="7b18bafd71fd4a029c002fece8a89934" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7b18bafd71fd4a029c002fece8a89934" title="4 拉普拉斯 Laplace , , "><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4 拉普拉斯 Laplace <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>, <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>, <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-80f6a206566e4938990491961bee3ddb" data-id="80f6a206566e4938990491961bee3ddb"><span><div id="80f6a206566e4938990491961bee3ddb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#80f6a206566e4938990491961bee3ddb" title="定义"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">定义</span></span></h3><div class="notion-text notion-block-60cf79b5ae3041fb87a278fb5ffe6170">三维空间拉普拉斯算子 Laplace（三种写法：<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span> 或 <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span> 或 <span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>）定义：</div><span role="button" tabindex="0" class="notion-equation notion-equation-block"><span></span></span><div class="notion-text notion-block-fd50eba703a34dfcb62640bed03cba4c">作用于标量函数<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>：</div><span role="button" tabindex="0" class="notion-equation notion-equation-block"><span></span></span><div class="notion-text notion-block-de22bfdd543a434f9166b5700ef29f8b">可看作由梯度算子<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>和散度算子<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span> 复合而成。首先对<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>求梯度：</div><span role="button" tabindex="0" class="notion-equation notion-equation-block"><span></span></span><div class="notion-text notion-block-264144388ddc4299b8d597af4459d904">再对梯度求散度：</div><span role="button" tabindex="0" class="notion-equation notion-equation-block"><span></span></span><div class="notion-text notion-block-c21e859985f44e8fbefb8f7cc14cfd05">拉普拉斯即：标量场梯度的散度。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-500930a8b15a4bc888a057058cab029d" data-id="500930a8b15a4bc888a057058cab029d"><span><div id="500930a8b15a4bc888a057058cab029d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#500930a8b15a4bc888a057058cab029d" title="直观理解"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">直观理解</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29eaa9d0b70b4dcdab127baf4855b43c" data-id="29eaa9d0b70b4dcdab127baf4855b43c"><span><div id="29eaa9d0b70b4dcdab127baf4855b43c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29eaa9d0b70b4dcdab127baf4855b43c" title="函数的“弯曲程度”。"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">函数的“弯曲程度”。</span></span></h4><div class="notion-text notion-block-308155b8ba2d4fb199cc79a635ef13a0">现在有两个一维函数<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（图中蓝色）和<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（图中红色）。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-f07adb8873a14816a648030da7c56f78"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:384px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4740f2fe-4950-4d7a-87a6-65bbbae93647%3AUntitled.png?table=block&amp;id=f07adb88-73a1-4816-a648-030da7c56f78&amp;t=f07adb88-73a1-4816-a648-030da7c56f78" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-f8aa9b1cee5f4c99b9aee75db9b6a1df">观察在<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>附近的函数“弯曲程度”，显然红色更弯曲。</div><div class="notion-text notion-block-84cf6af673e741a48180cc02bcbfba48">这里说的某点更弯曲，可以认为是周围邻居的值和该点取值有更大的差异。如考虑<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>的两个邻居<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>和<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>处，红色平均取值为2，平均取值和<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>处差异为2；对于蓝色，平均取值和<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>处差异为1.</div><div class="notion-text notion-block-50aad7bf32b44ef9a81fc3aff7667273">定量衡量所谓“弯曲程度”的方法最简单的就是二阶导数<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>。</div><span role="button" tabindex="0" class="notion-equation notion-equation-block"><span></span></span><div class="notion-text notion-block-bf8806a8993346b29dc09dae6409ab0b">显然在<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>处<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>的二阶导更大，也更“弯曲”。</div><div class="notion-text notion-block-5c1e6d4c9fcc4c9ba5509d86345ba556">一维函数的二阶导给了一种定量描述方案。自然地推广到高维，把多维函数每个分量的二阶导数相加，用来衡量函数的“弯曲程度”。</div><div class="notion-text notion-block-9d2c42af31674eb4a1e8c87d24384c8b">例如二维函数<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（图中蓝色）和<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（图中红色）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ee34d8472b674c3a84d486463bcbce86"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Adac9a3e0-1e80-4ad9-8d77-88ad08362c9f%3AUntitled.png?table=block&amp;id=ee34d847-2b67-4c3a-84d4-86463bcbce86&amp;t=ee34d847-2b67-4c3a-84d4-86463bcbce86" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-695c8f0ce6f7474bb5c89deba1369afe">显然对于（0，0）点处，红色弯曲程度更大。<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>，<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-860844fc59ff4fb396eddc25b2dcfba1" data-id="860844fc59ff4fb396eddc25b2dcfba1"><span><div id="860844fc59ff4fb396eddc25b2dcfba1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#860844fc59ff4fb396eddc25b2dcfba1" title="梯度的散度"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">梯度的散度</span></span></h4><div class="notion-text notion-block-914077c50a3049ce950d7b6790910fe0">由微分算子的定义，我们知道拉普拉斯的作用是得到标量场<b>梯度的散度</b>。</div><div class="notion-text notion-block-fe81e1a618664f04a9dbcd54259838ff">函数值域某点的<b>梯度</b><span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>是一个向量，<b>方向</b>是该点函数增长最快的方向，<b>大小(模长)</b>是增长的速率。梯度的每个分量（<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>）都是一个标量，分别表示沿着坐标轴（x、y、z）的变化率。取值为正则沿着坐标轴正方向增长，取值为负则沿着坐标轴负方向增长。</div><div class="notion-blank notion-block-e32c92ae8c2248c8bc42a34d40751e80"> </div><div class="notion-text notion-block-6430aa7278354912bcdbb002b3cccf37">例如函数<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>在(1,0)处的梯度为<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>，在值域xy平面上画出：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9a6711e96f10456f9675dd3b77a13870"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6325ffc5-07a3-4fc3-8680-c7b86c7d1857%3AUntitled.png?table=block&amp;id=9a6711e9-6f10-456f-9675-dd3b77a13870&amp;t=9a6711e9-6f10-456f-9675-dd3b77a13870" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-d0dfd2db98004295b6540ce46734eb95">考虑（0，0）周围间距为1的格子区域（图中方框代表区域边界）。</div><div class="notion-text notion-block-4e64343bfc32494caaaf7c96e9450136">黑色箭头表示的梯度指向方框外部，说明(1,0)点有向区域外增长的“趋势”。把梯度向坐标轴投影，可以看出只有垂直区域边界的分量<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（蓝色）对这种往外扩张的趋势有贡献。</div><div class="notion-text notion-block-1f8df323c25849c08349ed3810827837">我们把函数<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（蓝色）和<span role="button" tabindex="0" class="notion-equation notion-equation-inline"><span></span></span>（红色）的梯度在区域边界同样标出：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9f4fc6fef88f4546b9fe93cac70e9f2c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ae372bc85-adfd-4462-9df9-6df7d2a9a749%3AUntitled.png?table=block&amp;id=9f4fc6fe-f88f-4546-b9fe-93cac70e9f2c&amp;t=9f4fc6fe-f88f-4546-b9fe-93cac70e9f2c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-12e3134b447742d391fb9049213d8450">直观看出红色比蓝色的扩张更强，这也正符合图像中红色函数“弯曲程度”更大。如何定量衡量向量场中某点的“扩张程度”，或“扩散趋势”大小？向量场的<b>散度</b>正符合这种需求。因此对标量函数的梯度场求散度的物理意义就是衡量其各点的“弯曲程度”。</div><div class="notion-text notion-block-46fa1c124b9f4f608a7a26e2c875feed">对上图中梯度场做有限差分，以红色为例：（右边界值-左边界值）/ 左右差分距离 + （上边界值-下边界值）/ 上下差分距离 = (4-(-4))/2+(4-(-4))/2 = 8.</div><div class="notion-text notion-block-5eeec9097236491fb51876e4a56c55f1">更直观地，一维度函数梯度的散度：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-15b228e5fc3f4640b1d3b73d7bf2836e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:336px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ae9e367af-f4e4-4254-8bba-082344f6dad1%3AUntitled.png?table=block&amp;id=15b228e5-fc3f-4640-b1d3-b73d7bf2836e&amp;t=15b228e5-fc3f-4640-b1d3-b73d7bf2836e" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-f9c6bc3c1a2f48b8a064e07b1776f14b">考虑x=0左右邻居格子。红色函数梯度的散度为(4-(-4))/2=4.</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-844b808c78844eefb937ada0be0118e2" data-id="844b808c78844eefb937ada0be0118e2"><span><div id="844b808c78844eefb937ada0be0118e2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#844b808c78844eefb937ada0be0118e2" title="加权平均"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">加权平均</span></span></h4><div class="notion-text notion-block-8ca0c4b7d2c84d45a024d4f40463b5c7">再</div><div class="notion-blank notion-block-5ef2b1aeeca94851b805c3e65975d93c"> </div><div class="notion-blank notion-block-cd58243499df4723b445ab5bb0bd5b5c"> </div><div class="notion-blank notion-block-4e6d2d0cceb746cebb1c787cac8e1460"> </div><div class="notion-text notion-block-bae8dc40db614034b40e29eed87902f1">调和函数</div><div class="notion-blank notion-block-e57ae53874b347649c237b51a899446c"> </div><div class="notion-blank notion-block-b17e10d7a9854dd1b127b619623aece4"> </div><div class="notion-text notion-block-fcd54958f49b4c6ba72870aa57080e65">举例：热传导方程</div><div class="notion-blank notion-block-d9c7fcee16bd42418db541e4a5abdfeb"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>