UM-ARM-Lab / pytorch_kinematics

Robot kinematics implemented in pytorch
MIT License
394 stars 34 forks source link

composite joints not supported #23

Open gautica opened 11 months ago

gautica commented 11 months ago

Hi, thank you for your interesting work. I would like to ask if you plan to implement composite joints. I saw that you have used "humanoid.xml" in your example, but it failed when I tried to do it because of the composite joint issue. Thank you very much.

PeterMitrano commented 9 months ago

You can often work-around this limitation by rewriting the XML. For example instead of

<worldbody>
<body>
<joint type='slide' axis='1 0 0'/>
<joint type='slide' axis='0 1 0'/>
</body>
</worldbody>

You could do

<worldbody>
<body>
<joint type='slide' axis='1 0 0'/>
<body>
<joint type='slide' axis='0 1 0'/>
</body>
</body>
</worldbody>

But this would only work in some cases. Very few robots truly have composite joints, in my experience. Can you share the model you are using, and say why you need composite joints?

If you wanted to implement them, it should be possible to just create two joint objects with a dummy Frame in between them. Might be fairly easy?