/dynamic_world_service plugin

Hey ROS-Team,

In the catkin_ws the given domain randomization works fine just by calling the “/dynamic_world_service” Service with an Empty Request. Couldnt be easier!

But how do i even set up/install the plugin to a new Workspace??

and how do i change the configuration of the randomization? (What to randomize and how)

An Example of this would make the things ive learned during this course way more useful.

Greetings and thank you


So basically you have to download this GIT Dynamic World.
Then compile it in a catkin_ws as any other rospackage.

And then you have to include the generated plugin in any world that you want to randomize the position and colours and lighting . For example:

Example World 2 Objects

In this world we have two objects we want to move around: demo_spam1 and suzzane:

  <pose>-0.2 0.2 0.7 0 0 0</pose>

  <pose>-0.1 0.0 0.9 0 0 0</pose>

The rest f the objects in the scene have to be ignred and not moved or changed in any way.

So his plgin will change position and colours of the objects that arent set to be ignored and register the position of the objectyou want to track. It will also change the lights positions and colours if set.

<plugin name="dynamic_world_plugin" filename="libdynamic_world_plugin.so">








As you can see here we can set the following:

  1. x_max, min, y_max… All these are the ranges of position change of the object to be tracked ( demos_spam1 in this case.
  2. x_max_distractors… These are for the other objects that arent in the ignore list
    3)z_increment_percentage is that we change the z of each objects to avoid that two objects appear inside one another
  3. All the ligh_xxx is for changing the lights obviously. Note that aloof these ranges if we put the same value in the max and min , that value will be constant.
  4. Same thing with the Camera.
  5. The alpha and beta are related to the distribution of the random values of the positions of the objects. Thsi si because we might want more data generated in the extreme positions close the max min ranges because the deep learning system needs more data there because its more difficult calculate there the distance for example.
  6. An finally the color randomiser, if yes, then the colours of the objects are changed.
  7. As for the lists for model_to_ignore, we can set who we don’t want to move and not change colour, we will set it in the appropriate lists.

And that’s quite it. Hope this helps to understand the plugin better and I would love to see this used in there environments and applications ;).

thanks for the fast reply!

So the dynamic_objects/worlds folder in the git repo is full of examples like the one you described, which are launched in different Units of this course.
Did i get this right??

Exactly, all theworlds launche din the units are there I think

1 Like

I stumbled upon this topic when I was searching for just the same as lwidowski. I was searching for the the plugin that created the dynamic_world_service in the deep learning with domain randomization course because I’m currently working on a project where the computervision and deep learning could be very usefull. I tried to clone the domain_randomization_dynamic_objects into my workspace but it seems like the gazebo has updated a whole lot in the meantime. I get a lot of errors from the “dynamic_world_plugin.cpp” script that looks like it is caused by the fact that gazebo has changed some of the function and variable names.

Is there an updated version of the domain_randomization_dynamic_objects package that works with the new gazebo 11?

Or how do I have to chose another route to work around the errors?

Thank you very much.