Errors when running Cartpole RL example in Isaac Sim 2023.1.0-hotfix

I have updated Isaac Sim to 2023.1.0-hotfix version, and when I try to run the cartpole_train.py script from standalone_examples/api/omni.isaac.gym, I now get these errors:

I’m using a conda environment for isaac-sim created as described here. Does anyone know what might be happening? I think it can be something related to use the CartpoleTask in PPO, but i’ve not change anything, so should this be happening?

from cartpole_task import CartpoleTask

task = CartpoleTask(name="Cartpole")
env.set_task(task, backend="torch")

# create agent from stable baselines
model = PPO(
    "MlpPolicy",
    env,
    n_steps=1000,
    batch_size=1000,
    n_epochs=20,
    learning_rate=0.001,
    gamma=0.99,
    device="cuda:0",
    ent_coef=0.0,
    vf_coef=0.5,
    max_grad_norm=1.0,
    verbose=1,
    tensorboard_log="./cartpole_tensorboard",
)
model.learn(total_timesteps=100000)
model.save("ppo_cartpole")

env.close()

P.S: I have stable_baselines3 version 2.0.0 in my environment, this is the version in environment.yml file used to create the environnment

Hi @felipe18mohr - Are you still seeing issues with latest Isaac Sim bug fix release?

Hello @rthaker! Yes, I just updated Isaac Sim to version 2023.1.1 and I still get this error

I figured out the problem: it is the stable_baselines3 version in the conda environment created by following the tutorial.

I changed the version of stable_baselines3 in environment.yml file to “stable-baselines3==2.2.1”, recreated my conda env, and now it works just fine.

1 Like

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