RosConnection.Update() spiking to >180ms execution. This thread-blocking causes bad frame spikes when Playing.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- performance, robotics
Direzione di ricerca
Reproduce the five-camera setup with Unity 2022.3.10f1, the Unity Visualization package, and the v0.7.0 TCP Connector and endpoint. Start with the Unity Profiler around RosConnection.Update() and compare the reported frame spikes against the TCP image-streaming setup. Done means the source of the blocking delay is identified and the recurring spikes are addressed or documented with evidence.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
I am getting massive stutters when streaming images from ROS. When using the Editor profiler, it's apparent that the RosConnection.Update() invocation is blocking the main thread for >180ms. I am also using
Note: I am using 5, 720x720 images (~45fps per cam)
To Reproduce
Steps to reproduce the behavior:
- Start the Unity TCP endpoint specifying 127.0.0.1 as the IP address (via the bash terminal)
- Set up 5 visualizers using the Unity Visualization package, each connecting to a different ROSTopic (so each visualizer window is subscribed to a different Image topic)
- Open up the Unity Profiler window
- Observe the lag spikes!
Console logs / stack traces
No errors thrown.
Expected behavior
I guess I would expect that the Update() invocation shouldn't take so long to compute. 90% of the other frames that render the 5 camera views are smooth. However, when the frame lag spike occurs, it's very noticeable so I'd expect that any delay on the Update() function > 30ms is concerning.
Screenshots
Screenshot of frame showing massive compute time for RosConnection.Update():
Screenshot of frame showing normal compute time for RosConnection.Update()
Environment (please complete the following information, where applicable):
- Unity Version: Unity 2022.3.10f1
- Unity machine OS + version: Ubuntu 20.04
- ROS machine OS + version: Ubuntu 20.04, ROS Noetic
- ROS–Unity communication: localhost via Unity-ROS TCP Endpoint (C++ version)
- Branch or version: [v0.7.0 for the Unity-ROS TCP Connector for Unity] [v0.7.0 for the Unity-ROS visualization package] [v0.7.0 for Unity-ROS TCP endpoint]
Additional context
These delay spikes occur relatively frequently (>2 times per second)
- Lingua principale
- C#
- Stelle
- 2.6k
- Fork
- 473
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Unity-Technologies/Unity-Robotics-Hub
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
ROS2,ActionAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Is the project deprecated?Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
-
Force/Torque sensorAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Unity-Technologies/Unity-Robotics-Hub#433 · 1 commento ·
Tutte le issue di Unity-Technologies/Unity-Robotics-Hub
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
umbraco/Umbraco.Automate#612 ·
I maintainer di solito rispondono entro 1 giorno
-
崩溃日志只按 CRLF 分行Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PCL-Community/PCL-CE#3872 ·
I maintainer di solito rispondono entro 1 giorno
-
type:task ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
elsa-workflows/elsa-foundation#5253 ·
I maintainer di solito rispondono entro 1 giorno