零落 发表于 2021-2-5 10:43:28

【Roban教程】机器人上楼梯实践

本帖最后由 零落 于 2021-2-5 10:45 编辑 <br /><br /><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">在介绍实例之前,先简单介绍一下贝塞尔曲线,贝塞尔曲线的应用得益于法国工程</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);">师贝塞尔,该曲线并不是他提出,但他在车体工业上的大力推广并应用这种曲线,因此以他的名字命名。利用这种方法可以通过很少的控制点,去生成复杂的平滑曲线,因此在生成曲线之前,首先需要选取好控制点。腿足式机器人相比于轮式机器人最大的优势就是能适应复杂的地形。本小节主要介绍一个机器人上楼梯的实例,其中轨迹规划部分利用到了贝塞尔曲线 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(45, 45, 45);">,主要</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);">分为四个阶段的运动。</span></span><span style=";font-size:13px;font-family:HiddenHorzOCR;color:rgb(11,11,11)"> </span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);"></span></span></p><section style="border-bottom: 1px solid #ddd;margin: 0 auto 10px;"><p class="135brush" data-brushtype="text" style="padding: 0px 5px 6px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(239, 112, 96); display: inline-block; margin: 0px 0px -1px; font-weight: normal; line-height: 1.1; font-size: 18px;"><span style="font-family: 微软雅黑, Microsoft YaHei;"><strong>一、第一阶段</strong></span></p></section><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);">这里我们选取右脚先迈上台阶</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(45, 45, 45);">,在第一</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);">阶段</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(45, 45, 45);">,重</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);">心需要向左侧移动,待重心投影移</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">至左脚支撑区,右脚迈上台阶。在此期间,重心仅仅只在 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">X-Y </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">平面移动,见重心轨迹图</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">中的 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">A-B-C,&nbsp;</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">右脚在 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">X-Z </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">平面移动。 </span></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(11, 11, 11);"></span><br/></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="color: rgb(0, 112, 192);"><strong><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei;">图1</span></strong></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">&nbsp; 上楼梯第一阶段示意图<br/></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span></span></p><section style="border-bottom: 1px solid #ddd;margin: 0 auto 10px;"><p class="135brush" data-brushtype="text" style="padding: 0px 5px 6px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(239, 112, 96); display: inline-block; margin: 0px 0px -1px; font-weight: normal; line-height: 1.1; font-size: 18px;"><strong><span style="font-family: 微软雅黑, Microsoft YaHei;">二、第二阶段</span></strong></p></section><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);">在第二阶段,需要将重心转移至右脚上方,因此重心在 X-Y-Z 三个平面都有运动,见</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(28, 28, 28);">重心轨迹图中的 C-D-E,待重心转移至右脚上方后,左脚开始运动,此时左脚并没有规划</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);">相应的轨迹,而是绕着脚尖旋转 30 度,这样是为了避免后续左脚在运动时与台阶触碰。</span></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span><br/></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="color: rgb(0, 112, 192);"><strong><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei;">图2</span></strong></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">&nbsp; 上楼梯第二阶段示意图</span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span></span></p><section style="border-bottom: 1px solid #ddd;margin: 0 auto 10px;"><p class="135brush" data-brushtype="text" style="padding: 0px 5px 6px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(239, 112, 96); display: inline-block; margin: 0px 0px -1px; font-weight: normal; line-height: 1.1; font-size: 18px;"><strong><span style="font-family: 微软雅黑, Microsoft YaHei;">三、第三阶段</span></strong></p></section><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">在第三阶段,重心继续在 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">Y-Z </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">平面移动,见重心轨迹图中的 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">E-F-G, </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);">左脚沿着规划</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);">好的贝塞尔曲线运动,并站上台阶,左脚的运动分为两部分,一个是沿着贝塞尔曲线运动,另一个是将上一个阶段旋转的</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);">30</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);">度恢复至脚平行于地面,最终左脚站上台阶。</span></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"></span><br/></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><strong><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px; color: rgb(0, 112, 192);">图3</span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);">&nbsp;</span></strong><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"> 上楼梯第三阶段示意图<br/></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span></span></p><section style="border-bottom: 1px solid #ddd;margin: 0 auto 10px;"><p class="135brush" data-brushtype="text" style="padding: 0px 5px 6px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(239, 112, 96); display: inline-block; margin: 0px 0px -1px; font-weight: normal; line-height: 1.1; font-size: 18px;"><span style="font-family: 微软雅黑, Microsoft YaHei;"><strong>四、第四阶段</strong></span></p></section><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(7, 7, 7);">此阶段重心恢复至两脚之间,见重心轨迹图中的 </span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(7, 7, 7);">G-H,</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(7, 7, 7);">至此上完一</span><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(23, 23, 23);">步台阶。</span></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(9, 9, 9);"></span><br/></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(23, 23, 23);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(23, 23, 23);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(23, 23, 23);"></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="color: rgb(0, 112, 192);"><strong><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei;">图4</span></strong></span><span style="font-size: 14px; font-family: 微软雅黑, Microsoft YaHei; color: rgb(23, 23, 23);">&nbsp; 上楼梯第四阶段示意图</span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(23, 23, 23);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: left;"><span style="color: rgb(23, 23, 23); font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;">整个过程重心的控制点曲线如下:</span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="color: rgb(23, 23, 23); font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="color: rgb(0, 112, 192);"><strong><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;">图5&nbsp; </span></strong></span><span style="color: rgb(23, 23, 23); font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;">重心轨迹图<br/></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="color: rgb(23, 23, 23); font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><br/></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style="color: rgb(17, 18, 18); font-size: 14px; font-family: 微软雅黑, Microsoft YaHei;">实际仿真过程中运行三步的重心轨迹:</span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="color: rgb(0, 112, 192);"><strong><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;">图6&nbsp; </span></strong></span><span style="color: rgb(23, 23, 23); font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;">仿真重心轨迹图</span><span style=";font-size:12px;font-family:HiddenHorzOCR;color:rgb(23,23,23)"><br/></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em; text-align: center;"><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 14px;"><span style="font-family: 微软雅黑, Microsoft YaHei; color: rgb(27, 27, 27);"><br/></span></span></p><p style="margin-top: 15px; margin-bottom: 15px; line-height: 1.75em;"><span style=";font-size:12px;font-family:HiddenHorzOCR;color:rgb(27,27,27)"><br/></span></p><link rel="stylesheet" href="//bbs.lejurobot.com/source/plugin/wcn_editor/public/wcn_editor_fit.css?v134_iSW" id="wcn_editor_css"/>

王麒麟 发表于 2021-2-7 10:16:59

跟不上这个节奏哟

零落 发表于 2021-2-7 16:24:20

王麒麟 发表于 2021-2-7 10:16
跟不上这个节奏哟

跟得上哦~可以关注官方微信公众号《乐聚机器人》,了解产品展示。

王麒麟 发表于 2021-2-24 14:42:16

零落 发表于 2021-2-7 16:24
跟得上哦~可以关注官方微信公众号《乐聚机器人》,了解产品展示。

有点难得嘛

Tsca 发表于 2021-11-17 22:38:13

请问这些c++代码怎么运行呢?比赛和开源代码提供的都是python的运行过程和代码,c++代码怎么应用呢?
页: [1]
查看完整版本: 【Roban教程】机器人上楼梯实践