Using more than one trained policy (.pth)

Hi All,

I have been using OIGE and IsaacSim 2023.1.1 to train some tasks with a robotic manipulator. I can train and inference tasks, add new tasks, etc.

I can do:

PYTHON_PATH scripts/ task=Task1 max_iterations=10000 num_envs=1024

get a .pth and inference with:

PYTHON_PATH scripts/ task=Task1 headless=False num_envs=2 test=True checkpoint=runs/Task1/nn/Task1.pth

Similarly, I can do the same with Task2, Task3, etc.

I’m trying to figure out a way to use more than one trained policy in the same simulation. Ideally, I would like an elegant way of launching the simulation and triggering each policy depending on the situation. There is a way to use the trained policy without launching the whole training environment? One of the reasons is that it only allows for a minimum of 2 envs when inferencing.

Preferably, I would like to create a standalone code or extension with something like this:

if conditions_1:
  inference Task1
if conditions_2:
  inference Task2
if conditions_3:
  use PickPlaceController

Is there any examples, workflows or resources on how to achieve this?

Any ideas appreciated!

Thanks in advance!