# Inverse kinematics for 2DOF robotic arm in 3D

i am trying to find the inverse kinematics for quadrotor with 2Dof robotic arm, which has first joint rotation axis perpendicular with second joint. So, for the inverse kinematics i use two equations

theta 1 = atan2(z,y)

theta 2 = atan2(x, (sqrt(z^2 + y^2)-L1)), where x,y,z are end effector position

If I use these two solution in jacobean matrix for finding the joint velocities: thetadot = pinv(J)*(x,y,z)dot, at some point i have singular configuration. For finding the determinent of jacobean matrix, i consider the the determinant of the (J'*J) because my jacobean is a 3 * 2 matrix.

So my questions are

1. are two equations for finding theta 1 and theta 2 correct?
2. how can I avoid the singular configuration?
3. when the jacobean matrix is zero, how can i find the joint velocities?
• On Robotics we are fortunate enough to have MathJax support enabled, allowing you to easily create subscripts, superscripts, fractions, square roots, greek letters and more. This allows you to add both inline and block element mathematical expressions in robotics questions and answers. For a quick tutorial, take a look at How can I format mathematical expressions here, using MathJax?
– Ben
Commented Feb 2, 2022 at 17:47
• This paper treats the 2-D case, but perhaps it will give you some ideas. Most of the treatments I have seen are highly abstract, but this author (who is still at MIT after almost 50 years since he wrote the paper) gets "down and dirty". Commented Feb 15, 2022 at 18:03