google-deepmind / mujoco_menagerie

A collection of high-quality models for the MuJoCo physics engine, curated by Google DeepMind.
Other
1.32k stars 176 forks source link

Ufactory Lite6 gripper model #89

Closed eufrizz closed 3 weeks ago

eufrizz commented 1 month ago

I modelled the gripper for the Ufactory Lite6 for my own use so I thought I'd share it in case it's useful for anyone else! (Although I suspect it doesn't have a large number of users, and the gripper itself is somewhat rubbish 😅)

The stl files were created in Onshape from the .step files released by the manufacturer. I added two new models, one with the grippers internally rotated, and one with them externally rotated. More detail in the readme.

I wasn't entirely sure how best to model the solver characteristics. The ones chosen are taken from the ACT repo for the Aloha gripper, I couldn't get the default values to work nicely with picking up a box (meshes would intersect), so happy for someone who knows more to improve on this. Similarly, the friction characteristics are an approximation for the rubberised pads on the gripper fingers.

eufrizz commented 1 month ago

@kevinzakka thanks for the review!

  1. Open to suggestions for better terminology, I think "internal" and "external" made sense to me from the terminology used for shoulders (internal vs external rotation, see attached photo). I've changed it to say internal and external facing in the readme, this is probably clearer than "rotation". Because the range of motion of the gripper is so short, the maximum distance between the grippers is only 15mm in the internal configuration so you can only pick up narrow objects. In the external configuration, you get 38mm. Thus it is useful to have both. I added some extra photos in the readme to demonstrate.

  2. I was not aware of mjSpec, this is great, keen to clean up the mess of all these different XMLs! I'll have a play around with it in the next couple days.

EDIT: I'm thinking "narrow" and "wide" might be a good name choice

yuvaltassa commented 1 month ago

You'll want to look at the new attach element

eufrizz commented 1 month ago

@kevinzakka thanks. Updated the original (no gripper) model with position actuators too. I also added names to the collision geoms (helps when checking for self intersections etc.) and updated this in the original model for consistency.

eufrizz commented 1 month ago

@kevinzakka @yuvaltassa I had a play around with the new MjSpec/attach functionality. I found that the Python API didn't work - mujoco.MjSpec().from_file("...scene.xml") returns None (and crashes if the wrong filename is provided). But I got it going with the C++ API (just compiled and visually inspected, didn't test too thoroughly). I found it necessary to attach a prefix and/or suffix at the mis_attachBody step to avoid a compilation error which seemed a little quirky. I think it makes more sense to do as a separate PR later on perhaps when the functionality has matured a bit/when other models will follow this pattern too. I'll happily submit a draft PR with the changes and a bit of demo code now though so you can take a look, and merge when you think it's appropriate.

kevinzakka commented 1 month ago

Awesome job @eufrizz, will try to get this merged next week alongside the other PRs :)

eufrizz commented 1 month ago

Great! Also, still unsure on the chosen solver parameters for the gripper. Would love a double check on that.

kevinzakka commented 1 month ago

I’ll tweak during the merge and let you know what we change!