RosConnection.Update() spiking to >180ms execution. This thread-blocking causes bad frame spikes when Playing.
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Domínio
- performance, robotics
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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)
- Linguagem predominante
- C#
- Estrelas
- 2.6k
- Forks
- 473
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Unity-Technologies/Unity-Robotics-Hub
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
-
ROS2,ActionAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
-
Is the project deprecated?Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 20/100
-
Force/Torque sensorAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 15/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
Unity-Technologies/Unity-Robotics-Hub#433 · 1 comentário ·
Todas as issues de Unity-Technologies/Unity-Robotics-Hub
Issues semelhantes
-
DXF with empty names failsAbertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 3 dias
-
bug python
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
Mantenedores costumam responder em até 13 dias
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
juandresrodca/AdminForge#66 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
umbraco/Umbraco.Automate#612 ·
Mantenedores costumam responder em até 1 dia