OmniGibson
OmniGibson copied to clipboard
Add support for multiple envs/scenes under a single simulator instance
- Add a scene= argument to prim/object load, and make the object's scene accessible through self.scene. (you might also need to add this into prim/object
__init__
for scene objects) - Add a property
scenes
onto Simulator that returns[self._scene]
- Replace all references to og.sim.scene with .scene on some relevant object/prim. If there are any use cases that involve iterating over all scenes and all objects, use
og.sim.scenes
making sure to iterate over all the scenes (for now there will only be one) - Remove the og.sim.scene property (not _scene just yet)
- Change the dependency direction between scene.add_object and sim.import_object (make the former call the latter). Replace all use cases of sim.import_object with scene.add_object.
- In simulator, remove the ._scene member, instead add a ._scenes member. Make it possible to import multiple scenes (add position offset + name prefix). Replace references to _scene with loops over all the scenes.
- Add an example and a unit test that loads multiple scenes. Make sure they dont overlap and we dont get any errors.
- Refactor environment to be called VectorEnvironment, and vectorize every member (e.g. configs, scenes, tasks, obs, ...). Add a new class called Environment that wraps around a VectorEnvironment(n=1) and wraps & unwraps actions/observations/infos/etc.
- Make sure that nothing calls cross-env destructive behaviors like og.sim.clear etc. or steps across environments (og.sim.step).