Extension examples: quadruped 'stop' and 'play' failed with RuntimeError: Accessed invalid null prim & weird go2 usd model

Isaac Sim Version

4.2.0

Isaac Lab Version (if applicable)

1.2

Operating System

Ubuntu 20.04

GPU Information

  • Model: RTX
  • Driver Version: 3080 Ti

Topic Description

Detailed Description

Actually, I am going to migrate the depoly of quadruped spot extension to unitree-go2.
I can load the go2 and control it. However, I can not stop and restart it in isaacsim. I click ‘stop’ and then click ‘play’. It shows weird scene with errors in the terminal as follows:

I find that I have to use ‘RESET’ botton of the extension to play it again.

Firstly, I thought there was some thing wrong in my code since I am not quite familiar with isaacsim. But I tried the examples of ‘spot’ directly, it was the same.

This does not feel like a decent implementation. I wonder why this happens and how I can fix this problem.

Steps to Reproduce

  1. In the UI, go to ‘Isaac Examples’ menu;
  2. Then chose ‘Quadruped’ and click ‘load’;
  3. The robot starts to play autonomously and can be controled with keyboard;
  4. Then click ‘stop’. The robot 's play is stoped;
  5. Click ‘play’, however, the robot can’t play normally. And errors appear in the isaacsim termial as follows.
    (Add more steps as needed)

Error Messages

(If applicable, copy and paste any error messages you received)

2024-10-27 06:25:59 [7,027,850ms] [Warning] [omni.isaac.core.articulations.articulation_view] Physics Simulation View is not created yet in order to use set_joint_efforts
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]: Traceback (most recent call last):
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/daojie/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.examples/omni/isaac/examples/go2/go2_example.py", line 106, in _timeline_timer_callback_fn
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:     self.spot.post_reset()
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/daojie/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.examples/omni/isaac/examples/go2/g2.py", line 164, in post_reset
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:     self.robot.post_reset()
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/daojie/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/_impl/single_prim_wrapper.py", line 131, in post_reset
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:     self._prim_view.post_reset()
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/daojie/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/articulations/articulation_view.py", line 2457, in post_reset
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:     ArticulationView.set_gains(self, kps=self._default_kps, kds=self._default_kds)
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/daojie/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/articulations/articulation_view.py", line 2896, in set_gains
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]:     if prim.HasAPI(UsdPhysics.DriveAPI):
2024-10-27 06:25:59 [7,027,851ms] [Error] [omni.kit.app._impl] [py stderr]: RuntimeError: Accessed invalid null prim
2024-10-27 06:25:59 [7,027,851ms] [Warning] [omni.isaac.core.articulations.articulation_view] Physics Simulation View is not created yet in order to use set_joint_positions
2024-10-27 06:25:59 [7,027,852ms] [Warning] [omni.isaac.core.articulations.articulation_view] Physics Simulation View is not created yet in order to use set_joint_velocities
2024-10-27 06:25:59 [7,027,852ms] [Warning] [omni.isaac.core.articulations.articulation_view] Physics Simulation View is not created yet in order to use set_joint_efforts

Screenshots or Videos

(If applicable, add screenshots or links to videos that demonstrate the issue)

Additional Information

What I’ve Tried

(Describe any troubleshooting steps you’ve already taken)

Related Issues

(If you’re aware of any related issues or forum posts, please link them here)

Additional Context

(Add any other context about the problem here)

I can reproduce this observation and am checking with our team. I’ll update you once I have more information.

This is the expected behavior at the moment. When the simulation is stopped, the articulation is destroyed. To play it again, we need to recreate and initialize the robot’s articulation. This is what the reset button accomplishes: it stops the scene, plays the scene, and initializes the robot articulation.

We will look into reinitializing the robot articulation automatically after the stop button is pressed.

Also, the following note in the Move the Robot section is related to this behavior:

Pressing STOP, then PLAY in this workflow might not reset the world properly. Use the RESET button instead.