ken910606
|
ebd219c88e
|
2.8.0 xbee and ws command
|
1 month ago |
wenchun
|
1db3445e86
|
refactor(GUI): 群組切mode/套用速度改並發(asyncio.gather),清per-drone client過期註解
- gui.py: _handle_group_mode_change 與 _on_engagement_apply_speed 由
單一 async 函式內 for 迴圈逐台 await(序列化,最壞 N×timeout)改為
asyncio.gather 並發,各自等各自 ACK;行為語意不變。
- communication.py: set_mode/arm_drone/set_speed 前 3 處過期註解
「避免多機並行時的競態條件」更正為共用 client + target_sysid 路由
(OOM 修復後已非 per-drone、無 per-drone 狀態)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
1 month ago |
wenchun
|
6ef7d3a7a6
|
feat(GUI): 交戰任務編排器 MissionOrchestrator(S0-S2 + 高度分層/前置攔截/速度比例限速)
在既有 MissionExecutor 之上加一層「任務大腦」,串起 ABC 對抗流程:
A 組偵察 → 偵測敵機 → 手動確認重編隊 → A+B 四機前進追敵 → 足夠近展開包圍。
全部落在 src/GUI/。
新增 mission_orchestrator.py:
- MissionOrchestrator 階段狀態機 IDLE→WATCH→DETECTED→PURSUE→ENCIRCLE。
- PURSUE/ENCIRCLE 用「瞬時隊形」而非路徑跟隨(每 tick 給每台目標點),
修掉移動目標下 wp_index 歸零 + follower 外推造成的往返振盪。
- 偵測 latch(≤R_detect 持續 dwell)、moving-target 重算(位移≥2m 或封頂 1s)、
切圓 hysteresis(R_engage=15 進、R_engage_exit=20 退)。
- 高度分層 _alt_for:A 組走上層、B 組走下層(不低於地面下限),
PURSUE/ENCIRCLE 都套用 → 消掉同高度交叉撞機風險。
- 前置攔截 _aim_point:GPS 差分估敵速,瞄「敵位+敵速×lead_time」的攔截點,
治純追尾追不上;敵機靜止時退化為瞄當下。
- EngagementPanel 交戰面板:敵機下拉、A/B 組下拉、即時距離讀數、階段顯示、
重編隊/停止、以及「套用速度」(友機 V + 敵/友比例 r → DO_CHANGE_SPEED)。
mission_executor.py:加 complete_stops=False(hover-hold)+ update_plan()
(熱替換航點、保留 RUNNING 閉環狀態)。
communication.py:加 set_speed()(用共用 client 泛用方法發 DO_CHANGE_SPEED(178),
維持 GUI-only scope)。
gui.py:新增「交戰」分頁、engagement timer(5Hz)、orchestrator 接線、
_on_engagement_apply_speed(友方下 V、敵方下 r×V、同步 friendly_speed)。
SITL 實測通過:高度分層 A/B 正確分開、前置攔截追得上、套用速度後追擊/包圍穩定收斂。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
1 month ago |
wenchun
|
8d65e92634
|
fix(GUI): 共用 command/position client 啟動預建,修切mode觸發的OOM/CPU暴衝
實飛/SITL 對無人機下第一個控制指令(切 mode)時,python GUI 行程
CPU 衝到 112%、記憶體一路爬向 30GB 被 OOM killer 幹掉。
根因(切 mode 是執行期第一個走 get_or_create_client 的動作):
- get_or_create_client / get_or_create_position_client 原本 per-drone
於執行期新建 ROS2 node 並 executor.add_node()。
- CPU:add_node 從 asyncio/Qt 執行緒呼叫,同時 _ros_spin_thread 在另一
執行緒 spin_once 同一個 SingleThreadedExecutor → wait set 損毀 → 空轉。
- 記憶體:執行期新建 node = 新 DDS participant,discovery 撞壞封包 →
FastRTPS bad_alloc。解釋了「開機沒事、切 mode 才炸」。
兩個 client 都只打單一 service(send_command_long / pos_global_int),
靠 request 的 target_sysid 路由、無 per-drone 狀態 → 每台一個節點無意義。
修法:改成「共用節點 + 啟動預建 + 執行期只重用」。
- communication.py: 兩個 per-drone dict → 單一 command_long_client /
position_target_client;新增 init_shared_command_clients();
get_or_create_*(drone_id=None) 回傳共用 client(僅留一次性 lazy fallback)。
- gui.py: executor 設好後、spin thread 啟動前於主執行緒預建;cleanup 改
銷毀兩個共用節點。
飛行中不再新建 participant + add_node 不再跨執行緒 → 兩症狀同時消。
SITL 切 mode 實測不再暴衝。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
1 month ago |
ken910606
|
f141311173
|
2.7.0 logs
|
3 months ago |
ken910606
|
5231cffcb2
|
Update GUI 2.6.0: trajectory, color, window, serial JSON
|
4 months ago |
ken910606
|
81de964778
|
Merge branch 'master' of http://140.120.108.238:49308/chiyu1468/AirTrapMine
|
4 months ago |
ken910606
|
c75537a977
|
Update GUI 2.5.0: Drone reboot
|
4 months ago |
wenchun
|
8c62f891a8
|
fix(GUI): 修正實飛三個關鍵 bug — 高度偏移累加、Leader-Follower 不動、起點重疊
1. mission_planner: origin_alt 固定為 0,避免 GPS 橢球高度疊加到相對高度指令
2. mission_planner: 移除圓弧插值,直接用路徑點作為航點,消除微航點導致飛控無法執行
3. mission_planner: lookup 改為外推(extrapolate),解決偶數 rank 起終點重疊
4. communication: UDP/Serial 的 GLOBAL_POSITION_INT 補上 relative_alt 欄位
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
4 months ago |
ken910606
|
0b41ea0a1e
|
Update GUI 2.3.1
|
4 months ago |
ken910606
|
d2a5f6fad7
|
Update GUI 2.3.0: JSON in Serial
|
5 months ago |
ken910606
|
edd15df3fc
|
Update GUI 2.1.0: logs history tab, drone panel attitude, linear twist overview
|
5 months ago |
ken910606
|
b9d6e0e2e0
|
Update GUI 2.0.7 group selected list
|
5 months ago |
wenchun
|
0edc477df8
|
feat(mission): virtual-leader path following + 固定領隊 + barrier
- mission_planner: Leader-Follower 改用 arc-length 參數化(virtual
leader),_build_center_path 以同心圓弧連接直線段,銳角退化成 hover
單點並在該點放 rendezvous barrier,避免暴衝與編隊交叉
- mission_planner: rank 改以輸入順序為準,不再對投影排序,避免浮點噪音
導致 run-to-run leader 漂移
- mission_group / gui: 新增 leader_drone_id 與「領隊」下拉選單,handle_
route_confirmed 把指定領隊重排到 rank 0,整個縱隊順序固定如軍隊行進
- mission_executor: rendezvous barrier 釋放邏輯、fallback LOITER、send
retry;加 barrier_timeout 保護
- command_sender / communication / navigation: 配合 setpoint 送達與
Ros2 bridge 更新
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
5 months ago |
ken910606
|
fc00ecb762
|
Update GUI 2.0.6 components and longCommand
|
5 months ago |
ken910606
|
2c38376f9c
|
Update master with local 2.0.5
|
5 months ago |
ken910606
|
f28dcca361
|
Update master with local 2.0.4
|
5 months ago |
ken910606
|
f34693a400
|
longCommand
|
6 months ago |
ken910606
|
71321d4839
|
Update GUI 2.0.0 from local
|
6 months ago |
ken910606
|
2937610938
|
Merge GUI 1.0.1 from ken
|
6 months ago |