When ros2 creates a new topic, the CPU usage is high
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- embedded-iot, performance, robotics
Research direction
Reproduce the report by starting micro_ros_agent through ros2 launch, monitoring its process with htop, and creating the topic with the shown ros2 topic pub command. Compare the CPU spike with the rclcpp publishing case and trace the topic-creation path in micro_ros_agent. Done means the cause is identified and topic creation no longer causes the reported excessive CPU usage.
Written by the indexing model from the issue text.
Description
- Hardware description: N/A
- RTOS: Freertos
- Installation type: micro_ros_setup
- Version or commit hash: humble
Steps to reproduce the issue
- Start micro_ros_agent through ros2 launch;
- htop -p
pidof micro_ros_agentto check the change of CPU usage - Publish a message through ros2 topic pub /avoidance_status std_msgs/msg/UInt8 "{data: 0}", and you will find that the CPU usage soars from 7% to 30%, and then falls back to a stable state of 7%;
- Create a publishing topic through rclcpp, only create it once, send at 20hz frequency for 30s, stop for 3min, and then send again..., the CPU usage only changes when starting the node, and there is no fluctuation during the middle operation.
Is there any way to solve this problem? If the CPU is insufficient, the main controller will not be able to run.
- Dominant language
- Shell
- Stars
- 509
- Forks
- 183
- Avg merge
- 22h 26m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micro-ROS/micro_ros_setup
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
micro-ROS/micro_ros_setup#814 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
micro-ROS/micro_ros_setup#809 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
micro-ROS/micro_ros_setup#808 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
micro-ROS/micro_ros_setup#806 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
micro-ROS/micro_ros_setup#803 ·
All issues in micro-ROS/micro_ros_setup
Similar issues
-
Update to NCCL 2.32 Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
conda-forge/nccl-feedstock#166 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
pop-os/plymouth-theme#43 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hykilpikonna/hyfetch#545 ·
-
on hold T: core-bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100