Deleting and generating prims for OIGE environment reset

Hello, I have a question about environment reset using OIGE. So for the task I am setting up I have to spawn a new cube every x timesteps in an episode. Each cube is a DynamicCuboid generated in env_0, then cloned to all other environments and finally, all the clones are wrapped around a RigidPrimView (e.g. for all cube_0, the view is named cube_view_0).

The issue comes when resetting a specific environment. If at the end of the episode I’ve generated 10 cubes, the reset should consist of removing them all and spawning a new cube_0. However, with this approach 2 issues arise:

  1. I am able to delete cube prims using the delete_prim() function of omni.isaac.core.utils.prims. However, when I delete cube_0 (as an example), the associated cube_view_0 is not removed. Therefore, when I want to generate a new cube_0 and its corresponding new cube_view_0 the following exception is printed in the terminal: “Cannot add the object cube_view_0 to the scene since its name is not unique”. Do you know of any way to also eliminate RigidPrimViews or a workaround for this issue?
  2. More importantly, doing as described above, every time I delete a prim, the prim is simultaneously deleted in all environments, meaning I cannot perform independent environment resets. Is there any way of deleted and generating prims in specific environments while still taking advantage of the efficient memory usage of OIGE parallelization?

Hi there, views can be removed from the scene using scene.remove_object() from omni.isaac.core’s If you would like the environments to stay independent of each other, you can use the copy_from_source parameter when cloning the environments, with copy_from_source=True in the Cloner.clone() call.

Hi, thanks for the response!

If I undertand correctly, the Cloner.clone() call you are referring to is in the set_up_scene() method within the omniisaacgymenvs>tasks>base> file, right? If so, that call does not have a copy_from_souceargument to be passed.

Do you have further guidelines on how I could set that flag or how to get my environments independent?

The copy_from_source argument can be found here: and passed when calling RLTask.set_up_scene(). The flag was introduced in the Isaac Sim 2023.1.0 release.

Thanks, I was indeed using Isaac Sim 2022.2.1., that is why the flag was not available.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.