I am trying to make a two-finger robot gripper. The grippers use soft body physics and my goal is to move them towards an object in the middle of the scene to just grab it by pressing the grippers to it. Note that I don't have to move the object necessarily although it would be great if I can do this as well!. I also want to take the grippers away from the object in the middle in an arbitrary time. This gif (32MBs) shows an advanced version of what I want to make. Basically, I want to have the freedom to control them the way I want while the physics is running so baking the physics is not an option here. Ideally, I want to run the physics simulation frame-by-frame using
bpy.context.scene.frame_set(bpy.context.scene.frame_current+1) so that: 1) I do not need to have a fixed path for the way the grippers move and 2) I can get some data about the soft body physics (forces, static and dynamic friction for each vertex/face) for each step of the simulation; I already know how to get that data that I need.
Based on the discussions I've had with people it looks like there is a couple of different ways of doing this, potentially. The most promising ones seems to be: 1) Using armatures and IK bones and 2) Animate what I want to do (maybe something like this?) and 3) Apply forces directly either by using Force Fields or somehow directly apply forces on the vertices, something like this. So I wonder, does anyone know which of these methods best fits my needs and post an answer which includes helps me make a soft body robot gripper in Blender?
I don't know almost anything about setting up armatures and IK bones properly to do this task so I don't know what could be the limitations of method 1 and how well it can satisfy my need. It looks like method 2 can do what I want as long as I know the path/curve on which the objects should move, which is undesirable for me. For 3, it looks like using Force Fields and Effector Groups can enable me to move the grippers closer and further and freely move my objects in the scene. However, it looks like it is a bit unintuitive to control Force Fields to achieve the desirable effect since I might want to quickly stop the grippers and move them.
I might be wrong about the limitations of these methods. However, it looks like to me that being able to directly apply forces (something like this but for soft bodies) to parts of the soft body objects would be the best option. Still, if you think you have a better idea on how I can make the gripper so you may ignore all of the methods that I described above and propose your own solution but make sure you the grippers are soft body objects.
While searching for a method to use to achieve what I described above, I sort of devised my own way of doing this (shown below) which is not ideal. The way my method works is that I have put an empty on top of my "grippers" and used the Transformation constraint to move the grippers. This method works okay but since I am not applying any force to the objects, the behavior of the soft bodies is not accurate as they collide with other objects. The good thing about this method however is that I can pin the vertices of the grippers so that they won't wobble as the grippers are touching the target object. Also, this way of pinning the objects will keep the grippers behave more realistic which is desirable (and needed) for my application. Maybe armatures can help with the pinning thing? Below you can see a .gif that depicts how I control the grippers using my method:
And here's another one with only pinning one vertex from the top and one vertex from the bottom:
And here's the .blend file for what I show in the gifs: