micro-ROS / micro-ROS/micro-ROS-demos
ping_pong rand() is not seeded so device ids are likely the same across nodes
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 101
- Forks
- 35
- Ø Merge
- 4 T. 16 Std.
- Gemergte PRs (30 T.)
- 3
Beschreibung
Issue template
- Hardware description: docker only
- RTOS: N/A
- Installation type: a containerized version of https://micro.ros.org/docs/tutorials/core/first_application_linux/
- Version or commit hash: b86db303dd7aed7ed34de2e1c2f94300c2ba7e4e
- this patch to fix the stack corruption https://github.com/micro-ROS/micro-ROS-demos/pull/96
Steps to reproduce the issue
Build this repo on your target
cd /ros2_ws
. /opt/ros/humble/setup.bash
. install/local_setup.bash
colcon build --packages-select micro_ros_demos_rclc
/ros2_ws/install/micro_ros_demos_rclc/lib/micro_ros_demos_rclc/ping_pong
Expected behavior
I expect to see ping/pong messages
Actual behavior
You will see only Ping or only Pong messages
Additional information
Running on Ubuntu 24.04 host, docker compose driving a pair of containers to pubsub.
In my testing, seeding random with a nanosecond clock is sufficient to generate different device ids. I'd file a PR but I'd like to see if this was intended or maybe just an artifact of launching two container simultaneously
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der ausführbaren Datei ping_pong im Paket micro_ros_demos_rclc und verfolge, wie seine Geräte-IDs und der Zustand von rand() initialisiert werden. Reproduziere das Problem mit den bereitgestellten colcon-Build- und Container-Befehlen und überprüfe anschließend, dass die beiden Container sowohl Ping- als auch Pong-Nachrichten mit unterschiedlichen IDs austauschen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c
- Bereich
- distributed-systems, embedded-iot
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100