micro-ROS / micro-ROS-Agent

ROS 2 package using Micro XRCE-DDS Agent.
Apache License 2.0
97 stars 51 forks source link

Insanly huge agent cpu spike #190

Open kalaajiahmad opened 1 year ago

kalaajiahmad commented 1 year ago

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)

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):

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!