I have an issue with the Kangaroo 2 solver.
When I input some goal nodes that try to pull the mesh in opposite directions, I get infinite motion (see the video below).
A workaround I’ve found is running the sim, and then at the very end, turning off all the constraints that are not necessary for equilibrium. This method is not robust and not usable for all cases.
What causes this? Is it maybe the fact that Kangaroo uses a greedy approach that weights the moving vectors differently based on how far they are from the target?
Is there any way to prevent this behaviour, or a solver that does not cause infinite motion/rotation of the model that reached a “shape-equilibrium”?
Hey Rikkarlo
Have you tried anchoring just one point of the mesh?
Sorry I missed your message.
Yes I did try it, and I actually use it sometimes, but the problem with this approach is that there are forces that keep pulling the surface which makesit stretched locally around the point.
Hi @riccardo.foschi2
Sorry for not seeing this earlier.
What you’re seeing is specific to the Hinge goal.
As a general rule, all Kangaroo2 goals should produce balanced forces, i.e. the vectors applied to all the points involved should sum to zero. For example, the length goal always applies a pair of equal and opposite vectors to the ends of the segment. This should mean the simulation converges to a static solution
There are a few exceptions to this, such as the Load goal, and without some balancing forces, such as a floor or anchors, Load can give simulations where the objects fall forever.
For the hinge goal, the vectors do sum to zero, so there should be no infinite translation, but when the triangles are asymmetrical, where these vectors are applied can result in a small rotational force on the set of 4 points involved, and over time this can cause the object to spin. I do think there might be a way to modify it to redistribute based on the angles, but haven’t looked at this in a while.
Oh thanks Daniel!
I think Tomohiro Tachi had some math for actuating hinges with forces in his rigid origami simulator. Maybe I can look into it and get back here to tell you what I’ve learned.
R
The code is here in case anyone else wants to try modifying it: