micro-ROS / micro-ROS/micro_ros_setup

When ros2 creates a new topic, the CPU usage is high

Offen
#757 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
509
Forks
183
Ø Merge
22 Std. 26 Min.
Gemergte PRs (30 T.)
7

Beschreibung

- Hardware description: N/A
- RTOS: Freertos
- Installation type: micro_ros_setup
- Version or commit hash: humble

Steps to reproduce the issue
1. Start micro_ros_agent through ros2 launch;
2. htop -p `pidof micro_ros_agent` to check the change of CPU usage
3. 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%;
4. 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere den Bericht, indem du micro_ros_agent über ros2 launch startest, seinen Prozess mit htop überwachst und das Topic mit dem gezeigten ros2 topic pub-Befehl erstellst. Vergleiche den CPU-Spike mit dem rclcpp-Publishing-Fall und verfolge den Pfad zur Topic-Erstellung in micro_ros_agent. Erledigt ist die Aufgabe, wenn die Ursache identifiziert ist und die Topic-Erstellung nicht mehr die gemeldete übermäßige CPU-Auslastung verursacht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
embedded-iot, performance, robotics
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.