Exception: Failed to get DOF stiffnesses from backend - (FixedJoints only robots not allowed to create articulation_view)

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

Hi Matteo,

Thanks for reporting this issue. Would it be possible for you to share the asset you are using? If the articulation only consists of a single fixed joint, calling get_dof_stiffnesses() should return an empty list. Alternatively, you can also use the RigidPrimView and treat the bodies as individual rigid bodies if they are only connected by a fixed joint.

Hello Kellyg,

Below is the screenshot of the asset I’m using (the last Xform is the “fake” body I added to create the RevoluteJoint as a workaround for the aforementioned issue.

I am already using RigidPrimView to treat the bodies as individual rigid bodies connected through a fixed joint.

Hope this helps,
Matteo

Hi @matteohariry , in order to help you further team will need the access to your asset. Is it possible for you to share it with @kellyg?

Hi rrhaker,

Here is the asset Matteo is using:
fp3.usd (47.2 KB)

It includes the dummy joint that allows us to use the robot with OmniIsaacGymEnv.

For context, without the dummy it means that self.num_dof is equal to 0,

Doing something like that seems to solve this issue:

            if self.num_dof:
                kps = self._physics_view.get_dof_stiffnesses()
                kds = self._physics_view.get_dof_dampings()
                result_kps = self._backend_utils.move_data(
                    kps[self._backend_utils.expand_dims(indices, 1), joint_indices], device=self._device
                )
                result_kds = self._backend_utils.move_data(
                    kds[self._backend_utils.expand_dims(indices, 1), joint_indices], device=self._device
                )
            else:
                result_kps = torch.tensor([])
                result_kds = torch.tensort([])

But then it breaks in get_dof_position_targets with the following error:

isaac_sim-2022.2.0/kit/extsPhysics/omni.physics.tensors-104.1.6-5.1/omni/physics/tensors/impl/api.py", line 469, in get_dof_position_targets
raise Exception("Failed to get DOF position targets from backend")

Cheers,

Antoine

Any updates on this? I have the same problem @ARi_31

Hey, we are still using dummy joints

1 Like

Hi everyone, we have found the issue internally and the fix will be available with the next Isaac Sim release.