Loading...
正在加载...
请稍候

树莓派5上的ROS 2与Go语言:完美组合

✨步子哥 (steper) 2025年09月24日 23:26
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>树莓派5上的ROS 2与Go语言:完美组合</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .logos { display: flex; justify-content: space-around; align-items: center; margin: 30px 0; flex-wrap: wrap; } .logo-item { display: flex; flex-direction: column; align-items: center; margin: 10px; } .logo-item img { width: 100px; height: 100px; object-fit: contain; margin-bottom: 10px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .logo-item p { font-size: 14px; color: #546E7A; text-align: center; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .section-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; margin-bottom: 15px; display: flex; align-items: center; } .section-title .material-icons { margin-right: 10px; color: #FF9800; } .platform-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background-color: white; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); } .platform-table th, .platform-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #E0E0E0; } .platform-table th { background-color: #1565C0; color: white; font-weight: 500; } .platform-table tr:last-child td { border-bottom: none; } .platform-table tr:nth-child(even) { background-color: #F5F7FA; } .highlight { color: #FF9800; font-weight: 500; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">树莓派5上的ROS 2与Go语言:完美组合</h1> <p class="subtitle">性能足够支撑中等规模的机器人应用开发</p> </div> <div class="logos"> <div class="logo-item"> <img src="https://sfile.chatglm.cn/moeSlide/image/40/4041a6ef.jpg" alt="树莓派5"> <p>树莓派5</p> </div> <div class="logo-item"> <img src="https://sfile.chatglm.cn/moeSlide/image/d4/d4bc9af9.jpg" alt="ROS 2"> <p>ROS 2 Jazzy</p> </div> <div class="logo-item"> <img src="https://sfile.chatglm.cn/moeSlide/image/54/54a97c46.jpg" alt="Go语言"> <p>Go 1.23+</p> </div> <div class="logo-item"> <img src="https://sfile.chatglm.cn/moeSlide/image/9c/9c803d9a.jpg" alt="Ubuntu"> <p>Ubuntu 24.04 LTS</p> </div> </div> <div class="section"> <h2 class="section-title"> <i class="material-icons">settings</i> 系统平台建议 </h2> <table class="platform-table"> <thead> <tr> <th>项目</th> <th>推荐配置</th> </tr> </thead> <tbody> <tr> <td>操作系统</td> <td><span class="highlight">Ubuntu 24.04 LTS</span>(桌面版或Server版均可)</td> </tr> <tr> <td>ROS 2 版本</td> <td><span class="highlight">ROS 2 Jazzy</span>(当前最新稳定版,支持aarch64)</td> </tr> <tr> <td>Go 版本</td> <td><span class="highlight">Go 1.23+</span>(官方arm64版本,支持并发、网络、模块等完整功能)</td> </tr> </tbody> </table> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>

讨论回复

10 条回复
✨步子哥 (steper) #1
09-24 23:27
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ROS 2安装与运行体验</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .section-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 28px; font-weight: bold; color: #1565C0; margin-bottom: 20px; display: flex; align-items: center; } .section-title .material-icons { margin-right: 10px; color: #FF9800; font-size: 32px; } .feature-card { background-color: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; } .feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .feature-header { display: flex; align-items: center; margin-bottom: 15px; } .feature-icon { width: 50px; height: 50px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 15px; } .feature-icon .material-icons { color: #1565C0; font-size: 28px; } .feature-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 22px; font-weight: bold; color: #1565C0; } .feature-content { font-size: 18px; color: #546E7A; padding-left: 65px; } .feature-content ul { list-style-type: none; padding-left: 0; } .feature-content li { margin-bottom: 10px; position: relative; padding-left: 25px; } .feature-content li:before { content: "•"; color: #FF9800; font-size: 24px; position: absolute; left: 0; top: -5px; } .highlight { color: #FF9800; font-weight: 500; } .code-block { background-color: #263238; color: #EEFFFF; padding: 15px; border-radius: 8px; margin: 15px 0; font-family: 'PingFang HK', monospace; font-size: 16px; overflow-x: auto; } .performance-indicator { display: flex; align-items: center; margin: 10px 0; } .indicator-label { width: 120px; font-size: 16px; color: #546E7A; } .indicator-bar { flex-grow: 1; height: 10px; background-color: #E0E0E0; border-radius: 5px; overflow: hidden; } .indicator-fill { height: 100%; background-color: #4CAF50; border-radius: 5px; } .indicator-fill.high { width: 90%; background-color: #4CAF50; } .indicator-fill.medium { width: 70%; background-color: #FFC107; } .indicator-fill.low { width: 40%; background-color: #F44336; } .indicator-value { width: 50px; text-align: right; font-size: 16px; color: #546E7A; padding-left: 10px; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">ROS 2安装与运行体验</h1> <p class="subtitle">树莓派5上的高效机器人开发平台</p> </div> <div class="section"> <div class="feature-card"> <div class="feature-header"> <div class="feature-icon"> <i class="material-icons">download</i> </div> <h2 class="feature-title">安装方式</h2> </div> <div class="feature-content"> <ul> <li>推荐使用 <span class="highlight">鱼香ROS一键安装脚本</span>,支持中文交互</li> <li>自动适配 Ubuntu 24.04 + ROS 2 Jazzy</li> <li>脚本地址:<span class="highlight">http://fishros.com/install</span></li> </ul> <div class="code-block"> wget http://fishros.com/install -O fishros && . fishros </div> </div> </div> <div class="feature-card"> <div class="feature-header"> <div class="feature-icon"> <i class="material-icons">speed</i> </div> <h2 class="feature-title">运行性能</h2> </div> <div class="feature-content"> <ul> <li>树莓派5的4核Cortex-A76性能强劲,<span class="highlight">可流畅运行多个ROS 2节点</span></li> <li>支持图像处理、激光雷达驱动、导航栈等复杂应用</li> </ul> <div class="performance-indicator"> <div class="indicator-label">CPU利用率</div> <div class="indicator-bar"> <div class="indicator-fill medium"></div> </div> <div class="indicator-value">70%</div> </div> <div class="performance-indicator"> <div class="indicator-label">内存占用</div> <div class="indicator-bar"> <div class="indicator-fill low"></div> </div> <div class="indicator-value">40%</div> </div> <div class="performance-indicator"> <div class="indicator-label">通信延迟</div> <div class="indicator-bar"> <div class="indicator-fill low"></div> </div> <div class="indicator-value">低</div> </div> </div> </div> <div class="feature-card"> <div class="feature-header"> <div class="feature-icon"> <i class="material-icons">settings_ethernet</i> </div> <h2 class="feature-title">中间件优化</h2> </div> <div class="feature-content"> <ul> <li>建议使用 <span class="highlight">rmw_cyclonedds_cpp</span> 作为DDS实现</li> <li><span class="highlight">降低通信延迟并提升稳定性</span></li> <li>配置方法:</li> </ul> <div class="code-block"> export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #2
09-24 23:27
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Go语言支持情况</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .feature-card { background-color: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; } .feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .feature-header { display: flex; align-items: center; margin-bottom: 15px; } .feature-icon { width: 50px; height: 50px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 15px; } .feature-icon .material-icons { color: #1565C0; font-size: 28px; } .feature-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 22px; font-weight: bold; color: #1565C0; } .feature-content { font-size: 18px; color: #546E7A; padding-left: 65px; } .feature-content ul { list-style-type: none; padding-left: 0; } .feature-content li { margin-bottom: 10px; position: relative; padding-left: 25px; } .feature-content li:before { content: "•"; color: #FF9800; font-size: 24px; position: absolute; left: 0; top: -5px; } .highlight { color: #FF9800; font-weight: 500; } .code-block { background-color: #263238; color: #EEFFFF; padding: 15px; border-radius: 8px; margin: 15px 0; font-family: 'PingFang HK', monospace; font-size: 16px; overflow-x: auto; } .compatibility-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 15px; } .compatibility-item { background-color: #F5F7FA; border-radius: 8px; padding: 15px; display: flex; align-items: center; } .compatibility-icon { width: 40px; height: 40px; border-radius: 50%; background-color: #E8F5E9; display: flex; justify-content: center; align-items: center; margin-right: 15px; flex-shrink: 0; } .compatibility-icon .material-icons { color: #4CAF50; font-size: 24px; } .compatibility-text { font-size: 16px; color: #546E7A; } .integration-card { background-color: #F5F7FA; border-radius: 12px; padding: 20px; margin-top: 15px; border-left: 4px solid #1565C0; } .integration-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 20px; font-weight: bold; color: #1565C0; margin-bottom: 10px; display: flex; align-items: center; } .integration-title .material-icons { margin-right: 10px; color: #FF9800; } .integration-content { font-size: 16px; color: #546E7A; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">Go语言支持情况</h1> <p class="subtitle">树莓派5上的高效并发编程语言</p> </div> <div class="section"> <div class="feature-card"> <div class="feature-header"> <div class="feature-icon"> <i class="material-icons">download</i> </div> <h2 class="feature-title">安装方式</h2> </div> <div class="feature-content"> <ul> <li>下载官方arm64版本,<span class="highlight">支持树莓派5的64位架构</span></li> <li>安装过程简单,无需交叉编译</li> </ul> <div class="code-block"> wget https://go.dev/dl/go1.23.2.linux-arm64.tar.gz<br> sudo tar -C /usr/local -xzf go1.23.2.linux-arm64.tar.gz<br> echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc<br> source ~/.bashrc </div> </div> </div> <div class="feature-card"> <div class="feature-header"> <div class="feature-icon"> <i class="material-icons">check_circle</i> </div> <h2 class="feature-title">兼容性</h2> </div> <div class="feature-content"> <p>Go在树莓派5上运行<span class="highlight">完整标准库</span>,包括:</p> <div class="compatibility-grid"> <div class="compatibility-item"> <div class="compatibility-icon"> <i class="material-icons">sync</i> </div> <div class="compatibility-text">goroutine(并发调度)</div> </div> <div class="compatibility-item"> <div class="compatibility-icon"> <i class="material-icons">language</i> </div> <div class="compatibility-text">net/http(Web服务)</div> </div> <div class="compatibility-item"> <div class="compatibility-icon"> <i class="material-icons">extension</i> </div> <div class="compatibility-text">cgo(可调用C/C++库)</div> </div> <div class="compatibility-item"> <div class="compatibility-icon"> <i class="material-icons">apps</i> </div> <div class="compatibility-text">modules(依赖管理)</div> </div> </div> </div> </div> <div class="feature-card"> <div class="feature-header"> <div class="feature-icon"> <i class="material-icons">integration_instructions</i> </div> <h2 class="feature-title">与ROS 2集成</h2> </div> <div class="feature-content"> <ul> <li>可通过 <span class="highlight">rclgo</span>(ROS 2的Go客户端库)实现ROS 2节点开发</li> <li>支持publisher/subscriber、service、action等核心功能</li> </ul> <div class="integration-card"> <h3 class="integration-title"> <i class="material-icons">code</i> 示例项目 </h3> <div class="integration-content"> <p>GitHub仓库:<span class="highlight">https://github.com/tiiuae/rclgo</span></p> <p>提供完整的Go语言ROS 2开发支持,适合构建高性能机器人应用</p> </div> </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #3
09-24 23:29
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>实际应用场景举例</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .scenario-cards { display: flex; flex-direction: column; gap: 20px; } .scenario-card { background-color: white; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; align-items: center; } .scenario-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .scenario-icon { width: 70px; height: 70px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 20px; flex-shrink: 0; } .scenario-icon .material-icons { color: #1565C0; font-size: 36px; } .scenario-content { flex-grow: 1; } .scenario-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; margin-bottom: 10px; display: flex; align-items: center; } .scenario-description { font-size: 18px; color: #546E7A; margin-bottom: 15px; } .tech-tags { display: flex; flex-wrap: wrap; gap: 10px; } .tech-tag { background-color: #F5F7FA; border-radius: 20px; padding: 6px 12px; font-size: 14px; color: #546E7A; display: flex; align-items: center; } .tech-tag .material-icons { font-size: 16px; margin-right: 5px; color: #FF9800; } .feasibility-indicator { display: flex; align-items: center; margin-left: 20px; flex-shrink: 0; } .feasibility-status { width: 80px; height: 80px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-family: 'Futura', 'PingFang HK', sans-serif; font-size: 18px; font-weight: bold; } .feasibility-status.recommended { background-color: #E8F5E9; color: #4CAF50; } .feasibility-status.feasible { background-color: #FFF8E1; color: #FFC107; } .feasibility-status.smooth { background-color: #E3F2FD; color: #1565C0; } .highlight { color: #FF9800; font-weight: 500; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">实际应用场景举例</h1> <p class="subtitle">树莓派5上的ROS 2与Go语言组合应用</p> </div> <div class="section"> <div class="scenario-cards"> <div class="scenario-card"> <div class="scenario-icon"> <i class="material-icons">smart_toy</i> </div> <div class="scenario-content"> <h2 class="scenario-title">机器人控制节点 + Web服务</h2> <p class="scenario-description"> 使用Python/C++编写机器人控制节点,同时用Go构建高性能Web服务,实现远程监控和控制 </p> <div class="tech-tags"> <div class="tech-tag"> <i class="material-icons">settings</i> ROS 2 </div> <div class="tech-tag"> <i class="material-icons">code</i> Python/C++ </div> <div class="tech-tag"> <i class="material-icons">language</i> Go HTTP </div> <div class="tech-tag"> <i class="material-icons">devices</i> Web界面 </div> </div> </div> <div class="feasibility-indicator"> <div class="feasibility-status recommended"> 推荐 </div> </div> </div> <div class="scenario-card"> <div class="scenario-icon"> <i class="material-icons">sensors</i> </div> <div class="scenario-content"> <h2 class="scenario-title">Go编写ROS 2节点</h2> <p class="scenario-description"> 使用<span class="highlight">rclgo</span>库直接用Go语言编写ROS 2节点,发布传感器数据,利用Go的并发优势处理多传感器数据 </p> <div class="tech-tags"> <div class="tech-tag"> <i class="material-icons">code</i> rclgo </div> <div class="tech-tag"> <i class="material-icons">sync</i> Go并发 </div> <div class="tech-tag"> <i class="material-icons">sensors</i> 传感器集成 </div> <div class="tech-tag"> <i class="material-icons">publish</i> 数据发布 </div> </div> </div> <div class="feasibility-indicator"> <div class="feasibility-status feasible"> 可行 </div> </div> </div> <div class="scenario-card"> <div class="scenario-icon"> <i class="material-icons">image</i> </div> <div class="scenario-content"> <h2 class="scenario-title">多节点图像处理 + 实时通信</h2> <p class="scenario-description"> 使用ROS 2 Jazzy的多个节点协同处理图像数据,结合CycloneDDS实现低延迟通信,适用于视觉导航应用 </p> <div class="tech-tags"> <div class="tech-tag"> <i class="material-icons">image</i> 图像处理 </div> <div class="tech-tag"> <i class="material-icons">settings_ethernet</i> CycloneDDS </div> <div class="tech-tag"> <i class="material-icons">speed</i> 实时通信 </div> <div class="tech-tag"> <i class="material-icons">navigation</i> 视觉导航 </div> </div> </div> <div class="feasibility-indicator"> <div class="feasibility-status smooth"> 流畅运行 </div> </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #4
09-24 23:29
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>注意事项</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .notice-cards { display: flex; flex-direction: column; gap: 20px; } .notice-card { background-color: white; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; align-items: flex-start; } .notice-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .notice-icon { width: 60px; height: 60px; border-radius: 50%; background-color: #FFF3E0; display: flex; justify-content: center; align-items: center; margin-right: 20px; flex-shrink: 0; } .notice-icon .material-icons { color: #FF9800; font-size: 32px; } .notice-content { flex-grow: 1; } .notice-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; margin-bottom: 10px; } .notice-description { font-size: 18px; color: #546E7A; line-height: 1.5; } .highlight { color: #FF9800; font-weight: 500; } .hand-drawn { position: relative; } .hand-drawn::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 100%; height: 8px; background-image: url("data:image/svg+xml,%3Csvg width='100' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,4 Q25,0 50,4 T100,4' stroke='%23FF9800' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-size: 100px 8px; z-index: -1; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">注意事项</h1> <p class="subtitle">在树莓派5上运行ROS 2与Go语言需留意的问题</p> </div> <div class="section"> <div class="notice-cards"> <div class="notice-card"> <div class="notice-icon"> <i class="material-icons">warning</i> </div> <div class="notice-content"> <h2 class="notice-title">ROS 2不支持Go官方绑定</h2> <p class="notice-description"> 需使用社区项目如<span class="highlight hand-drawn">rclgo</span>,功能略滞后于C++/Python版本。部分高级功能可能需要等待社区更新。 </p> </div> </div> <div class="notice-card"> <div class="notice-icon"> <i class="material-icons">build</i> </div> <div class="notice-content"> <h2 class="notice-title">交叉编译不必要</h2> <p class="notice-description"> 树莓派5性能足够<span class="highlight hand-drawn">本地编译</span>Go项目,除非构建大型依赖。直接在树莓派5上编译可简化开发流程。 </p> </div> </div> <div class="notice-card"> <div class="notice-icon"> <i class="material-icons">computer</i> </div> <div class="notice-content"> <h2 class="notice-title">Ubuntu 24.04为首选</h2> <p class="notice-description"> <span class="highlight hand-drawn">Debian 12</span>目前不被ROS 2官方支持,建议使用Ubuntu 24.04 LTS以获得最佳兼容性和稳定性。 </p> </div> </div> <div class="notice-card"> <div class="notice-icon"> <i class="material-icons">memory</i> </div> <div class="notice-content"> <h2 class="notice-title">内存管理</h2> <p class="notice-description"> 树莓派5虽性能强大,但运行多个ROS 2节点和Go服务时仍需注意<span class="highlight hand-drawn">内存使用</span>,建议使用4GB或8GB版本以获得更好体验。 </p> </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #5
09-24 23:29
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>总结</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .conclusion-table { width: 100%; border-collapse: separate; border-spacing: 0 15px; margin-bottom: 20px; } .conclusion-row { background-color: white; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; } .conclusion-row:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .conclusion-row td { padding: 20px; vertical-align: middle; } .conclusion-row td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; width: 60%; } .conclusion-row td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; width: 40%; text-align: center; } .conclusion-question { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; font-weight: 500; color: #1565C0; display: flex; align-items: center; } .conclusion-question .material-icons { margin-right: 15px; color: #FF9800; font-size: 28px; } .conclusion-answer { display: flex; justify-content: center; align-items: center; } .answer-badge { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 30px; font-family: 'DingTalk JinBuTi', sans-serif; font-size: 18px; font-weight: bold; } .answer-badge.yes { background-color: #E8F5E9; color: #4CAF50; } .answer-badge.yes .material-icons { margin-right: 8px; color: #4CAF50; } .answer-badge.recommended { background-color: #E3F2FD; color: #1565C0; } .answer-badge.recommended .material-icons { margin-right: 8px; color: #1565C0; } .highlight { color: #FF9800; font-weight: 500; } .summary-card { background-color: white; border-radius: 12px; padding: 25px; margin-top: 30px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); position: relative; z-index: 1; border-left: 5px solid #1565C0; } .summary-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; margin-bottom: 15px; display: flex; align-items: center; } .summary-title .material-icons { margin-right: 10px; color: #FF9800; font-size: 28px; } .summary-content { font-size: 18px; color: #546E7A; line-height: 1.6; } .summary-content p { margin-bottom: 10px; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">总结</h1> <p class="subtitle">树莓派5上运行ROS 2与Go语言的可行性评估</p> </div> <div class="section"> <table class="conclusion-table"> <tr class="conclusion-row"> <td> <div class="conclusion-question"> <i class="material-icons">help_outline</i> ROS 2是否支持树莓派5? </div> </td> <td> <div class="conclusion-answer"> <div class="answer-badge yes"> <i class="material-icons">check_circle</i> 完全支持 </div> </div> </td> </tr> <tr class="conclusion-row"> <td> <div class="conclusion-question"> <i class="material-icons">help_outline</i> Go是否能在树莓派5上运行? </div> </td> <td> <div class="conclusion-answer"> <div class="answer-badge yes"> <i class="material-icons">check_circle</i> 可运行 </div> </div> </td> </tr> <tr class="conclusion-row"> <td> <div class="conclusion-question"> <i class="material-icons">help_outline</i> 能否同时运行ROS 2和Go? </div> </td> <td> <div class="conclusion-answer"> <div class="answer-badge yes"> <i class="material-icons">check_circle</i> 可同时运行 </div> </div> </td> </tr> <tr class="conclusion-row"> <td> <div class="conclusion-question"> <i class="material-icons">help_outline</i> 是否适合实际项目开发? </div> </td> <td> <div class="conclusion-answer"> <div class="answer-badge recommended"> <i class="material-icons">star</i> 性能足够 </div> </div> </td> </tr> </table> <div class="summary-card"> <h2 class="summary-title"> <i class="material-icons">lightbulb</i> 综合评估结论 </h2> <div class="summary-content"> <p>树莓派5搭载的<span class="highlight">4核Cortex-A76处理器</span>性能强劲,完全能够支撑ROS 2 Jazzy和Go语言的并发运行。</p> <p>推荐使用<span class="highlight">Ubuntu 24.04 LTS + ROS 2 Jazzy + Go 1.23+</span>的组合,可获得最佳兼容性和性能表现。</p> <p>适合<span class="highlight">教育、原型、轻量级机器人系统开发</span>,特别是需要Web服务集成的机器人应用场景。</p> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #6
09-25 05:16
### **迈向未来机器人时代:全面介绍ROS 2系统** #### **引言** 在当今机器人技术飞速发展的时代,一个强大、灵活且可靠的软件框架是推动创新的基石。ROS(Robot Operating System)作为机器人领域的事实标准,其第一代(ROS 1)为全球的研究者和开发者提供了巨大的价值。然而,随着应用场景从实验室走向工厂、户外乃至家庭,ROS 1在实时性、可靠性、网络通信和安全性等方面的局限性逐渐凸显。为了应对这些挑战,**ROS 2**应运而生,它并非简单的升级,而是一次从头开始的彻底革新,旨在支撑下一代机器人的复杂需求。 #### **一、 ROS 2的诞生:为什么需要它?** ROS 1的设计初衷是服务于研究环境中的单机器人系统,其核心通信机制依赖于单一主节点(ROS Master)。这带来了几个关键问题: 1. **单点故障**:ROS Master一旦崩溃,整个系统通信将瘫痪。 2. **实时性差**:通信缺乏服务质量(QoS)策略,无法保证关键数据的及时送达。 3. **网络通信受限**:对多机、跨子网的分布式系统支持非常薄弱。 4. **安全性缺失**:通信未加密,易受攻击。 5. **产品化困难**:难以满足工业级应用对稳定性和可靠性的严苛要求。 ROS 2正是为了彻底解决这些问题而设计的,它的目标是为**从研究原型到产品部署**的整个生命周期提供统一、强大的支持。 #### **二、 ROS 2的核心架构与重大改进** ROS 2的核心改进可以概括为以下几点: **1. 去中心化的通信架构:采用DDS通信中间件** 这是ROS 2最根本的改变。它摒弃了ROS Master,引入了**DDS(Data Distribution Service)** 作为其底层通信中间件。DDS是一个成熟的工业标准,广泛应用于航空、国防、医疗等对实时性和可靠性要求极高的领域。 * **优势**: * **无单点故障**:节点之间直接发现和通信,系统更加健壮。 * **丰富的QoS策略**:可以精确控制通信行为。例如,可以设置“尽力而为”或“可靠”传输,定义消息的生命周期和历史深度,确保关键指令(如急停信号)绝不丢失。 * **天然的跨网络支持**:DDS天生支持多机通信,使得构建多机器人舰队或分布式计算系统变得轻而易举。 **2. 真正的实时性与性能** 通过与实时操作系统(如RTOS)的集成和DDS提供的确定性通信,ROS 2能够满足硬实时(Hard Real-Time)系统的要求,这对于工业机械臂、自动驾驶等场景至关重要。 **3. 跨平台与生产就绪** ROS 2支持**Ubuntu、Windows、macOS**甚至嵌入式平台(如RTOS和微控制器),极大地扩展了其应用范围。其架构设计考虑了产品化的所有环节,包括: * **生命周期管理**:可以动态地配置、启动和停止节点,实现更精细的系统控制。 * **安全加密**:通过DDS-Security扩展,可以对节点身份进行验证、对通信进行加密和访问控制。 **4. 现代化的开发体验** ROS 2主要支持**Python 3**和**C++**,并提供了更清晰、更一致的API。其构建系统改为**Colcon**,包管理依赖通过**APT**或**Vcpkg**管理,使得依赖处理和跨平台编译更加方便。 #### **三、 ROS 2的核心概念(与ROS 1对比)** 虽然核心概念一脉相承,但实现方式已有不同: | 特性 | ROS 1 | ROS 2 | | :--- | :--- | :--- | | **主节点** | 有(单点故障) | **无**(基于DDS发现机制) | | **通信协议** | TCPROS/UDPROS(自定义) | **DDS**(工业标准) | | **通信质量(QoS)** | 不支持 | **全面支持**(可配置可靠性、持久性、期限等) | | **实时性** | 基本不支持 | **支持**(可与RTOS集成) | | **网络支持** | 困难 | **原生支持**(多机/跨网) | | **平台支持** | 主要为Linux | **Linux, Windows, macOS, RTOS** | | **安全性** | 无 | **通过DDS-Security支持** | #### **四、 应用场景** ROS 2的增强特性使其在众多前沿领域大放异彩: * **自动驾驶**:需要处理海量传感器数据(激光雷达、摄像头)、进行低延迟决策和车-云通信,ROS 2的分布式和QoS特性完美适配。 * **工业自动化**:在智能物流AMR(自主移动机器人)、协同机械臂等场景中,对可靠性和实时性要求极高,ROS 2是理想选择。 * **服务机器人**:在家庭或商场等复杂动态环境中,需要长期稳定运行,ROS 2的无主节点和生命周期管理提供了保障。 * **太空与深海探索**:在极端且高延迟的网络环境下,ROS 2的可靠通信和安全机制至关重要。 * **异构多机器人系统**:协调无人机、无人车、机械臂共同完成任务,ROS 2的跨平台和网络能力是基础。 #### **五、 如何开始与未来展望** 对于初学者,建议从最新的**ROS 2 Humble Hawksbill(LTS版本)** 开始,它有最长的支持周期和丰富的社区资源。学习路径通常包括:安装环境、理解核心概念(节点、话题、服务、动作)、编写简单的发布订阅 demo,再到深入掌握QoS、生命周期等高级特性。 ROS 2目前仍在快速发展中,其生态系统日益繁荣。未来,我们可以期待: * 与**云原生**技术(如Kubernetes)更深度地融合。 * 更强大**仿真工具**(如Ignition Gazebo)的集成。 * 简化部署和管理的**开发工具链**。 * 在**人工智能**(特别是强化学习)与机器人控制结合方面发挥更大作用。 #### **结论** ROS 2不仅仅是一个机器人框架的版本更新,它代表着机器人技术从学术研究走向大规模商业应用的范式转变。通过拥抱DDS工业标准、构建去中心化架构、支持丰富的QoS策略和跨平台部署,ROS 2为开发者提供了构建高性能、高可靠性、安全下一代机器人系统所必需的工具箱。无论是研究者、学生还是工程师,学习和掌握ROS 2都将是通往未来机器人创新之路的关键一步。 ---
✨步子哥 (steper) #7
09-25 05:29
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ROS 2与树莓派相关的开源项目</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .project-category { margin-bottom: 25px; } .category-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 28px; font-weight: bold; color: #1565C0; margin-bottom: 15px; display: flex; align-items: center; } .category-title .material-icons { margin-right: 10px; color: #FF9800; font-size: 32px; } .project-cards { display: flex; flex-direction: column; gap: 15px; } .project-card { background-color: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; } .project-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .project-header { display: flex; align-items: flex-start; margin-bottom: 12px; } .project-icon { width: 40px; height: 40px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 15px; flex-shrink: 0; } .project-icon .material-icons { color: #1565C0; font-size: 24px; } .project-title-container { flex-grow: 1; } .project-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 22px; font-weight: bold; color: #1565C0; margin-bottom: 5px; } .project-link { font-family: 'PingFang HK', monospace; font-size: 14px; color: #546E7A; word-break: break-all; } .project-description { font-size: 18px; color: #546E7A; padding-left: 55px; } .highlight { color: #FF9800; font-weight: 500; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">ROS 2与树莓派相关的开源项目</h1> <p class="subtitle">精选开源项目,助力机器人开发</p> </div> <div class="section"> <div class="project-category"> <h2 class="category-title"> <i class="material-icons">smart_toy</i> 机器人控制 </h2> <div class="project-cards"> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">directions_car</i> </div> <div class="project-title-container"> <h3 class="project-title">Raspberry Pi ROS 2 Robot</h3> <p class="project-link">https://github.com/UbiquityRobotics/raspicam2_node</p> </div> </div> <div class="project-description"> 基于树莓派的ROS 2机器人项目,提供完整的移动机器人控制框架,支持<span class="highlight">自主导航</span>和<span class="highlight">视觉处理</span>。 </div> </div> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">precision_manufacturing</i> </div> <div class="project-title-container"> <h3 class="project-title">PiArm</h3> <p class="project-link">https://github.com/sbcshop/PiArm</p> </div> </div> <div class="project-description"> 树莓派机械臂项目,支持ROS 2控制,提供<span class="highlight">运动学解算</span>和<span class="highlight">路径规划</span>功能,适合教育和研究用途。 </div> </div> </div> </div> <div class="project-category"> <h2 class="category-title"> <i class="material-icons">sensors</i> 传感器集成 </h2> <div class="project-cards"> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">camera_alt</i> </div> <div class="project-title-container"> <h3 class="project-title">ros2_raspicam</h3> <p class="project-link">https://github.com/ros-drivers/ros2_raspicam</p> </div> </div> <div class="project-description"> 树莓派摄像头ROS 2驱动,支持<span class="highlight">高分辨率图像采集</span>和<span class="highlight">视频流处理</span>,提供完整的相机标定功能。 </div> </div> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">radar</i> </div> <div class="project-title-container"> <h3 class="project-title">rplidar_ros2</h3> <p class="project-link">https://github.com/Slamtec/rplidar_ros2</p> </div> </div> <div class="project-description"> RPLIDAR激光雷达ROS 2驱动,支持多种型号的RPLIDAR设备,提供<span class="highlight">点云数据</span>和<span class="highlight">SLAM应用</span>支持。 </div> </div> </div> </div> <div class="project-category"> <h2 class="category-title"> <i class="material-icons">map</i> 导航与定位 </h2> <div class="project-cards"> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">explore</i> </div> <div class="project-title-container"> <h3 class="project-title">nav2_raspberry_pi</h3> <p class="project-link">https://github.com/ros-planning/navigation2</p> </div> </div> <div class="project-description"> ROS 2导航栈在树莓派上的优化版本,提供<span class="highlight">路径规划</span>、<span class="highlight">避障</span>和<span class="highlight">自主导航</span>功能,针对树莓派性能进行了优化。 </div> </div> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">location_searching</i> </div> <div class="project-title-container"> <h3 class="project-title">slam_toolbox</h3> <p class="project-link">https://github.com/SteveMacenski/slam_toolbox</p> </div> </div> <div class="project-description"> ROS 2 SLAM工具箱,支持<span class="highlight">同步定位与地图构建</span>,提供实时SLAM和离线SLAM模式,适合树莓派等嵌入式设备。 </div> </div> </div> </div> <div class="project-category"> <h2 class="category-title"> <i class="material-icons">code</i> 开发工具与框架 </h2> <div class="project-cards"> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">integration_instructions</i> </div> <div class="project-title-container"> <h3 class="project-title">rclgo</h3> <p class="project-link">https://github.com/tiiuae/rclgo</p> </div> </div> <div class="project-description"> ROS 2的Go语言客户端库,支持使用Go语言开发ROS 2节点,提供<span class="highlight">发布/订阅</span>、<span class="highlight">服务</span>和<span class="highlight">动作</span>功能。 </div> </div> <div class="project-card"> <div class="project-header"> <div class="project-icon"> <i class="material-icons">dashboard</i> </div> <div class="project-title-container"> <h3 class="project-title">ros2_web_bridge</h3> <p class="project-link">https://github.com/RobotWebTools/ros2_web_bridge</p> </div> </div> <div class="project-description"> ROS 2 Web桥接工具,允许通过Web界面与ROS 2节点交互,提供<span class="highlight">远程监控</span>和<span class="highlight">控制</span>功能,适合树莓派等边缘设备。 </div> </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #8
09-25 05:32
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ROS 2基本概念和架构介绍</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .concept-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 30px; } .concept-card { background-color: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; display: flex; flex-direction: column; } .concept-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .concept-header { display: flex; align-items: center; margin-bottom: 15px; } .concept-icon { width: 50px; height: 50px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 15px; flex-shrink: 0; } .concept-icon .material-icons { color: #1565C0; font-size: 28px; } .concept-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; } .concept-content { font-size: 18px; color: #546E7A; flex-grow: 1; } .concept-content ul { list-style-type: none; padding-left: 0; } .concept-content li { margin-bottom: 10px; position: relative; padding-left: 25px; } .concept-content li:before { content: "•"; color: #FF9800; font-size: 24px; position: absolute; left: 0; top: -5px; } .highlight { color: #FF9800; font-weight: 500; } .architecture-section { background-color: white; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); margin-bottom: 30px; } .section-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 28px; font-weight: bold; color: #1565C0; margin-bottom: 20px; display: flex; align-items: center; } .section-title .material-icons { margin-right: 10px; color: #FF9800; font-size: 32px; } .architecture-content { font-size: 18px; color: #546E7A; } .architecture-content p { margin-bottom: 15px; } .comparison-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 20px; background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); } .comparison-table th, .comparison-table td { padding: 15px; text-align: left; border-bottom: 1px solid #E0E0E0; } .comparison-table th { background-color: #1565C0; color: white; font-weight: 500; font-size: 18px; } .comparison-table tr:last-child td { border-bottom: none; } .comparison-table tr:nth-child(even) { background-color: #F5F7FA; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">ROS 2基本概念和架构介绍</h1> <p class="subtitle">了解ROS 2的核心概念、架构特点及其优势</p> </div> <div class="section"> <div class="concept-grid"> <div class="concept-card"> <div class="concept-header"> <div class="concept-icon"> <i class="material-icons">device_hub</i> </div> <h2 class="concept-title">核心概念</h2> </div> <div class="concept-content"> <ul> <li><span class="highlight">节点 (Nodes)</span>:ROS 2中的基本执行单元,负责特定功能</li> <li><span class="highlight">话题 (Topics)</span>:节点间异步通信的命名通道,用于发布/订阅模式</li> <li><span class="highlight">服务 (Services)</span>:节点间同步通信机制,请求-响应模式</li> <li><span class="highlight">动作 (Actions)</span>:长时间运行任务,支持抢占和反馈</li> <li><span class="highlight">参数 (Parameters)</span>:节点配置数据,可在运行时修改</li> </ul> </div> </div> <div class="concept-card"> <div class="concept-header"> <div class="concept-icon"> <i class="material-icons">architecture</i> </div> <h2 class="concept-title">架构特点</h2> </div> <div class="concept-content"> <ul> <li><span class="highlight">DDS中间件</span>:基于数据分发服务(DDS)的通信框架</li> <li><span class="highlight">实时性支持</span>:满足实时系统需求,支持QoS策略</li> <li><span class="highlight">多语言支持</span>:C++、Python、Java等,以及社区支持的Go绑定</li> <li><span class="highlight">跨平台</span>:支持Linux、Windows、macOS、RTOS等</li> <li><span class="highlight">安全机制</span>:内置身份验证、加密和访问控制</li> </ul> </div> </div> </div> <div class="architecture-section"> <h2 class="section-title"> <i class="material-icons">compare_arrows</i> ROS 2与ROS 1的主要区别 </h2> <div class="architecture-content"> <table class="comparison-table"> <thead> <tr> <th>特性</th> <th>ROS 1</th> <th>ROS 2</th> </tr> </thead> <tbody> <tr> <td>通信机制</td> <td>基于TCP/UDP的自定义协议</td> <td>基于DDS标准</td> </tr> <tr> <td>实时性</td> <td>有限支持</td> <td>完整支持,可配置QoS</td> </tr> <tr> <td>多机器人</td> <td>需要额外配置</td> <td>原生支持</td> </tr> <tr> <td>安全性</td> <td>无内置安全机制</td> <td>内置身份验证和加密</td> </tr> <tr> <td>系统发现</td> <td>依赖ROS Master</td> <td>去中心化自动发现</td> </tr> </tbody> </table> </div> </div> <div class="architecture-section"> <h2 class="section-title"> <i class="material-icons">stars</i> ROS 2的主要优势 </h2> <div class="architecture-content"> <ul> <li><span class="highlight">生产环境适用性</span>:专为工业级应用设计,满足生产环境需求</li> <li><span class="highlight">实时性能</span>:通过QoS策略控制通信质量,满足实时系统需求</li> <li><span class="highlight">多机器人协作</span>:原生支持多机器人系统,无需额外配置</li> <li><span class="highlight">安全性</span>:内置安全机制,支持身份验证、加密和访问控制</li> <li><span class="highlight">可靠性</span>:DDS中间件提供可靠的通信机制,支持断线重连</li> <li><span class="highlight">扩展性</span>:从小型嵌入式系统到大型分布式系统均可适用</li> </ul> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #9
09-25 05:37
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ROS 2全面教程</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 1080px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .tutorial-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 30px; } .tutorial-card { background-color: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; display: flex; flex-direction: column; } .tutorial-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .tutorial-header { display: flex; align-items: center; margin-bottom: 15px; } .tutorial-icon { width: 50px; height: 50px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 15px; flex-shrink: 0; } .tutorial-icon .material-icons { color: #1565C0; font-size: 28px; } .tutorial-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; } .tutorial-content { font-size: 18px; color: #546E7A; flex-grow: 1; } .tutorial-content ul { list-style-type: none; padding-left: 0; } .tutorial-content li { margin-bottom: 10px; position: relative; padding-left: 25px; } .tutorial-content li:before { content: "•"; color: #FF9800; font-size: 24px; position: absolute; left: 0; top: -5px; } .highlight { color: #FF9800; font-weight: 500; } .code-block { background-color: #263238; color: #EEFFFF; padding: 15px; border-radius: 8px; margin: 15px 0; font-family: 'PingFang HK', monospace; font-size: 16px; overflow-x: auto; line-height: 1.4; } .resources-section { background-color: white; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); margin-bottom: 30px; } .section-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 28px; font-weight: bold; color: #1565C0; margin-bottom: 20px; display: flex; align-items: center; } .section-title .material-icons { margin-right: 10px; color: #FF9800; font-size: 32px; } .resources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; } .resource-item { background-color: #F5F7FA; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; align-items: center; text-align: center; } .resource-icon { width: 60px; height: 60px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-bottom: 10px; } .resource-icon .material-icons { color: #1565C0; font-size: 32px; } .resource-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 18px; font-weight: bold; color: #1565C0; margin-bottom: 8px; } .resource-description { font-size: 16px; color: #546E7A; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">ROS 2全面教程</h1> <p class="subtitle">从入门到进阶掌握ROS 2核心知识体系</p> </div> <div class="section"> <div class="tutorial-grid"> <div class="tutorial-card"> <div class="tutorial-header"> <div class="tutorial-icon"> <i class="material-icons">info</i> </div> <h2 class="tutorial-title">ROS 2简介</h2> </div> <div class="tutorial-content"> <ul> <li><span class="highlight">定位</span>:ROS的升级版本,更贴近工业应用</li> <li><span class="highlight">跨平台支持</span>:Linux、Windows、macOS等</li> <li><span class="highlight">多语言支持</span>:C++、Python等</li> <li><span class="highlight">核心优势</span>: <ul> <li>基于DDS中间件,实现分布式节点发现和可靠通信</li> <li>支持多种QoS配置,适应不同场景</li> <li>无需中心节点,节点可自动发现并通信</li> </ul> </li> </ul> </div> </div> <div class="tutorial-card"> <div class="tutorial-header"> <div class="tutorial-icon"> <i class="material-icons">download</i> </div> <h2 class="tutorial-title">安装ROS 2</h2> </div> <div class="tutorial-content"> <ul> <li><span class="highlight">安装方式</span>: <ul> <li>二进制包安装(推荐初学者)</li> <li>源码编译安装(适合开发者)</li> </ul> </li> <li><span class="highlight">关键安装步骤</span>: <div class="code-block"> sudo locale-gen en_US.UTF-8<br> export LANG=en_US.UTF-8<br> # 添加软件源和GPG密钥<br> sudo apt update && sudo apt upgrade<br> sudo apt install ros-humble-desktop </div> </li> <li><span class="highlight">环境配置</span>: <div class="code-block"> source /opt/ros/humble/setup.bash<br> export RMW_IMPLEMENTATION=rmw_fastrtps_cpp </div> </li> </ul> </div> </div> <div class="tutorial-card"> <div class="tutorial-header"> <div class="tutorial-icon"> <i class="material-icons">device_hub</i> </div> <h2 class="tutorial-title">核心概念与基础操作</h2> </div> <div class="tutorial-content"> <ul> <li><span class="highlight">基本概念</span>: <ul> <li>节点(Nodes):通信的基本单元</li> <li>主题(Topics):异步通信(发布/订阅)</li> <li>服务(Services):同步通信(请求-响应)</li> <li>发现(Discovery):节点自动发现机制</li> </ul> </li> <li><span class="highlight">命令行工具</span>: <div class="code-block"> ros2 node list # 查看所有节点<br> ros2 topic list # 查看主题<br> ros2 topic echo /chatter # 订阅主题消息<br> ros2 run demo_nodes_cpp talker # 启动发布者 </div> </li> </ul> </div> </div> <div class="tutorial-card"> <div class="tutorial-header"> <div class="tutorial-icon"> <i class="material-icons">settings</i> </div> <h2 class="tutorial-title">关键功能深入</h2> </div> <div class="tutorial-content"> <ul> <li><span class="highlight">服务质量(QoS)配置</span>: <ul> <li>可靠性:Best effort或Reliable</li> <li>耐久性:Volatile或Transient local</li> <li>兼容性规则:订阅者QoS需求不能比发布者更严格</li> </ul> </li> <li><span class="highlight">多节点进程管理</span>: <ul> <li>组件(Components):同一进程内运行多个节点</li> <li>通用容器进程动态加载组件</li> </ul> </li> <li><span class="highlight">自定义接口与内存分配</span>: <ul> <li>自定义消息/服务:在msg/或srv/目录下定义</li> <li>自定义内存分配器:替换默认分配器(如TLSF)</li> </ul> </li> </ul> </div> </div> <div class="tutorial-card"> <div class="tutorial-header"> <div class="tutorial-icon"> <i class="material-icons">upgrade</i> </div> <h2 class="tutorial-title">进阶功能</h2> </div> <div class="tutorial-content"> <ul> <li><span class="highlight">多RMW实现</span>: <ul> <li>支持多种DDS实现(FastRTPS、Connext、OpenSplice)</li> <li>通过环境变量切换: <div class="code-block"> export RMW_IMPLEMENTATION=rmw_connext_cpp </div> </li> </ul> </li> <li><span class="highlight">构建自定义软件包</span>: <ul> <li>使用Ament构建系统(Catkin的迭代版本)</li> <li>创建工作空间,编译包: <div class="code-block"> mkdir -p ~/ros2_ws/src<br> cd ~/ros2_ws<br> ament build --symlink-install </div> </li> </ul> </li> </ul> </div> </div> <div class="tutorial-card"> <div class="tutorial-header"> <div class="tutorial-icon"> <i class="material-icons">public</i> </div> <h2 class="tutorial-title">资源与社区</h2> </div> <div class="tutorial-content"> <ul> <li><span class="highlight">官方文档</span>:ROS 2 Documentation</li> <li><span class="highlight">社区支持</span>: <ul> <li>Discord</li> <li>ROS Discourse</li> <li>Robotics Stack Exchange</li> </ul> </li> <li><span class="highlight">贡献指南</span>: <ul> <li>参与ROS 2开发</li> <li>迁移ROS 1内容</li> </ul> </li> </ul> </div> </div> </div> <div class="resources-section"> <h2 class="section-title"> <i class="material-icons">lightbulb</i> 学习建议 </h2> <div class="resources-grid"> <div class="resource-item"> <div class="resource-icon"> <i class="material-icons">menu_book</i> </div> <h3 class="resource-title">理论学习</h3> <p class="resource-description">先理解ROS 2核心概念,再进行实践操作</p> </div> <div class="resource-item"> <div class="resource-icon"> <i class="material-icons">code</i> </div> <h3 class="resource-title">动手实践</h3> <p class="resource-description">结合官方教程逐步实践,加深理解</p> </div> <div class="resource-item"> <div class="resource-icon"> <i class="material-icons">groups</i> </div> <h3 class="resource-title">社区交流</h3> <p class="resource-description">参与社区讨论,解决实际问题</p> </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>
✨步子哥 (steper) #10
09-25 05:42
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ROS 2在树莓派上的安装和配置方法</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Futura:wght@400;500;700&display=swap" rel="stylesheet"> <style> @font-face { font-family: 'DingTalk JinBuTi'; src: local('DingTalk JinBuTi'); } @font-face { font-family: 'HarmonyOS Sans SC'; src: local('HarmonyOS Sans SC'); } @font-face { font-family: 'PingFang HK'; src: local('PingFang HK'); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'HarmonyOS Sans SC', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%); color: #333; line-height: 1.6; } .poster-container { width: 720px; min-height: 960px; margin: 0 auto; padding: 40px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 16px; overflow: hidden; position: relative; } .poster-container::before { content: ""; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, rgba(41, 121, 255, 0.1) 0%, rgba(0, 82, 212, 0.05) 100%); z-index: 0; } .poster-container::after { content: ""; position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 145, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%); z-index: 0; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; } .title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 42px; font-weight: bold; color: #1565C0; margin-bottom: 15px; letter-spacing: -1px; } .subtitle { font-family: 'HarmonyOS Sans SC', sans-serif; font-size: 20px; color: #546E7A; margin-bottom: 30px; } .section { margin-bottom: 30px; position: relative; z-index: 1; } .install-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 30px; } .install-card { background-color: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; display: flex; flex-direction: column; } .install-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .install-header { display: flex; align-items: center; margin-bottom: 15px; } .install-icon { width: 50px; height: 50px; border-radius: 50%; background-color: #E3F2FD; display: flex; justify-content: center; align-items: center; margin-right: 15px; flex-shrink: 0; } .install-icon .material-icons { color: #1565C0; font-size: 28px; } .install-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 24px; font-weight: bold; color: #1565C0; } .install-content { font-size: 18px; color: #546E7A; flex-grow: 1; } .install-content ul { list-style-type: none; padding-left: 0; } .install-content li { margin-bottom: 10px; position: relative; padding-left: 25px; } .install-content li:before { content: "•"; color: #FF9800; font-size: 24px; position: absolute; left: 0; top: -5px; } .highlight { color: #FF9800; font-weight: 500; } .code-block { background-color: #263238; color: #EEFFFF; padding: 15px; border-radius: 8px; margin: 15px 0; font-family: 'PingFang HK', monospace; font-size: 16px; overflow-x: auto; line-height: 1.4; } .steps-section { background-color: white; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); margin-bottom: 30px; } .section-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 28px; font-weight: bold; color: #1565C0; margin-bottom: 20px; display: flex; align-items: center; } .section-title .material-icons { margin-right: 10px; color: #FF9800; font-size: 32px; } .step-list { counter-reset: step-counter; } .step-item { margin-bottom: 20px; position: relative; padding-left: 50px; } .step-item:before { counter-increment: step-counter; content: counter(step-counter); position: absolute; left: 0; top: 0; width: 36px; height: 36px; background-color: #1565C0; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-family: 'Futura', 'PingFang HK', sans-serif; font-weight: bold; font-size: 18px; } .step-title { font-family: 'DingTalk JinBuTi', sans-serif; font-size: 20px; font-weight: bold; color: #1565C0; margin-bottom: 10px; } .step-description { font-size: 18px; color: #546E7A; } .footer { text-align: center; margin-top: 40px; color: #78909C; font-size: 14px; position: relative; z-index: 1; } </style> </head> <body> <div class="poster-container"> <div class="header"> <h1 class="title">ROS 2在树莓派上的安装和配置方法</h1> <p class="subtitle">详细指南:从系统要求到性能优化</p> </div> <div class="section"> <div class="install-grid"> <div class="install-card"> <div class="install-header"> <div class="install-icon"> <i class="material-icons">memory</i> </div> <h2 class="install-title">系统要求</h2> </div> <div class="install-content"> <ul> <li><span class="highlight">硬件</span>:树莓派5(推荐4GB或8GB版本)</li> <li><span class="highlight">操作系统</span>:Ubuntu 24.04 LTS 64位</li> <li><span class="highlight">存储空间</span>:至少16GB可用空间(推荐32GB+)</li> <li><span class="highlight">网络连接</span>:稳定的互联网连接(下载依赖)</li> <li><span class="highlight">电源</span>:5V/3A高质量电源适配器</li> </ul> </div> </div> <div class="install-card"> <div class="install-header"> <div class="install-icon"> <i class="material-icons">settings</i> </div> <h2 class="install-title">环境配置</h2> </div> <div class="install-content"> <ul> <li><span class="highlight">更新系统</span>:安装前更新所有系统包</li> <li><span class="highlight">设置locale</span>:确保UTF-8支持</li> <li><span class="highlight">添加ROS 2源</span>:配置软件源</li> <li><span class="highlight">安装依赖</span>:安装必要的依赖包</li> <li><span class="highlight">环境变量</span>:配置ROS 2环境变量</li> </ul> </div> </div> </div> <div class="steps-section"> <h2 class="section-title"> <i class="material-icons">list_alt</i> 安装步骤 </h2> <div class="step-list"> <div class="step-item"> <h3 class="step-title">准备系统</h3> <div class="step-description"> <p>更新系统并安装必要的依赖包:</p> <div class="code-block"> sudo apt update<br> sudo apt upgrade -y<br> sudo apt install -y curl gnupg2 lsb-release </div> </div> </div> <div class="step-item"> <h3 class="step-title">添加ROS 2软件源</h3> <div class="step-description"> <p>添加ROS 2的官方软件源并导入密钥:</p> <div class="code-block"> curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -<br> sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list' </div> </div> </div> <div class="step-item"> <h3 class="step-title">安装ROS 2 Jazzy</h3> <div class="step-description"> <p>更新软件包索引并安装ROS 2 Jazzy:</p> <div class="code-block"> sudo apt update<br> sudo apt install -y ros-jazzy-desktop </div> </div> </div> <div class="step-item"> <h3 class="step-title">环境配置</h3> <div class="step-description"> <p>配置ROS 2环境变量:</p> <div class="code-block"> echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc<br> source ~/.bashrc </div> </div> </div> </div> </div> <div class="install-grid"> <div class="install-card"> <div class="install-header"> <div class="install-icon"> <i class="material-icons">build</i> </div> <h2 class="install-title">常见问题解决</h2> </div> <div class="install-content"> <ul> <li><span class="highlight">依赖问题</span>:使用apt --fix-broken install修复</li> <li><span class="highlight">权限问题</span>:确保用户在dialout和video组中</li> <li><span class="highlight">网络问题</span>:检查DNS设置和代理配置</li> <li><span class="highlight">内存不足</span>:增加swap空间或关闭不必要服务</li> <li><span class="highlight">DDS问题</span>:尝试切换不同的DDS实现</li> </ul> </div> </div> <div class="install-card"> <div class="install-header"> <div class="install-icon"> <i class="material-icons">speed</i> </div> <h2 class="install-title">性能优化建议</h2> </div> <div class="install-content"> <ul> <li><span class="highlight">使用Cyclone DDS</span>:树莓派上性能最佳的DDS实现</li> <li><span class="highlight">调整QoS策略</span>:根据应用需求优化通信质量</li> <li><span class="highlight">禁用不必要服务</span>:释放系统资源</li> <li><span class="highlight">使用64位系统</span>:充分利用树莓派5的64位架构</li> <li><span class="highlight">优化交换空间</span>:配置适当的swap大小</li> </ul> </div> </div> </div> </div> <div class="footer"> <p>基于2025年最新实践的综合评估</p> </div> </div> </body> </html>