# Thesis Abstraction
## 使用 ROS2 和 Unity 數位孿生環境的多機器人協同控制
Development of coordination control for multiple FPV robots using ROS2 and Unity digital twin environment
學生 : 曾裕翔
---
本論文實作一套建構於 ROS 2 架構下的多機器人協作與數位孿生系統,目標是實現多台自主移動機器人間的協同作業與模擬驗證。系統整合四大模組:中央控制、車體導航控制、機械手臂控制與視覺辨識,並透過 ROS 2 平台進行即時資料傳輸與任務協調。
在開發過程中,本論文因只使用機械手臂上的單一深度相機做物件定位,也就是使用第一人稱視角(First-Person View, FPV)操控機器人。相較於傳統的第三人稱視角(third person View)系統,FPV 操作在導航與物體夾取任務上具更高複雜度。
本論文開發基於路徑導航與深度相機資訊的自動化流程如下:首先,機器人透過導航模組移動至目標物附近;當深度相機偵測到物體進入視野,系統便將控制權由導航模組移交給視覺模組。此階段,透過物件辨識技術判斷物體是否位於畫面中心,並依據物體與畫面中心的像素距離,持續微調機器人位置,以穩定接近目標。
當機器人進入指定距離內,開始調整機械手臂,使手臂上的深度相機對準物體中心,並執行向前伸出的夾取動作。夾取成功後,會將自身的座標資訊以 ROS topic 形式傳送給其他機器人。
第二台機器人收到座標後,依相同流程搜尋並微調定位目標,夾取第一台機器人手中的物體,**達成多**機器人間的協作傳遞任務。
本系統先於自行開發的基於 Unity 的數位孿生環境中測試與驗證,此一數位孿生環境完全複製實體環境的 ROS 為基礎的控制系統,除了可使虛實環境同步運作外,也可獨立進行模擬。實驗結果顯示,本系統可先於 Unity 的數位孿生環境中完成任務模擬與測試,確認系統穩定性與機構安全後可以直接部署至實體機器人,有效提升開發效率與操作可靠性。
關鍵字 : ROS2、多機器人協同運作、數位孿生、Unity、FPV Object Grasping
This thesis presents the implementation of a multi-robot collaboration and digital twin system based on the ROS 2 framework. The objective is to enable coordinated operations and simulation validation among multiple autonomous mobile robots. The system integrates four key modules: central control, mobile robot navigation, robotic arm manipulation, and visual recognition, all connected through the ROS 2 platform for real-time data transmission and task coordination.
During development, only a single depth camera mounted on the robotic arm is used for object localization, resulting in robot control from a First-Person View (FPV) perspective. Compared to traditional third-person view systems, FPV-based operation increases the complexity of navigation and object grasping tasks.
An automated workflow based on path navigation and depth camera input is developed as follows: first, the robot navigates near the target using the navigation module. Once the depth camera detects the object, control is handed over to the vision module. The system then uses object recognition to determine whether the object is centered in the camera view and continuously adjusts the robot's position based on the pixel offset to steadily approach the object.
When the robot reaches a predefined distance, it adjusts the robotic arm to align the depth camera with the object center and executes a forward grasping motion. Upon successful grasping, the robot sends its coordinates to other robots via a ROS topic.
The second robot, upon receiving the coordinates, follows the same procedure to locate and align with the target, then grasps the object from the first robot—completing the collaborative object handover between robots.
This system is first tested and validated in a custom-built Unity-based digital twin environment that fully replicates the ROS-based control architecture of the physical setup. This allows synchronized operation between the virtual and real environments, as well as independent simulation. Experimental results show that the system can perform task simulation and validation in the Unity environment before deployment to the physical robots, significantly improving development efficiency and operational reliability.
Keywords : ROS 2, Multi-Robot Collaboration, Digital Twin, Unity, FPV Object Grasping
## 基於微控制器之增強型低丟包高刷新率 Micro-ROS 通訊
**Enhanced Low-Loss, High-Rate Micro-ROS Communication on Microcontroller**
學生:鍾博丞
---
基於使用 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 adopted 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 wanted 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.
Keywords: Embedded Real-time System, Robot OS, Linux Kernel
## 整合正逆向運動學於四足機器人之遞迴式步態生成
Recursive Gait Generation for Quadruped Robots via Integrated Forward and Inverse Kinematics
學生 : 黃振輔
---
本論文旨在設計與實作一套四足機器狗系統,以解決其步態生成及姿態規劃問題。
透過正逆運動學公式推導,計算出對應於四肢的 12 顆伺服馬達的關節角度,以驅動機器狗執行各項動作。系統首先於數位孿生環境中進行模擬驗證,以確認所產生的姿態符合預期,並最終部署於實體四足機器狗上進行實際測試。
在姿態規劃方面,本研究設計一套基於樹狀結構的姿態關係圖,從機器狗初始的靜止姿態出發,依循以下四個步驟推導出可行的姿態節點:第一步,改變機身姿態,並透過逆向運動學計算出馬達角度,再使用正向運動學推算機身與各關節的實際位置與姿態。第二步,將該姿態導入數位孿生環境中進行驗證,以確認其是否符合靜態穩定條件。第三步,若經驗證為穩定姿態,則將此節點納入本論文所使用的樹狀結構資料集。本系統考慮六個自由度,包括三個平移自由度(上下、前後、左右)與三個旋轉自由度(繞 X、Y、Z 軸),並透過遞佪搜尋不斷擴展姿態資料集,直到機器狗無法維持穩定姿態為止。第四步,結合樹狀結構與抬腳時機的規劃,使四足機器狗能順利完成前進與橫移動作。
在運動控制方面,本研究設計一套簡潔且模組化的控制架構,採用 ROS2 (Robot Operating System 2) 作為中介通訊與訊號處理平台,並結合數位孿生進行動作模擬與視覺化驗證,可於虛擬環境中快速進行實驗與參數調整,並且可以直接移植至實體機械狗。整體硬體系統使用,但不限於 12 顆伺服馬達驅動,對應四足的三關節設計。
目前已實作四種運動模式,分別為:原地姿態調整、單腳抬升前進、雙腳同時抬升前進,以及橫向移動。
關鍵字 : ROS2、機械狗、FreeRTOS、運動學、運動控制
This thesis aims to design and implement a quadruped robotic dog system to address challenges in gait generation and posture planning. By deriving forward and inverse kinematics equations, enabling the robot to perform various movements. The system is first validated through simulations in a digital twin environment to ensure the generated postures meet expectations, and is subsequently deployed on a physical quadruped robot for real-world testing.
For posture planning, this study proposes a tree-based posture graph, beginning with the robot’s initial static posture. The planning process starts by modifying the robot’s body posture and computing the corresponding motor angles using inverse kinematics. Forward kinematics is then applied to estimate the actual positions and orientations of the body and its joints. Next, the generated posture is tested within the digital twin environment to verify whether it satisfies static stability conditions. If confirmed as stable, the posture is added to the tree-structured dataset constructed in this study. The system considers six degrees of freedom—three translational (vertical, forward/backward, lateral) and three rotational (roll, pitch, yaw)—and uses recursive searching to continuously expand the posture dataset until no further stable postures can be found. Finally, by combining the posture tree with foot-lifting timing strategies, %
the quadruped robot is enabled to perform both forward and lateral locomotion smoothly.
In terms of motion control, this study develops a concise and modular control architecture, utilizing ROS2 (Robot Operating System 2) as the middleware for communication and signal processing. The digital twin environment is used to simulate and visualize motion, enabling rapid testing and parameter tuning in a virtual setting, with seamless deployment to the physical quadruped robot. The hardware system is primarily driven by 12 servo motors, corresponding to the three-joint design of each of the robot’s four legs.
Currently, four motion modes have been implemented: in-place posture adjustment, single-leg stepping, dual-leg stepping for forward locomotion, and lateral movement.
Keywords: ROS2, Quadruped Robot, FreeRTOS, Kinematics, Motion Control
## 應用 LSTM 模型於機器人控制系統之轉移函數及控制訊號估測:以數位孿生為基礎
Application of LSTM Models for Transfer Function and Control Signal Estimation in Robotic Control Systems: A Digital Twin-Based Approach
學生 : 林庭琮
---
本論文使用資料驅動的方式搭配上 LSTM 模型,求得近似的控制系統轉移函數,並對模型進行修正、行為分析與極點零點之比對。
為了驗證此方法的可靠性,我們先於虛擬的系統進行實驗,再將此論文的方法套用在實體馬達系統上,虛擬控制系統的驗證方式如下:首先建立數個階數不同的受控體 (Plant) 與對應之 PID 控制器兩個元件的簡單負回授系統,以多種不同的輸入訊號作為測試,並收集巨量的測試資料,以之完成 LSTM 模型訓練後進行此模型的系統頻率響應之轉換,並經過正規化後與上述系統的轉移函數進行極點與零點的比較,證明此一方法的可行性後,隨後在使用伺服馬達之實體動態系統中同樣以透過資料驅動的方式求得系統轉移函數,以利後續控制器的調整以及控制訊號的設計。
本論文另涵蓋使用 ROS2 環境之數位孿生平台,測試並模擬移位機器人及人體機器人模型在 Unity 物理引擎驅動下的移動情形並進行受力分析,作為安全性評估的依據,未來將整合此學習模式於 Unity 中移位機器人的馬達控制,以達到完整模擬實體場域中的移位機器人之控制情形。
關鍵字:控制系統、系統轉移函數、機器學習、數位孿生、ROS2、Unity
This work employs a data-driven approach combined with an LSTM model to approximate the transfer function of a control system. The model is then refined, analyzed in terms of system behavior, and compared based on its poles and zeros.
To verify the reliability of this method, experiments are first conducted in a virtual environment before applying the approach to a physical motor system. The validation process in the virtual control system is as follows: several simple negative feedback systems are constructed, each consisting of a plant with different system orders and a corresponding PID controller. Various input signals are used for testing, and a large amount of data is collected. After training the LSTM model with this dataset, the system’s frequency response is obtained and normalized. The resulting transfer function is then compared with that of the original system by analyzing poles and zeros to demonstrate the feasibility of the proposed method. Once validated, the same data-driven approach is applied to a physical dynamic system using a servo motor to estimate its transfer function, facilitating subsequent controller tuning and control signal design.
Additionally, this work includes the development of a digital twin platform using the ROS2 environment to test and simulate the movement of a transfer-assist robot and a human-like robot model under Unity’s physics engine. A force analysis is conducted as the basis for safety evaluation. In the future, this learning-based approach will be integrated into the motor control of the transfer robot in Unity, enabling full simulation of its behavior as it would occur in a real-world environment.
Keywords: control system, system transfer function, machine learning, digital twin, ROS2, Unity