How to find the configuration of a rigid system that minimizes the distance of the end points in a closed loop

18 Views Asked by At

I am trying to find a more elegant way to solve this problem as setting it as an optimization problem.

Currently, I have 5 different types of elbow joints 1- 30 degrees 2- 50 degrees 3- 60 degrees 4- 180 degrees 5- Can be variable between 30-180 degrees etc (the lengths of the two arms of the joint are fixed at 1m)

I want to create a closed loop such that the end point distance is 0 (or as close to 0 as physically possible)

So I want to enter a number of segments from 1...N and it pick which joint angles from the possible list will complete the loop as best as possible.

Right now I pick random configurations and try them out ... this is great when the number is small, but as I increase it .. the brute force approach is obviously not tractable..

Is there a way to set this up as an optimization problem?