dm_control icon indicating copy to clipboard operation
dm_control copied to clipboard

update inverse kinematics to support multiple sites

Open vittorione94 opened this issue 2 years ago • 4 comments

I have updated the inverse kinematics script to support multiple sites. It still supports the previous script and all the tests run correctly. There is also a new visualise script that just visualise the output position in the humanoid.

vittorione94 avatar May 18 '23 12:05 vittorione94

Could you please put test assets in their own directory, similar to https://github.com/deepmind/dm_control/tree/main/dm_control/mujoco/testing/assets ?

saran-t avatar May 18 '23 15:05 saran-t

Unlike the original single-site version, looks like the multiple site generalization doesn't support simultaneous position and orientation fitting, does it?

vaxenburg avatar May 19 '23 14:05 vaxenburg

@vaxenburg you're right the multiple site generalization doesn't support simultaneous position and orientation fitting.

vittorione94 avatar May 19 '23 16:05 vittorione94

I just tested this and can confirm that this works as expected at least with the default parameters taken from dm_control/utils/inverse_kinematics_test.py. One thing I noticed is that, when using joint_names argument to ik.qpos_from_site_pose, the line here errors: https://github.com/deepmind/dm_control/pull/399/files#diff-2301b5a4bd0ea589f2d0802b1fa08eae5de429ac2fa333fa510c1e5acbe61f25R229. update_nv[dof_indices] = update_joints should probably be changed to update_nv[dof_indices] = update_joints[dof_indices].

hartikainen avatar Jun 08 '23 14:06 hartikainen