Would it be possible to destroy an actor and add a new one during simulation?

Hi NVIDIA and robotics friends,

I am simulating a robot grasping a box, similar to the franka_cube_ik.py example. I wish to develop the following behavior:

  • The robot attempts to grasp the box
  • If successful, the box actor gets destroyed
  • A new box actor (with a different shape and size) gets added into the simulated environment.

However, I have not been able to figure out how to destroy the old object and add a new one during the simulation. As far as I understand, the only way to create a new actor is doing something like box_handle = gym.create_actor(env, box_asset, box_pose, "box", i, 0) before starting the simulation. Would it be possible to do that during simulation? Could you please give me some suggestions?

Thank you and kindest regards,
Bradley

Hello @yuan.truyenbao,

Destroying actors is not supported in the current version of Isaac Gym. I can propose a few variants of achieving the desired or similar to desired behavior:

  1. You can create a few different box shapes at the begining, and just move other boxes far away. After a succesful grasp to move used box to this far away point and place another box at the table.
  2. To achieve better perfromance and GPU utilization I’d recommend to use thousands environments and create a different box for each of them at the start.
  3. An additional feature useful for your project will be available in the upcoming release - a runtime size scalling support. It can be used either with 1. or 2.
3 Likes