dm_control icon indicating copy to clipboard operation
dm_control copied to clipboard

Cost comparison of dynamic physics object from PyMJCF generation vs Extra object rendering

Open alexstoken opened this issue 4 years ago • 0 comments

Hello,

I am working on a RL project with an environment that has a base scene, as well as additional objects.

The base scene consists of a kitchen layout (e.g. walls, counters, stovetop, etc). At the start of each episode, I want to populate this scene with 5 smaller objects from a set of 20 object meshes (e.g. plate, pan, fruit, can, etc). The objects which appear in the kitchen should to be different every episode. In short, the base scene layout remains constant each episode while the kitchen items in the scene vary. What is the recommended way to implement this?

Thus far, I can imagine two ways to generate/reset the environment at the beginning of each training episode that allow for different objects to be present in some episodes and not others:

  1. Have a base PyMJCF RootElement from one xml file that contains basic scene layout (floor, walls, etc), and add new elements which attach dynamically for each episode. If I understand correctly, this requires reinstatiating a physics object each time, which could be expensive.
  2. Instantiate a prebuilt XML with all objects out of frame, and at each episode reset, move a subset of them in frame. This incurs rendering costs of unused objects, which could also be expensive.

Do you have a recommendation for one procedure over the other, or another recommendation for random episode-wise object addition/injection? Thank you!

Additionally, will dm_control continue to be actively maintained and new features added? Another outstanding issue (#111) is also plaguing this project. I understand that is solvable in the XML (though more laboriously, via manual path adjustments), but it would be great to have the parsing functionality match that of the C compiler.

alexstoken avatar Dec 01 '21 14:12 alexstoken