# How do CAD programs solve for Inverse/Forward Kinematics problem in Assembly?

I am trying to solve for the Forward kinematics of a spatial parallel manipulator. Its loop closure (LC) equations are pretty long, and are being solved using numerical methods. As I am adding more links to my manipulator, loop closure equations are becoming bigger and more difficult for the numerical method to handle.

It just struck me then. In a CAD program, when I create an assembly of a manipulator and make its links move by dragging the links using mouse, CAD program is instantly solving forward kinematics of that manipulator.

How come the CAD programs respond so fast? Are they solving LC equations all the time? Even if I add more links to my manipulator in CAD program, it has no difference/delay in response!!

• How many links exist in your manipulator? Commented Jul 18, 2019 at 23:47
• Not many links really. I am starting with 5 links and going up to 8. Commented Jul 19, 2019 at 7:25

EDIT: Improved based on the comments below.

If you have a CAD assembled, that means that you have one valid configuration given. You move the TCP (Tool Center Point) only a small amount, since your mouse (which drags the mechanism) travels only a small amount between two update periods, that means that the two solutions are close to each other. Each refresh (probably) fills up a buffer of waypoints very close to each other, and for each point in the buffer the solution of the previous point can be used as an initial guess. This buffer essentially becomes a path with waypoints described by the mouse movements. Using the previous position as an initial guess, for the current one, which is only a slight change to the previous position will results in a very fast convergence, probably 5-8 iterations using a simple Newton-Raphson method.

The key to fast numerical solutions is a good initial guess. Using a solution for the kinematics problem in a position physically close to the current one is a great initial guess.

CAD software uses a numerical solver in the background, same as Matlab SimMechanics. If you implement it form scratch, make sure to re-use solutions as an initial guess for the neighbouring positions and you will get fast results.

• I'd say too that the mouse scribes a path; it's not just clicking on an arm and clicking an endpoint. The mouse is effectively pulling a series of deltas, so your initial position should be really close to the current delta.
– Chuck
Commented Dec 4, 2020 at 13:10
• yes, I did not think about the path, I just assumed one delta, which can be solved between frames (graphic frames, not coordinate system). But when the solution lags, it does seem to follow the mouse path and not just jump to the last mouse position. You might be right, there might be a buffer inbetween. Thanks for the comment
– 50k4
Commented Dec 4, 2020 at 13:18
• @50k4: What is TCP? Commented Dec 5, 2020 at 9:34
• Tool center point. The end effector or tool coordinate system of the robot
– 50k4
Commented Dec 5, 2020 at 9:34