| 研究生: |
鍾博丞 Chung, Bo-Chen |
|---|---|
| 論文名稱: |
基於微控制器之增強型低丟包高刷新率 Micro-ROS 通訊 Enhanced Low-Loss, High-Rate Micro-ROS Communication on Microcontroller |
| 指導教授: |
蘇文鈺
Su, Wen-Yu |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 資訊工程學系 Department of Computer Science and Information Engineering |
| 論文出版年: | 2025 |
| 畢業學年度: | 113 |
| 語文別: | 英文 |
| 論文頁數: | 83 |
| 中文關鍵詞: | 嵌入式即時系統 、機器人作業系統 、作業系統核心 |
| 外文關鍵詞: | Embedded Real-time System, Robot OS, Linux Kernel |
| 相關次數: | 點閱:2751 下載:2 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
基於使用 ROS 2 通訊的機器人生態系統之下,我們希望開發一套可以操控雙臂機器人的系統,其中包含了逆向動力學計算。微控制器的任務是頻繁讀取逆向動力學計算結果,進而即時操作機械手臂上的舵機角度。
我們引入了 Micro-ROS 這個輕量級的 ROS 2 實作,並且使用了 FreeRTOS 作為即時作業系統,取代原先使用 JSON 字串轉譯訊息的方式。這樣的設計使得我們能夠在微控制器上運行 ROS 2 的功能,並且能夠與其他 ROS2 節點進行通訊。
這樣的設計需要考量到微控制器的即時性和效能的問題,我們需要確保所有傳送進微控制器的 UDP 封包能夠盡可能地低延遲與高頻率地傳送,這需要考量多執行緒在高優先權下的上下文交換,或是單執行緒 I/O 多工的延遲與效能瓶頸問題。
本論文使用資料融合的方式,並優化除錯訊息的取得方式,有效減少了中斷請求次數,提升了即時系統的可預測性,也提升了系統的效能與穩定性。
此外,由於我們希望藉由 NVIDIA Jetson Orin Nano 上的 GPIO 控制機械手臂的電源開關,因此發現了其作業系統核心處理 GPIO 上的錯誤,並加以修正。
Based on an ecosystem of robots communicating via ROS 2, we develop a system for commanding a dual-arm robot that provides inverse-kinematics computation. The task of the microcontroller is to read the inverse-kinematics results frequently and to control the servo angles of the robot arms in real time.
We adopt Micro-ROS, a lightweight implementation of ROS 2, and FreeRTOS, replacing our previous JSON-string message-parsing scheme. This design lets us run ROS 2 functionality on the microcontroller and communicate seamlessly with other ROS 2 nodes.
Such an architecture demands careful attention to real-time performance. We must ensure that every UDP packet arriving at the microcontroller is delivered with minimal latency and at high frequency. That in turn requires either analysis of context-switch overhead under high-priority multithreading, or of the latency and throughput limits of single-threaded I/O multiplexing.
In this work, we apply data-fusion techniques to reduce the number of interrupt requests and optimize diagnostic-message transmission, thereby improving the predictability, performance, and stability of the real-time system.
Finally, because we want to use the NVIDIA Jetson Orin Nano's GPIO pins to switch the robot's power, we discovered and corrected a bug in the Linux for Tegra (L4T) kernel's GPIO handling.
[1] Open Robotics. ROS node. https://docs.ros.org/en/jazzy/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Nodes/Understanding-ROS2-Nodes.html#nodes-in-ros-2, 2025. [accessed 28 July 2025].
[2] Open Robotics. ROS action. https://docs.ros.org/en/jazzy/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Actions/Understanding-ROS2-Actions.html#background, 2025. [accessed 28 July 2025].
[3] Open Robotics. ROS2 internal api architecture. https://docs.ros.org/en/jazzy/Concepts/Advanced/About-Internal-Interfaces.html, 2025. [accessed 28 July 2025].
[4] eProsima. Fast DDS library architecture. https://fast-dds.docs.eprosima.com/en/latest/fastdds/library overview/library overview.html, 2025. [accessed 28 July 2025].
[5] eProsima. Fast DDS transport. https://fast-dds.docs.eprosima.com/en/latest/fastdds/transport/transport.html, 2025. [accessed 28 July 2025].
[6] Pixel Electric. Pca9685 16-channel 12-bit pwm servo driver. https://www.pixelelectric.com/more-categories/motors-drivers-actuator/motor-drivers/other-motor-driver/16-channel-12-bit-pwm-servo-driver-pca9685/, 2025. [accessed 28 July 2025].
[7] Open Robotics. micro-ROS: Bringing ROS 2 to Microcontrollers. https://micro.ros.org/, 2025. [accessed 28 July 2025].
[8] eProsima. XRCE DDS architecture. https://micro-xrce-dds.docs.eprosima.com/en/latest/, 2025. [accessed 28 July 2025].
[9] Open Robotics. ROS2 executor basic use. https://docs.ros.org/en/jazzy/Concepts/Intermediate/About-Executors.html#basic-use, 2025. [accessed 28 July 2025].
[10] Open Robotics. ROS2 executor scheduling. https://docs.ros.org/en/jazzy/Concepts/Intermediate/About-Executors.html#scheduling-semantics, 2025. [accessed 28 July 2025].
[11] Zilong Wang, Songran Liu, Dong Ji, and Wang Yi. Improving real-time performance of micro-ros with priority-driven chain-aware scheduling. Electronics, 13(9), 2024.
[12] NVIDIA. Jetson Orin Nano Developer Kit Carrier Board Specification v1.3. https://developer.nvidia.com/embedded/downloads#?search=Jetson%20Orin%20Nano%20Developer%20Kit%20Carrier%20Board%20Specification, 2024. [accessed 28 July 2025].
[13] NVIDIA. Jetson Orin NX Series and Jetson Orin Nano Series Pinmux v1.01. https://developer.nvidia.com/embedded/downloads#?search=Jetson%20Orin%20NX%20Series%20and%20Jetson%20Orin%20Nano%20Series%20Pinmux, 2023. [accessed 28 July 2025].
[14] NVIDIA. Jetson Orin Series SoC Technical Reference Manual v1.2p. https://developer.nvidia.com/embedded/downloads#?search=Jetson%20Orin%20Series%20SoC%20Technical%20Reference%20Manual, 2023. [accessed 28 July 2025].
[15] Morgan Quigley, Ken Conley, Brian Gerkey, Josh Faust, Tully Foote, Jeremy Leibs, Rob Wheeler, Andrew Y Ng, et al. ROS: an open-source robot operating system. In ICRA workshop on open source software, volume 3, page 5. Kobe, 2009.
[16] Steven Macenski, Tully Foote, Brian Gerkey, Chris Lalancette, and William Woodall. Robot operating system 2: Design, architecture, and uses in the wild. Science Robotics, 7(66):eabm6074, 2022.
[17] David Coleman, Ioan Sucan, Sachin Chitta, and Nikolaus Correll. Reducing the barrier to entry of complex robotic software: a MoveIt! case study, 2014.
[18] Ioan A. S¸ ucan, Mark Moll, and Lydia E. Kavraki. The Open Motion Planning Library. IEEE Robotics & Automation Magazine, 19(4):72–82, December 2012. https://ompl.kavrakilab.org.
[19] Adafruit. Servo driver. https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library, 2025. [accessed 28 July 2025].
[20] Real Time Engineers Ltd. FreeRTOS. https://www.freertos.org/, 2025. [accessed 28 July 2025].
[21] Open Robotics. micro-ROS executor. https://micro.ros.org/docs/concepts/client library/execution management/#scheduling-semantics, 2025. [accessed 28 July 2025].
[22] Domain Bridge. https://github.com/ros2/domain bridge, 2025. [accessed 28 July 2025].
[23] Camillo Lugaresi, Jiuqiang Tang, Hadon Nash, Chris McClanahan, Esha Uboweja, Michael Hays, Fan Zhang, Chuo-Ling Chang, Ming Guang Yong, Juhyun Lee, Wan-Teh Chang, Wei Hua, Manfred Georg, and Matthias Grundmann. MediaPipe: A Framework for Building Perception Pipelines, 2019.
[24] B. Chung and KevinFFF. Failed to setup Jetson Orin Nano GPIO output in Jetpack 6.x. https://forums.developer.nvidia.com/t/failed-to-setup-jetson-orin-nano-gpio-output-in-jetpack-6-x/313701, 2024. [accessed 28 July 2025].
[25] B. Chung. Github repo for setting up Jetson Linux 36.4.3. https://github.com/otischung/jetson linux 36.4.3, 2025. [accessed 28 July 2025].
[26] KevinFFF. Official patch for the pinmux issue. https://forums.developer.nvidia.com/t/40hdr-spi1-gpio-padctl-register-bit-10-effect-by-gpiod-tools-in-jp6/301171/20, 2024. [accessed 28 July 2025].
[27] Kevin Cyu. IMSLab thesis template. https://github.com/ncku-imslab/imslab-thesis-template, 2019. [accessed 28 July 2025].