<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>竞速机器人 | 个人主页</title><link>https://lxk-221.github.io/zh/tags/%E7%AB%9E%E9%80%9F%E6%9C%BA%E5%99%A8%E4%BA%BA/</link><atom:link href="https://lxk-221.github.io/zh/tags/%E7%AB%9E%E9%80%9F%E6%9C%BA%E5%99%A8%E4%BA%BA/index.xml" rel="self" type="application/rss+xml"/><description>竞速机器人</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>zh-Hans</language><lastBuildDate>Fri, 01 Sep 2023 00:00:00 +0000</lastBuildDate><image><url>https://lxk-221.github.io/media/icon_hu68170e94a17a2a43d6dcb45cf0e8e589_3079_512x512_fill_lanczos_center_3.png</url><title>竞速机器人</title><link>https://lxk-221.github.io/zh/tags/%E7%AB%9E%E9%80%9F%E6%9C%BA%E5%99%A8%E4%BA%BA/</link></image><item><title>竞速机器人</title><link>https://lxk-221.github.io/zh/project/005.racing-robot/</link><pubDate>Fri, 01 Sep 2023 00:00:00 +0000</pubDate><guid>https://lxk-221.github.io/zh/project/005.racing-robot/</guid><description>&lt;h2 id="概述">概述&lt;/h2>
&lt;p>本项目旨在参加机器人竞速比赛。在比赛中，机器人需要尽可能快地完成赛道并击中终点目标，同时不能进入黑色区域。
机器人要求使用人形机器人，配备由三个麦克纳姆轮组成的全向底盘，以及背包上的网络摄像头。所有程序都在背包中的树莓派4B上运行。&lt;/p>
&lt;p>在这个项目中，我负责仿真、视觉和控制算法。我在V-REP模拟器中建立了仿真环境，测试了基于边缘检测的赛道检测方法，并使用基于视觉的PD控制来控制底盘。此外，由于机器人在起点处被随机放置方向，我们使用Keras和TensorFlow来解决分类问题并使机器人朝向正确方向。&lt;/p>
&lt;h2 id="仿真">仿真&lt;/h2>
&lt;p>我们首先在V-REP中建立仿真环境来测试我们的算法，我们使用V-REP的远程Python API从虚拟相机获取仿真数据，并根据我们的算法控制机器人的电机。我们测试了真实网络摄像头的视场角，以确保虚拟相机具有与真实相机类似的参数。&lt;/p>
&lt;h2 id="真实机器人">真实机器人&lt;/h2>
&lt;p>网络摄像头的原始位置太高，无法获得机器人前方地面的足够信息。因此，我们使用3D打印机制作了一个可调角度的相机支架，使其能够向下倾斜以俯视地面。为了增加轮子的摩擦力，我们尝试了新材料来制作轮胎，并在真实机器人上进行了一些测试。&lt;/p>
&lt;h2 id="测试视频">测试视频&lt;/h2>
&lt;p>这个视频展示了比赛的整个过程。正如我们所见，机器人以不同的方向开始，然后根据网络摄像头的图像将指令分类为左转、右转和前进三类。对于左转或右转指令，机器人以特定角度左转或右转。对于前进指令，机器人开始使用基于边缘检测的PD控制来控制底盘。即使面对伪装图案，视觉算法也能保持稳健。最后，机器人使用基于圆弧检测的方法来估计与目标的距离，并在调整方向的同时减速。&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/cpf3xdfruAY?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"
>&lt;/iframe>
&lt;/div>
&lt;!--
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/L-4Lpmt8hqk?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"
>&lt;/iframe>
&lt;/div>
--></description></item></channel></rss>