Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traffic simulation is struggling to simulate when there are lots of NPC's #110

Open
mozhoku opened this issue Jul 10, 2024 · 4 comments
Open
Assignees
Labels
type:bug Software flaws or errors. type:enchantment Improve existing feature

Comments

@mozhoku
Copy link
Collaborator

mozhoku commented Jul 10, 2024

Simulation slows down when there are lots of NPC's in the scene.

@mozhoku mozhoku added the type:bug Software flaws or errors. label Jul 10, 2024
@WJaworskiRobotec
Copy link
Collaborator

Please specify target number of NPCs @mozhoku that we would like to support and test

@sasa42
Copy link

sasa42 commented Jul 17, 2024

I really like this old ecs example for visual traffic and pedestrians.
https://github.com/maajor/OSMTrafficSim

Probably it could be useful to solve some general performance issues.
On my PC i can simulate around 50 but the framerate drops to 8fps.
The ecs example can run 10 000+ at high framerates.

Another paid Assets i tested....
https://assetstore.unity.com/packages/templates/systems/dots-traffic-city-220203

shows similar dots method.

@xmfcx xmfcx moved this to Backlog in Autoware Labs Sep 3, 2024
@lchojnack lchojnack moved this from Backlog to In Progress in Autoware Labs Sep 5, 2024
@lchojnack
Copy link
Collaborator

I've started to work on this task. I'm exploring the posibility to use the ECS (Entity Component System) for traffic simulation.

@mozhoku mozhoku added the type:enchantment Improve existing feature label Sep 19, 2024
@xmfcx xmfcx removed this from Autoware Labs Oct 4, 2024
@lchojnack
Copy link
Collaborator

lchojnack commented Dec 17, 2024

The current task progress:

  • Basic ECS Traffic Simulator is ready -> NPCs drive on lanelet
    • There is around 80 FPS for 1000 NPCs
      Note: The final avg FPS can be lower when more features as obstacle detection or traffic rules will be added
video-2024-12-17-11-55-24.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Software flaws or errors. type:enchantment Improve existing feature
Projects
Status: In Progress
Development

No branches or pull requests

4 participants