carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.13k stars 3.59k forks source link

no-rendering mode does not improve FPS under a lot of traffic #4011

Closed GarethZhang closed 3 years ago

GarethZhang commented 3 years ago

Hi all,

I am trying to create a lot of traffic in Carla, e.g. Town06_Opt, by adding 1000 vehicles and 100 pedestrians. Currently, I am experiencing 4 FPS simulation speed, and it would be great if I can get some advice on my current set up and possible improvements.

To elaborate on what I am doing, I am trying to simulate a very busy traffic scene and at the same time to record live LiDAR scans from the ego vehicle.

The following are my current simulation setup:

  1. Hardward: Ryzen 3800X + RTX 2060 Super + 32 GB RAM
  2. Simulation is done in Unreal Engine Editor and I have turned off the option to "Use less CPU in background"
  3. Simulation is done in synchronomous mode and with no-rendering option turned on.

Here are the commands I executed to mimic a very busy traffic:

  1. python3 spawn_npc.py -n 400 -w 100 --sync to spawn actors (fewer than I actually need) using example script. Note that FPS drops from 60 FPS to 5 FPS after this.
  2. python3 open3d_lidar.py --semantic to create an ego vehicle with LiDAR to record scans
  3. python3 no_rendering_mode.py --no-rendering to enable no rendering mode

Some questions I have:

  1. Having no rendering mode on does not seem to affect FPS. I thought it was supposed to help a lot under busy traffic according to: https://carla.readthedocs.io/en/latest/adv_rendering_options/#quality-levels
  2. Is there a way to identify which is the bottleneck in my simulation pipeline? And some advice on how to improve this?

Thanks! Any help is appreciated!

corkyw10 commented 3 years ago

Hi @GarethZhang I can see your question was addressed in the forum. I will leave a link here for anyone interested and close this issue.

GarethZhang commented 3 years ago

@corkyw10 Thanks!