changing rmw of the auto-generated ros2 node leads to increased CPU consumption

2 ビュー (過去 30 日間)
Dmitriy
Dmitriy 2025 年 1 月 17 日
コメント済み: Josh Chen 2025 年 1 月 27 日
Hello, I run a node on Ubuntu 20.04 (ros2 humble) with a standard rmw (fastrtps), look in htop and see 10-15% CPU load by my node, stop the node, change the rmw on cyclondds, start it and see the CPU load 35-40%...I tried to rebuild the node with the selected cyclondds in the Matlab ros settings - it didn’t help
Can someone explain how to fix it?
  2 件のコメント
Walter Roberson
Walter Roberson 2025 年 1 月 17 日
What happens if you stop the node, do not change the rmw, and then start the node again? It would be interesting to see whether it is the act of changing the rmw that causes the problem or the act of starting the node again.
Likewise it would be interesting to see what happens if you change the rmw to the same value it already is (to test whether the act of writing to the rmw triggers the problem.) And it woud be interesting if you were to change rmw back to its original value after running the second time, to test whether the problem is related to the range of the new value you changed it to.
Josh Chen
Josh Chen 2025 年 1 月 27 日
Hi Dmitriy,
For Simulink code generation perspective, we generate exactly same code no matter wich rmw_implementation been selected.
I wonder if this behavior is caused by difference between fastrtps and cyclonedds by nature? Looks like people are seeing different CPU usage comparing these two in the past.
-Josh

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeROS Network Connection and Exploration についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by