What is the difference between those two methods for controlling the robot/articulation joints?

Hello,

Thanks for providing the impressive Isaac Sim. I am still trying to master it, starting from a robot arm’s USD file.

I found that it is possible to control a robot’s articulation in two ways, but I did not figure out the difference.

#assume we have a 7DOF robot
joint_angles = np.zeros(7)
my_articulated_system.set_joint_positions(joint_angles)

And this way too, but seems more complicated,

#assume we have a 7DOF robot
joint_angles = np.zeros(7)
my_articulated_system.get_articulation_controller().apply_action(ArticulationAction(joint_positions=joint_angles) 

Please tell me the difference between them.

Edit: Maybe the question is better stated if I say what is the difference between controlling an articulation with its set_joint_positions( ) method, or an articulation’s controller apply_action( ) method?

Best regards,

Hello,

set_joint_positions is used to teleport the articulation joints to a specific joint configuration, you can use this method to start the robot with a specific joint configuration after reset. To control the robot to perform a task using dynamics apply_action should be used where an action could be target joint positions, target joint velocities or joint efforts.

Let us know if you have more questions,

Thanks, @oahmed for your reply.

I found that set_joint_positions also working during the simulation, not only after reset. This makes it similar to the apply_action. Is the difference that the apply_action’s target positions will calculate the producing torque/effort? If yes, what wrong will happen if I use set_joint_positions during the simulation?

Best regards,

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