micro-ROS / micro-ROS/micro-ROS-Agent
Insanly huge agent cpu spike
还没有人认领这个 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`

**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!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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