Attempting to Move Joints of Franka robot

I tried out this code from the Isaac Sim Deep Dive video(Isaac Sim 2020: Deep Dive - YouTube at 23:38):

import numpy as np
from omni.isaac.dynamic_control import _dynamic_control
dc = _dynamic_control.acquire_dynamic_control_interface()
articulation = dc.get_articulation("/panda/")
dc.wake_up_articulation(articulation)
joint_angles = [np.random.rand(9)*2-1]

dc.set_articulation_dof_position_targets(articulation, joint_angles)
~

But when I play the simulation, the arm just jitters and I receive an error saying that I have an expired or invalid articulation handle. I expected the arm to move slowly as it does in the demo. Why am I getting this error?

Hi,

Maybe this post can help:

If by “while the simulation is running” you mean I press play on the UI window, then I did do that. And that is when it jitters.
I am running this with the Script Editor window, so I press play and then I execute the python code. Do I still need a callback for that?

(Without pressing play, I would get a different error for the articulation function I called.)

I’ve also double checked and I do have a physics scene loaded, and the arm panda is not nested under “/World/Franka” as it is in the video.

Hi, you are right, a callback is not necessary to execute the code you show…
So, ignore my previous comment and just remove the / at the end to use the true articulation path

articulation = dc.get_articulation("/panda")

This should works…