u1jodi1q 发表于 2024-10-10 16:11:54

Micro-ROS:把ROS2放在MCU上


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">针对</span><span style="color: black;">熟练</span><span style="color: black;">设备</span>人应用的读者,ROS想必定是不会陌生的。ROS<span style="color: black;">能够</span>说是<span style="color: black;">日前</span><span style="color: black;">设备</span>人<span style="color: black;">关联</span>开源社区最流行的项目。每一种类型的<span style="color: black;">设备</span>人都需要以硬件的<span style="color: black;">实质</span><span style="color: black;">状况</span>编写符合用户需要的功能,起初代码的复用率很低,大大阻碍了<span style="color: black;">设备</span>人的发展。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">ROS便是为<span style="color: black;">设备</span>人在<span style="color: black;">开发</span>的过程中的代码复用<span style="color: black;">供给</span>支持的开源框架,<span style="color: black;">海量</span>的<span style="color: black;">设备</span>人开源项目,从感知到<span style="color: black;">掌控</span>、从定位到构图、从导航到可视化,几乎都<span style="color: black;">运用</span>ROS<span style="color: black;">做为</span><span style="color: black;">基本</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">Micro-ROS从何而来?</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Micro-ROS<span style="color: black;">实质</span>上是从ROS2优化而来的轻量级ROS系统,用于在<span style="color: black;">各样</span><span style="color: black;">设备</span>人应用中在MCU上实现第二代<span style="color: black;">设备</span>人操作系统ROS 2,<span style="color: black;">经过</span><span style="color: black;">运用</span>通用框架,它<span style="color: black;">能够</span>实现与传统<span style="color: black;">设备</span>人、物联网传感器和设备的互操作性。ROS2基于ROS升级而来,<span style="color: black;">倘若</span>说ROS为<span style="color: black;">设备</span>人<span style="color: black;">科研</span>和<span style="color: black;">设备</span>人原型<span style="color: black;">研发</span><span style="color: black;">供给</span>了良好⽣态的话,<span style="color: black;">那样</span>ROS2<span style="color: black;">便是</span>⽤于<span style="color: black;">设备</span>人<span style="color: black;">安排</span>环境的<span style="color: black;">研发</span>架构和相应的工具链。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">传统<span style="color: black;">设备</span>人ROS实质上是仍旧停留在MCU边界的,再<span style="color: black;">经过</span>串行协议<span style="color: black;">或</span>旧版ROS中的工具与MCU集成在<span style="color: black;">一块</span>。Micro-ROS则<span style="color: black;">准许</span>在硬件级别<span style="color: black;">周边</span>运行ROS2节点,所有硬件外设都可用于该应用程序,从而使其能够直接与低级总线系统进行交互,<span style="color: black;">也</span>与传感器和执行器接口互通。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/b12f77f86709464385d58ba04697fcf7~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728808705&amp;x-signature=q7BfvsqVJ2CEoeGUvR%2B%2BhEwWDWE%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(Micro-ROS,Micro-ROS开源社区)</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">ROS2<span style="color: black;">处理</span>了ROS在<span style="color: black;">非常多</span>层面上<span style="color: black;">没法</span>满足的性能升级的短板,诸如:实时性、对MCU的支持、网络通信的依赖程度、多<span style="color: black;">设备</span>人的支持等等。原生的ROS其实只支持单个<span style="color: black;">设备</span>人,<span style="color: black;">针对</span>多<span style="color: black;">设备</span>人的支持是不足的,<span style="color: black;">况且</span>大型<span style="color: black;">设备</span>人项目的构建、<span style="color: black;">研发</span>和<span style="color: black;">安排</span>这些<span style="color: black;">需要</span>ROS<span style="color: black;">逐步</span><span style="color: black;">不可</span>满足。实时性、安全性、嵌⼊式移植等方面,在工业<span style="color: black;">行业</span><span style="color: black;">亦</span>让时常<span style="color: black;">没法</span>匹配某系性能的<span style="color: black;">需求</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Micro-ROS在<span style="color: black;">处理</span>了多<span style="color: black;">设备</span>人支持、非理想网络环境支持、实时系统支持之外,最重要的<span style="color: black;">便是</span>对MCU直接的支持。Micro-ROS将<span style="color: black;">再也不</span>停留在MCU的边界<span style="color: black;">经过</span>串行协议集成。ROS2采⽤RTSP(Real-Time Publish-Subscribe)协议的DDS<span style="color: black;">做为</span>中间层,DDS<span style="color: black;">做为</span>⼀种⽤于实时和嵌⼊式系统发布-订阅式通信的⼯业标准,在系统容错和灵活性上会更加完善。Micro-ROS<span style="color: black;">同期</span><span style="color: black;">能够</span>利用其中间件可插拔性来<span style="color: black;">运用</span>针对MCU进行了优化的DDS-XRCE。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">基于Micro-ROS的<span style="color: black;">设备</span>人<span style="color: black;">掌控</span>MCU</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Micro-ROS旨在将ROS2引入广泛的微<span style="color: black;">掌控</span>器,<span style="color: black;">重点</span><span style="color: black;">目的</span><span style="color: black;">便是</span>中档32位微<span style="color: black;">掌控</span>器系列。<span style="color: black;">通常</span><span style="color: black;">来讲</span>,Micro-ROS 需要<span style="color: black;">拥有</span>几万字节RAM内存的MCU和能够实现Micro-ROS客户端到代理通信的通信外围设备。Micro-ROS支持的硬件<span style="color: black;">日前</span>分为官方支持的板和社区板。<span style="color: black;">这儿</span>挑几个官方支持的Micro-ROS<span style="color: black;">设备</span>人本体<span style="color: black;">掌控</span>MCU。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">瑞萨RA6M5 Micro-ROS</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">瑞萨电子与Micro-ROS框架供应商eProsima合作,<span style="color: black;">研发</span>了基于RA6M5的ROS<span style="color: black;">设备</span>人本体<span style="color: black;">掌控</span>器,将Micro-ROS完全集成到了EK RA6M5 MCU中。该系统能够基于ROS<span style="color: black;">掌控</span>多个伺服系统。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/fde29d2e2b01484aa5e966afa78ff646~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728808705&amp;x-signature=xsF%2FyVfTAgH6mIGEJIYGDgvNoXU%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(瑞萨)</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">32位的RA6M5 MCU是高性能Arm Cortex-M33内核,521KB内存,闪存高达2MB。集<span style="color: black;">成为了</span>能够用于在ROS节点之间进行 Pub/Sub信息传递的通信接口,<span style="color: black;">能够</span><span style="color: black;">经过</span>单线 UART 和 RS-485 <span style="color: black;">掌控</span>多个伺服系统。该官方板支持的实时操作系统为FreeRTOS、ThreadX和裸机。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">乐鑫ESP32 Micro-ROS</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Xtensa双核32位LX6微处理器,最高240 MHz,520KB的内存以及高达4MB的闪存,在外设支持上是官方板中最多的,以太网 MAC、Wi-Fi 802.11 b/g/n、蓝牙 v4.2 BR/EDR、BLE、SPI、I2C、I2S、UART、SDIO、CAN、GPIO、ADC/DAC、PWM<span style="color: black;">所有</span>覆盖。对实时操作系统的支持<span style="color: black;">日前</span>仅支持应用最广泛的FreeRTOS。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/09b029a396a24a0caa09ef9c3ac5cf55~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728808705&amp;x-signature=5xvqZHH9iicOJlt4xcTCMPdla%2Fk%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(乐鑫)</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">STM32L4 Micro-ROS</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">ARM Cortex-M4的内核,128KB的内存,1MB的闪存,相当的朴实无华。但在<span style="color: black;">设备</span>人应用外设的集成上很亮眼,温湿度传感器、3轴IMU、ToF传感器等等。在社区自制的Micro-ROS</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">板上,ST的32位MCU仍然是最<span style="color: black;">平常</span>的,呈压倒性<span style="color: black;">优良</span>。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/8abd44fc5ac04189885a593e21226cde~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728808705&amp;x-signature=N73RAGEndWN8jNDHv5dG1wcOR7Q%3D" style="width: 50%; margin-bottom: 20px;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(ST)</p>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">Micro-ROS运用在MCU上的内存限制</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在Micro-ROS与硬件结合上,还有一个问题,即在嵌入式平台中运行Micro-ROS的最大的制约来自于内存的限制。<span style="color: black;">因为</span>Micro-ROS 中的内存<span style="color: black;">运用</span>是一个很<span style="color: black;">繁杂</span>的问题,<span style="color: black;">因此</span><span style="color: black;">怎样</span><span style="color: black;">调节</span>Micro-ROS 中间件的内存消耗是比较棘手的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">由于</span>Micro-ROS的<span style="color: black;">目的</span>是MCU这一类内存资源低的设备。优先<span style="color: black;">运用</span>静态内存而不是动态内存,并优化应用程序的内存占用是一个较为可行的办法。上面<span style="color: black;">咱们</span><span style="color: black;">亦</span><span style="color: black;">说到</span>了,Micro-ROS<span style="color: black;">同期</span><span style="color: black;">能够</span>利用其中间件可插拔性来<span style="color: black;">运用</span>针对MCU进行了优化的DDS-XRCE。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Micro-ROS的中间件<span style="color: black;">一般</span>被形容成“资源极度受限但极度灵活”,为了与Micro-ROS堆栈中的ROS中间件接口集成,DDS-XRCE引入了静态内存池,以避免在运行时动态分配内存。这些都是为了消除Micro-ROS与硬件结合时的内存限制。<span style="color: black;">处理</span>这一限制后,Micro-ROS与MCU这类硬件的结合,<span style="color: black;">能够</span>说是相当<span style="color: black;">靠谱</span>的<span style="color: black;">设备</span>人<span style="color: black;">掌控</span><span style="color: black;">处理</span><span style="color: black;">方法</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">写在最后</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">“将ROS2放在MCU上”,这是Micro-ROS的社区宣言。纯硬件<span style="color: black;">拜访</span>、低延迟的实时性、低功耗是Micro-ROS将ROS2放在MCU上的<span style="color: black;">原由</span>,Micro-ROS<span style="color: black;">亦</span>的确<span style="color: black;">起始</span>在<span style="color: black;">设备</span>人应用中弥合资源受限的MCU和更强大的处理器之间的差距。</span></p>




4lqedz 发表于 2024-11-8 07:17:14

软文发布平台 http://www.fok120.com/
页: [1]
查看完整版本: Micro-ROS:把ROS2放在MCU上