簡易檢索 / 詳目顯示

研究生: 蘇湘婷
Su, Siang-Ting
論文名稱: 基於 ROS 2 與 micro-ROS 之具故障後快速接管能力的分層式機器人備援控制架構
A Layered Backup Control Architecture with Fast Failover Capability Based on ROS 2 and micro-ROS
指導教授: 蘇文鈺
Su, Wen-Yu
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Department of Computer Science and Information Engineering
論文出版年: 2026
畢業學年度: 114
語文別: 英文
論文頁數: 83
中文關鍵詞: micro-ROS 、ROS 2 、備援控制 、容錯 、故障接管 、嵌入式系統
外文關鍵詞: micro-ROS, ROS 2, Backup Control, Fault Tolerance, Failover, Embedded Systems
相關次數: 點閱:67  下載:0 
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著無人機(Unmanned Aerial Vehicles, UAVs)於物流配送、災害救援、智慧巡檢與自主監測等應用領域快速發展,系統可靠性(Reliability)與容錯能力(Fault Tolerance)逐漸成為重要研究議題。現有多數無人機系統高度依賴單一高效能運算平台(如 Jetson 或 Raspberry Pi)執行導航、感測與決策任務,一旦主系統因硬體故障、作業系統崩潰、ROS 節點異常或通訊中斷而失效,可能導致整體控制能力喪失,進而造成例如飛行失控、任務失敗等等安全風險。因此,如何建立一套低成本、可快速接管且適用於嵌入式系統之備援控制架構,為本論文探討的課題。
    本論文提出一套基於 micro-ROS 的輕量化備援控制系統,採用 Agent–Client 分層式架構,由高階 ROS 2 主系統與低階微控制器備援系統共同組成。系統透過 heartbeat 機制與 Agent 連線監測,即時判斷主系統狀態,並於異常發生時自動觸發 failover 機制,使備援控制器接管基本安全控制功能,包括停止動作、進入安全狀態以及執行系統恢復流程。此外,本研究亦建立完整狀態機(State Machine)與連線狀態追蹤機制,以實現正常運作、斷線偵測、備援接管與 recovery 等系統狀態轉換。
    我們使用 Raspberry Pi 5 作為 micro-ROS Agent 與 ROS 2 主系統平台,Raspberry Pi Pico 2 W 作為 micro-ROS Client,亦可採用其他可以兼容 ROS2/micro-ROS 之系統。在論文的系統中,USB Serial 作為主要通訊介面,亦可採用其他常用介面,如 UART、Wi-Fi 等。
    實驗結果顯示,本系統能於主系統因故故障時快速進入備援模式,並於連線恢復後自動完成 recovery 流程。為精確分析系統行為與時間效能,本研究導入 RTT(Real-Time Transfer)除錯技術與 OpenOCD,即時記錄系統狀態與時間指標,包括 boot time、agent latency、client response time、backup time 與 recovery time,並透過多輪測試進行統計分析與效能評估。本研究提出之方法適合部署於資源受限之嵌入式機器人平台。除此之外,本系統架構亦具備良好延展性,可應用於無人機、自走車、多足機器人與其他分散式機器人系統之容錯控制設計。

    With the rapid development of Unmanned Aerial Vehicles (UAVs) in logistics, disaster rescue, intelligent inspection, and autonomous monitoring, system reliability and fault tolerance have become increasingly important research topics. Most existing UAV systems rely heavily on a single high-performance computing platform (e.g., Jetson or Raspberry Pi) for navigation, sensing, and decision-making. Once the primary system fails due to hardware failure, OS crash, ROS node error, or communication interruption, the entire control capability may be lost, leading to safety risks such as loss of flight control and mission failure. Therefore, how to build a low-cost, fast-takeover backup control architecture suitable for embedded systems is the subject of this thesis.
    This thesis proposes a lightweight backup control system based on micro-ROS, employing an Agent-Client layered architecture composed of a high-level ROS 2 host system and a low-level microcontroller backup system. The system uses a heartbeat mechanism and Agent connection monitoring to assess the host system status in real time, and automatically triggers a failover mechanism upon anomaly detection, enabling the backup controller to take over basic safety control functions including stopping motion, entering a safe state, and executing system recovery. Additionally, this research establishes a complete state machine and connection state tracking mechanism to implement system state transitions among normal operation, disconnection detection, backup takeover, and recovery.
    We use a Raspberry Pi 5 as the micro-ROS Agent and ROS 2 host platform, and a Raspberry Pi Pico 2 W as the micro-ROS Client; other systems compatible with ROS 2/micro-ROS may also be used. In the system described in this thesis, USB Serial serves as the primary communication interface, though other common interfaces such as UART and Wi-Fi may also be adopted.
    Experimental results show that the system can rapidly enter backup mode upon host system failure and automatically complete the recovery process after connectivity is restored. To accurately analyze system behavior and timing performance, this research introduces RTT (Real-Time Transfer) debugging technology and OpenOCD to record system states and timing metrics in real time, including boot time, agent latency, client response time, backup time, and recovery time, with statistical analysis and performance evaluation conducted across multiple test rounds. The proposed method is suitable for deployment on resource-constrained embedded robotic platforms. Furthermore, the system architecture exhibits good scalability and can be applied to fault-tolerant control design for UAVs, autonomous ground vehicles, multi-legged robots, and other distributed robotic systems.

    摘要 ⁠i Abstract ⁠ii 致謝 ⁠iv Table of Contents ⁠v List of Tables ⁠viii List of Figures ⁠ix Chapter 1. Introduction 1 1.1. Background ⁠1 1.2. Motivation ⁠1 1.3. Objectives ⁠2 1.4. Contributions ⁠2 Chapter 2. Related Work ⁠3 2.1. ROS 2 3 2.2. micro-ROS ⁠4 2.3. Joint Application Cases of ROS 2 and micro-ROS ⁠6 2.4. UAV Applications and Communication Fault-Tolerance Requirements ⁠8 2.5. Fault Tolerance / Backup Systems ⁠10 2.6. Robotic Backup and Fault-Tolerance Design ⁠11 2.7. Distributed Systems and Monitoring Mechanisms ⁠13 2.8. Debug and Monitoring Mechanisms ⁠14 Chapter 3. This Work ⁠16 3.1. System Architecture ⁠16 3.2. Hardware Architecture ⁠17 3.2.1. Overview ⁠18 3.2.2. Hardware Specifications ⁠18 3.2.3. Communication Interface ⁠19 3.2.4. Circuit Diagram ⁠19 v3.2.5. Hardware Control Behaviour Under Four System States ⁠21 3.2.6. Circuit-Design Explanation ⁠23 3.3. Software Design ⁠25 3.3.1. micro-ROS Client Initialization and Developmen Environment ⁠25 3.3.2. System Control Flow and State Machine Design ⁠26 3.3.3. Agent Ping Mechanism ⁠27 3.3.4. Entities Management Mechanism ⁠27 3.3.5. Backup Control Mechanism ⁠28 3.3.6. Timeout and Recovery Delay State Design ⁠28 3.3.7. Recovery Mechanism ⁠28 Chapter 4. Experimental Design and Analysis ⁠29 4.1. Research Method Overview ⁠29 4.2. Experimental System Architecture ⁠29 4.2.1. Hardware Configuration ⁠29 4.2.2. Software Execution Model 30 4.2.3. Debug and Monitoring Setup ⁠31 4.3. Backup Mechanism Design and Event Definitions ⁠32 4.4. Automated Stress-Test Procedure 35 4.4.1. Per-Round Execution Steps ⁠38 4.4.2. Event-Window Alignment ⁠38 4.5. Performance Metric Definitions ⁠39 4.6. Ping Timeout Sensitivity Analysis ⁠41 4.7. Data Processing and Statistical Methods ⁠41 4.8. Experimental Reproducibility and Limitations ⁠42 4.9. Detailed Experimental Results ⁠43 4.9.1. Experimental Overview ⁠43 4.9.2. Boot Time ⁠43 4.9.3. Connection Stability ⁠44 4.9.4. micro-ROS Entity Initialisation Time 45 vi4.9.5. Disconnect-to-Backup Latency ⁠46 4.9.6. Backup Time ⁠48 4.9.7. Summary 49 Chapter 5. Conclusion and Future Work ⁠51 5.1. Conclusion ⁠51 5.2. Limitations ⁠51 5.3. Future Work ⁠52 5.4. Summary ⁠52 References ⁠53 Appendix A. Core Firmware Source Code ⁠55 Appendix B. Disconnect-to-Backup Latency across All Ping Agent Timeouts ⁠59 Appendix C. Reconnect Flicker across All Ping Agent Timeouts ⁠63 Appendix D. micro-ROS Entity Initialisation Time across All Ping Agent Timeouts ⁠67

    [1]A. Avizienis, J.-C. Laprie, B. Randell, and C. Landwehr, “Basic Concepts and Taxonomy of Dependable and Secure Computing,” IEEE Transactions on Dependable and Secure Computing, vol. 1, no. 1, pp. 11 -33, Jan.–Mar. 2004.[Online]. Available: https://doi.org/10.1109/TDSC.2004.2
    [2]C. Bédard, I. Lütkebohle, and M. Dagenais, “ros2_tracing: Multipurpose Low-Overhead Framework for Real-Time Tracing of ROS 2,” IEEE Robotics and Automation Letters, vol. 7, no. 3, pp. 6511–6518, Jul. 2022. [Online]. Available:https://doi.org/10.1109/LRA.2022.3174346
    [3]T. D. Chandra and S. Toueg, “Unreliable Failure Detectors for Reliable Distributed Systems,” Journal of the ACM, vol. 43, no. 2, pp. 225–267, Mar. 1996. [Online]. Available: https://doi.org/10.1145/226643.226647
    [4]K. Chen, K. Hari, T. Chung, M. Wang, N. Tian, C. Juette, J. Ichnowski, L. Ren, J.Kubiatowicz, I. Stoica, and K. Goldberg, “FogROS2-FT: Fault Tolerant Cloud Robotics,” arXiv preprint, arXiv:2412.05408, Dec. 2024. [Online]. Available: https://arxiv.org/abs/2412.05408
    [5]eProsima, “micro-ROS Documentation,” 2024. [Online]. Available: https://micro.vulcanexus.org/
    [6]P. Kaveti and H. Singh, “ROS Rescue: Fault Tolerance System for Robot Operating System,” in Robot Operating System (ROS): The Complete Reference, vol. 5, A.Koubaa, Ed., Springer, Cham, Switzerland, pp. 381–397, 2020. [Online]. Available: https://doi.org/10.1007/978-3-030-45956-7_12
    [7]L. Lamport, “The Part-Time Parliament,” ACM Transactions on Computer Systems, vol. 16, no. 2, pp. 133–169, May 1998. [Online]. Available: https://doi.org/10.1145/279227.279229
    [8]I. Lütkebohle, B. Outerelo Gamarra, I. Muguruza Goenaga, J. Martin Losa, and V.Mayoral Vilches, “micro-ROS: ROS 2 on Microcontrollers,” in ROSCon 2019, Open Robotics, Macau, China, pp. 1–6, Oct. 2019. [Online]. Available: https://vimeopro.com/osrfoundation/roscon-2019/video/379127756
    [9]S. Macenski, T. Foote, B. Gerkey, C. Lalancette, and W. Woodall, “Robot Operating System 2: Design, Architecture, and Uses in the Wild,” Science Robotics, vol. 7, no.66, pp. 1–18, May 2022. [Online]. Available: https://doi.org/10.1126/scirobotics.abm6074
    [10] L. Meier, D. Honegger, and M. Pollefeys, “PX4: A Node-Based Multithreaded Open Source Robotics Framework for Deeply Embedded Platforms,” in Proc. IEEE International Conference on Robotics and Automation (ICRA), Seattle, WA, USA, pp. 6235–6240, May 2015. [Online]. Available: https://doi.org/10.1109/ICRA.2015.7140074
    [11] Open Robotics, “ROS 2 Documentation: Jazzy Jalisco,” 2024. [Online]. Available: https://docs.ros.org/en/jazzy/index.html
    [12] K. Peeroo, P. Popov, and V. Stankovic, “A Survey on Experimental Performance Evaluation of Data Distribution Service (DDS) Implementations,” arXiv preprint, arXiv:2310.16630, pp. 1–24, Oct. 2023. [Online]. Available: https://arxiv.org/abs/2310.16630
    [13] D. Rath, “Open On-Chip Debugger: Design and Implementation of an On-Chip Debug Solution for Embedded Target Systems based on the ARM7 and ARM9 Family,” Diploma Thesis, Department of Computer Science, University of Applied Sciences Augsburg, Augsburg, Germany, pp. 1–112, 2005. [Online]. Available: https://openocd.org/files/thesis.pdf
    [14] SEGGER Microcontroller GmbH, “J-Link RTT – Real Time Transfer,” Technical Documentation, SEGGER, Monheim am Rhein, Germany, 2024. [Online]. Available: https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/
    [15] J. Staschulat, I. Lütkebohle, and R. Lange, “The rclc Executor: Domain-specific Deterministic Scheduling Mechanisms for ROS Applications on Microcontrollers(Work-in-Progress),” in Proc. International Conference on Embedded Software(EMSOFT), Singapore, pp. 18–19, Sep. 2020. [Online]. Available: https://ieeexplore.ieee.org/document/9244014/

    下載圖示
    校外:立即公開
    QR CODE