Running physics first time takes longer

asked 2017-06-27 13:52:58 -0600

hamzamerzic gravatar image

I noticed that running Gazebo for the first time takes longer than subsequent times. I noticed this when subscribing to /gazebo/get_physics_properties service from ROS. What is being done this first time, and is there a way to speed it up?

edit retag flag offensive close merge delete


I don't have the answer :/ but I'm interested because I am always surprised each time I launch a simulation for the first time

blevesque gravatar imageblevesque ( 2017-06-29 07:08:25 -0600 )edit

I think the issue here is that initially Gazebo contacts the server to obtain models or other data that is needed for the simulation. Hopefully someone will leave a pointer on how to prevent this.

hamzamerzic gravatar imagehamzamerzic ( 2017-06-29 11:12:43 -0600 )edit

yes I am searching for a solution to disable this "Getting models from...". If i find a solution I will tell you

blevesque gravatar imageblevesque ( 2017-06-30 03:53:21 -0600 )edit

if your world file includes models that are not found locally, gazebo will try and download them from the online model database. The model files are stored in ~/.gazebo/models. So if you pre-populate that directory with your models then gazebo should find it and launch immediately

iche033 gravatar imageiche033 ( 2017-07-03 18:43:24 -0600 )edit

Actually there is now real way to disable "Getting models from...". @iche033 how can we pre-populate that directory with custom model (my robot) ?

blevesque gravatar imageblevesque ( 2017-07-04 02:25:03 -0600 )edit

@iche033 I forgot to mention that I pre-populate the directory (I only deal with custom models anyway), but it still takes time. @blevesque You just download the models from Gazebo and place them in ~/.gazebo/models

hamzamerzic gravatar imagehamzamerzic ( 2017-07-04 02:42:56 -0600 )edit

that's strange. If all the models (incl. materials, meshes, textures) are in ~/.gazebo/models then you should never see the "Getting models from..." message. Does it print anything after this message? Can you post the full console output from running `gazebo --verbose`?

iche033 gravatar imageiche033 ( 2017-07-06 17:42:36 -0600 )edit