Hello,
I was trying to run my custom RL task that I created following the guidelines under the OmniIsaacGymEnvs library (OmniIsaacGymEnvs/framework.md at main · NVIDIA-Omniverse/OmniIsaacGymEnvs · GitHub), when I got the following exception that crashed the simulation:
Exception: Failed to get DOF stiffnesses from backend
Full error trace is : “Traceback (most recent call last):
File “scripts/random_policy.py”, line 55, in parse_hydra_configs
task = initialize_task(cfg_dict, env)
File “/home/matteo/Projects/OmniIsaacGymEnvs/omniisaacgymenvs/utils/task_util.py”, line 72, in initialize_task
env.set_task(task=task, sim_params=sim_config.get_physics_params(), backend=“torch”, init_sim=init_sim)
File “/home/matteo/Projects/OmniIsaacGymEnvs/omniisaacgymenvs/envs/vec_env_rlgames.py”, line 51, in set_task
super().set_task(task, backend, sim_params, init_sim)
File “/home/matteo/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.gym/omni/isaac/gym/vec_env/vec_env_base.py”, line 80, in set_task
self._world.reset()
File “/home/matteo/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core/omni/isaac/core/world/world.py”, line 282, in reset
self._scene._finalize(self.physics_sim_view)
File “/home/matteo/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core/omni/isaac/core/scenes/scene.py”, line 290, in _finalize
articulated_view.initialize(physics_sim_view)
File “/home/matteo/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core/omni/isaac/core/articulations/articulation_view.py”, line 218, in initialize
self._default_kps, self._default_kds = self.get_gains(clone=True)
File “/home/matteo/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core/omni/isaac/core/articulations/articulation_view.py”, line 1664, in get_gains
kps = self._physics_view.get_dof_stiffnesses()
File “/home/matteo/.local/share/ov/pkg/isaac_sim-2022.2.0/kit/extsPhysics/omni.physics.tensors-104.1.6-5.1/omni/physics/tensors/impl/api.py”, line 225, in get_dof_stiffnesses
raise Exception(“Failed to get DOF stiffnesses from backend”)
Exception: Failed to get DOF stiffnesses from backend”
The problem resides in the “/omni/isaac/core/arti culations/articulation_view.py” file while trying to use the “self.get_gains(clone=True)” function: if trying to get the joints stiffness it doesn’t receive any value, the program crashes. (a working alternative for objects with fixed joints without stiffness seems to not exist).
My workaround for now was to create a fake joint that satisfies the “join stiffness” retrieval attempt allowing the simulation to not crash.
Maybe there could be an update to accommodate the use of FixedJoints?
Many thanks,
Matteo