You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.6 KiB
Markdown
100 lines
2.6 KiB
Markdown
這是天雷系統的專案
|
|
|
|
|
|
|
|
===
|
|
## 功能簡介
|
|
1. mavlink 多對多支援平台
|
|
2. 不允許進到 ros 系統有相同 sysid
|
|
3. 假設一台載具上所有 component 共用同一 socket
|
|
|
|
===
|
|
## 運行環境
|
|
|
|
### 專案核心框架
|
|
1. ROS2 Humble
|
|
2. Python 3.8.10
|
|
|
|
### 必要相依套件及版本
|
|
- Python
|
|
[Package] fc_network_adapter
|
|
1. pymavlink -> Version: 2.4.42
|
|
2. conda-forge 中的 pyserial-asyncio
|
|
3. importlib_metadata -> Version: 8.5.0
|
|
4. setuptools -> Version: 58.2.0 (版本太新不行)
|
|
5. pyserial-asyncio
|
|
[Package] GUI
|
|
1. testresources
|
|
2. websockets
|
|
3. PyQt6
|
|
4. PyQt6-WebEngine
|
|
|
|
- ROS2
|
|
1. source ~/ros2_humble/install/setup.bash
|
|
2. geographic_info (https://github.com/ros-geographic-info/geographic_info.git) 已經作為 submodule 放在 external
|
|
3. angles (https://github.com/ros/angles.git) 已經作為 submodule 放在 external
|
|
4. mavros_msgs (https://github.com/mavlink/mavros) 這個專案中的一個資料夾 這邊手動複製的
|
|
|
|
### 開發用輔助專案
|
|
1. Gazebo Garden
|
|
2. Ardupilot
|
|
|
|
===
|
|
## 使用說明
|
|
Clone 專案後 請先執行這些指令
|
|
```bash
|
|
# 1.同步 submodule
|
|
cd ~/AirTrapMine
|
|
git submodule init
|
|
git submodule update
|
|
# 2. build 需要的 package
|
|
colcon build --packages-select angles geographic_msgs
|
|
colcon build --packages-select mavros_msgs # 這個依賴前面的
|
|
colcon build --packages-select fc_interfaces # 自己定義的
|
|
|
|
```
|
|
1.
|
|
主要專案 fc_network_adapter 請一律在 ~/AirTrapMine/src/ 路徑下 以模組化啟動程式
|
|
```bash
|
|
# 記得先開啟 依賴 Package 到 overlay
|
|
. ./install/local_setup.bash
|
|
# 範例
|
|
cd ~/AirTrapMine/src/ # 這是範例!!!
|
|
python -m fc_network_adapter.fc_network_adapter.mainOrchestrator
|
|
python -m fc_network_adapter.tests.demo_integration
|
|
python -m someotherpkg.src.example_wholeMoving
|
|
```
|
|
|
|
2.
|
|
GUI 介面
|
|
在 ~/AirTrapMine/src/GUI 路徑下 直接啟動
|
|
```bash
|
|
cd ~/AirTrapMine/src/GUI
|
|
python gui.py
|
|
```
|
|
|
|
===
|
|
## 資料夾說明
|
|
1. unitdev 為各自協作者做開發時的測試區
|
|
01 -> 晉凱(ken)
|
|
02 -> 其宇(chiyu)
|
|
03 -> 文鈞
|
|
04 -> 倫渝
|
|
2. fc_network_adapter (核心)
|
|
建立、維護與飛控韌體的連接
|
|
構築 mavlink 封包
|
|
處理無線模組的通訊格式 (XBee)
|
|
--同時處理與 Gazebo 的 ardupilot_plugin 溝通的 FDM/JSON 訊息 (移除)--
|
|
3. fc_interfaces (重要)
|
|
自定義的 ROS2 介面檔
|
|
4. fc_network_apps
|
|
與 fc_network_adapter 銜接做高階功能包裝的應用小程式 利於開發GUI或其他應用
|
|
使用者的外層包裝
|
|
5. someotherpkg
|
|
如何使用 fc_network_apps 的範例檔案
|
|
6. GUI
|
|
由 PyQt6 開發的互動式介面
|
|
N. logs 是執行時期的記錄檔
|
|
|
|
===
|