To simplify the inverse kinematics most robots have a spherical wrist, a particular mechanical wrist design. For robots where the inverse kinematics is too hard to figure out we can solve the problem numerically, treating it as an optimisation problem.