I'm controlling 6 DOF robot arm based on image processing. Robot arm will grab the object. Below what my system looks
I can control the translational part of robot very well. But i cant control the rotational part. I mean i want the gripper facing down and rotate according angle of the object. Using jacobian equation \begin{bmatrix} q1 \\ ... \\ q6 \end{bmatrix}\begin{bmatrix} dq1 \\ ... \\ dq6 \end{bmatrix}= J(q)^{-1}\begin{bmatrix} x\\ y\\ z\\ rx\\ ry\\ rz \end{bmatrix}\begin{bmatrix} dx\\ dy\\ dz\\ drx\\ dry\\ drz \end{bmatrix}
I try using rotational equation from this paper but still no luck, what should i do for rotational part
Note : To generate the jacobian, im using SerialLink.jacob0 from Matlab Robotic Toolbox by Peter Corke