Dynamic Control Interface cannot get D6 Joint DoFs

I’m pretty new to Robotics and I’m trying to play with the dynamic control interface. I used scripts from this post: https://forums.developer.nvidia.com/t/torque-control-implementation/182378
I slightly modified the codes because some of the APIs has changed since then.


from omni.isaac.dynamic_control import _dynamic_control
import numpy as np
dc = _dynamic_control.acquire_dynamic_control_interface()
art = dc.get_articulation("/World/humanoid/torso")

num_joints = dc.get_articulation_joint_count(art)
num_dofs = dc.get_articulation_dof_count(art)
num_bodies = dc.get_articulation_body_count(art)
joint_efforts = [-np.random.rand(num_joints) * 1145]
dc.set_articulation_dof_efforts(art, joint_efforts)

Here, the usd file used is the humanoid from OmniIsaacGymEnv plugin. (You can directly get it from Isaac Assets)
The humanoid has 5 revolute joints (DoF = 1) and 8 D6-joints (DoF = 2). The total DoF of all joints should be 21.

However, the DoF printed by script is 5 and it seems I can only control those 5 joints by dynamic control. I wonder if I did anything wrong? Is there anything more I need to do to get D6 DoFs?


Dynamic control extension is deprecated and we recommend using the Isaac.core extension as the alternative. The API that can be used to set joint(dof) efforts is called set_joint_efforts

Thank you! And for future viewers’ reference, the new test script (using core APIs) looks like this, and it can control D6 joints!

from omni.isaac.core.articulations import Articulation, ArticulationView

prim_path = "/World/humanoid/torso"
prim = Articulation(prim_path=prim_path, name="humanoid_test")

dofs = prim.dof_names
num_dofs = len(dofs) # 21
joint_efforts = np.array([0 for i in range(num_dofs-4)], dtype="float64")
joint_efforts = np.concatenate((joint_efforts, np.random.rand(4) * 1145))  # only applies torque to the last 4 DoFs which are on two feet joints (2 each)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.