isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
1.9k stars 727 forks source link

[Question] Error when executing rsl_rl tutorial script '--video' #281

Closed songwookim closed 2 months ago

songwookim commented 6 months ago

Question

isaac sim : 2023.1.1 gpu : rtx 4090 (525.147)

I have been used your work for a long time. Thanks for your great works.

Recently, i update ORBIT code to 'commit [Simplifies running of scripts and unit-tests (#448)' and execute below rsl_rl tutorial script

./orbit.sh -p source/standalone/workflows/rsl_rl/train.py --task Isaac-Reach-Franka-v0 --video

and my error is below

################################################################################
                       Learning iteration 7/1000                        

                       Computation: 25956 steps/s (collection: 3.703s, learning 0.084s)
               Value function loss: 0.0003
                    Surrogate loss: -0.0041
             Mean action noise std: 1.03
                       Mean reward: -0.88
               Mean episode length: 188.25
Episode Reward/end_effector_position_tracking: -0.0250
Episode Reward/end_effector_orientation_tracking: -0.0432
        Episode Reward/action_rate: -0.0007
          Episode Reward/joint_vel: -0.0012
    Metrics/ee_pose/position_error: 0.2250
 Metrics/ee_pose/orientation_error: 1.5215
      Episode Termination/time_out: 11.5417
--------------------------------------------------------------------------------
                   Total timesteps: 786432
                    Iteration time: 3.79s
                        Total time: 34.91s
                               ETA: 4333.0s

Traceback (most recent call last):
  File "/home/songwoo/anaconda3/envs/orbit/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/songwoo/anaconda3/envs/orbit/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/songwoo/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/home/songwoo/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/home/songwoo/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/songwoo/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/home/songwoo/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/home/songwoo/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/home/songwoo/Desktop/orbit/source/standalone/workflows/rsl_rl/train.py", line 138, in <module>
    main()
  File "/home/songwoo/Desktop/orbit/source/standalone/workflows/rsl_rl/train.py", line 130, in main
    runner.learn(num_learning_iterations=agent_cfg.max_iterations, init_at_random_ep_len=True)
  File "/home/songwoo/anaconda3/envs/orbit/lib/python3.10/site-packages/rsl_rl/runners/on_policy_runner.py", line 112, in learn
    obs, rewards, dones, infos = self.env.step(actions)
  File "/home/songwoo/Desktop/orbit/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/utils/wrappers/rsl_rl/vecenv_wrapper.py", line 161, in step
    obs_dict, rew, terminated, truncated, extras = self.env.step(actions)
  File "/home/songwoo/.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.ml_archive/pip_prebundle/gymnasium/wrappers/record_video.py", line 155, in step
    ) = self.env.step(action)
  File "/home/songwoo/.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.ml_archive/pip_prebundle/gymnasium/wrappers/order_enforcing.py", line 56, in step
    return self.env.step(action)
  File "/home/songwoo/Desktop/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/envs/rl_task_env.py", line 164, in step
    self.action_manager.process_action(action)
AttributeError: 'RLTaskEnv' object has no attribute 'action_manager'
2024-03-13 10:27:08 [97,129ms] [Warning] [carb] [Plugin: omni.spectree.delegate.plugin] Module /home/songwoo/.local/share/ov/pkg/isaac_sim-2023.1.1/kit/exts/omni.usd_resolver/bin/libomni.spectree.delegate.plugin.so remained loaded after unload request
2024-03-13 10:27:08 [97,131ms] [Warning] [omni.stageupdate.plugin] Deprecated: direct use of IStageUpdate callbacks is deprecated. Use IStageUpdate::getStageUpdate instead.
2024-03-13 10:27:08 [97,142ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,142ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,142ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,142ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,142ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Node type name '' is missing the unique namespace
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-03-13 10:27:08 [97,143ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Core' for removal
2024-03-13 10:27:08 [97,146ms] [Warning] [carb.audio.context] 1 contexts were leaked
2024-03-13 10:27:08 [97,182ms] [Warning] [carb] Recursive unloadAllPlugins() detected!
2024-03-13 10:27:08 [97,194ms] [Warning] [omni.core.ITypeFactory] Module /home/songwoo/.local/share/ov/pkg/isaac_sim-2023.1.1/kit/exts/omni.activity.core/bin/libomni.activity.core.plugin.so remained loaded after unload request.

Could you help me to solve this error?

Thanks a lot.

vassil-atn commented 6 months ago

Hi,

I had the same issue and for the moment commenting out env.close() in the video recorder function (as documented in (#230) ) solved it for me.