Hi Dan,
I recommend using the script editor to make sure the Articulation
is working as expected.
I will show an example for the UR10, but the same thing can be done for any robot in the scene.
First I add a UR10 to the scene using “Create → Isaac → Robots → Universal Robots → UR10”
Then I press play to start the simulation and open the script window using “Window → Script Editor”
With the simulation running, you can then use a little script to see the names of each joint in the articulation, set target positions and read joint positions:
from omni.isaac.core.articulations import Articulation, ArticulationSubset
from omni.isaac.core.utils.types import ArticulationAction
import numpy as np
# Load robot
robot = Articulation("/UR10")
robot.initialize()
print("DOF names:", robot.dof_names)
# Set position for all joints
robot.apply_action(ArticulationAction(np.array([1.0, 0.0,2.0,3.0,0.0,0.0])))
# Print position
position = robot.get_joint_positions()
print("position:", position)
Here is my expected output from running it twice. Note the first time the position readout is near zero because the robot hasn’t had time to move directly after applying action in the same step. The second set of output very closely approximates the target position.
DOF names: ['shoulder_pan_joint', 'shoulder_lift_joint', 'elbow_joint', 'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint']
position: [ 1.2860776e-06 7.5394190e-03 1.6797542e-03 -1.4944457e-06
1.0166268e-07 -6.6924440e-07]
DOF names: ['shoulder_pan_joint', 'shoulder_lift_joint', 'elbow_joint', 'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint']
position: [ 9.9996537e-01 3.5953731e-03 1.9993634e+00 3.0001130e+00
-6.8680338e-06 3.4853120e-09]