Estimate of the two smallest singular values of the Jacobian matrix: application to damped least-squares inverse kinematics