micro-ROS / micro-ROS/micro-ROS-Agent

Insanly huge agent cpu spike

未關閉
#190 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C++
星號
201
分支
111
平均合併
1 天 6 小時
30 天內合併 PR
10

描述

**Describe the bug**
Hi,
I am encountering huge CPU usage of the Micro ros agent running from docker as follows:
`docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:foxy udp4 -p 8888`
![MicrosoftTeams-image (23)](https://user-images.githubusercontent.com/54395427/234046041-e96a0c4a-b77d-44cd-b1b8-bd807258a5b4.png)

**To Reproduce**
Steps to reproduce the behaviour:
1. Clone repo 'micro_ros_arduino' Foxy Branch
2. Flash 8 ESPs with it (Client Key unique for each Esp)
3. Run Publisher example for 3 hours
4. CPU spike happens after around 3h
5. See CPU spike on htop

**Expected behaviour**
A normal usage of ~100% CPU usage max at all times.

**System information (please complete the following information):**
- OS: Ubuntu 20.04
- ROS 2 Foxy
- Hardware: 8x ESP32 micro-controllers running agent and client version 2.3.0

what can be the possible reason behind such a huge CPU usage?
Observation from my tests: it happens exponentially were it starts to increase to 200 then 500 then 1000%
And after the agent reaches past 200%, the Esp32 loses connection with the agent and fails to publish any messages.
Any help is much appreciated!

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,在回報的 Ubuntu 20.04 與 ROS 2 Foxy 設定上使用八個 ESP32 用戶端執行提供的 Docker 指令,然後在 Publisher 範例執行期間監控 htop。重現 CPU 使用率延遲增長與連線遺失,識別造成該問題的 agent 行為,並驗證在所有用戶端持續發佈的同時 CPU 使用率保持穩定。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp, docker
領域
distributed-systems, embedded-iot, networking, performance
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。