How to generate a world with many objects in it ?

asked 2021-06-30 09:11:11 -0500

I am trying to make a somewhat realistic simulation environment for our robots, but Gazebo struggles to load worlds with more than 1.000 objects in them. Ideally, I'd like to push it to 10.000 + objects. The objects are simple: about 96kB per mesh, and there are only a few unique meshes (about 10).

I was wondering if anyone ever tried to do something like that and managed to have Gazebo working.

I tried with Gazebo 9.0 and 11.0, paired with ROS Melodic on a machine with 128GB of ram, a 24 cores CPU and 2 RTX3090.



edit retag flag offensive close merge delete


hello, did you try to remove unecessary collision check ? Choosing which collision to disable depend on your particular problem, but I think collision checking is among the most cpu consuming.

Clément Rolinat gravatar imageClément Rolinat ( 2021-07-01 10:14:47 -0500 )edit

Sounds like a lot to manage, even with that much processing power. That many unique meshes 10*1,000 is pretty high.

Just out of curiosity, can your machine load models like the Apollo landing site or another large terrain is an appropriate amount of time and then keep the real time near 1 if you place a few other objects on the surface? If it can't do that, I suspect you won't be able to get this to work.

Adam Gronewold gravatar imageAdam Gronewold ( 2021-07-06 19:55:15 -0500 )edit

I didn't try that. I suspect it is related to gazebo having to tell ROS where each object of the scene is. To circumvent that, I am working on a plugin that allows the world to behave like Minecraft and its chunks system. Basically, only load chunks in a given radius from the robot. Right now it's a bit slow but it works. gravatar ( 2021-07-12 08:20:01 -0500 )edit