Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

Is there a way to know how many dof from a xml file?

Open milong26 opened this issue 1 year ago • 4 comments

As title mentioned,I want to know how many joints and dof does franka_sim/bi-franka_panda have,to let it move.

But it didn't say in its github page or readme.md. So is there any solution?

Thanks!

milong26 avatar Dec 25 '24 12:12 milong26

By the way if anyone know standard dataset of robots(especially two arm) plz tell me :sob:

milong26 avatar Dec 25 '24 12:12 milong26

Do you mean inside genesis or by just reading the xml?

In genesis, you can simply do entity.n_dofs, or simply type entity in a interactive shell (like ipython) see https://genesis-world.readthedocs.io/en/latest/user_guide/getting_started/interactive_debugging.html

zhouxian avatar Dec 25 '24 14:12 zhouxian

Also, you can use gs view <path to file> to check the asset and moveable dof

Kashu7100 avatar Dec 25 '24 17:12 Kashu7100

ty for telling me info about inside genesis,how about reading the xml? SInce I may need to import objects from other dataset.

milong26 avatar Dec 26 '24 01:12 milong26

You can read the XML using Genesis and access its DoFs as mentioned in the answer above. If you do not want to load it into Genesis, you can also use MuJoCo's API to load the XML and retrieve the DoFs from MuJoCo.

YilingQiao avatar Feb 23 '25 16:02 YilingQiao