# How to move robotic arm in straight line

So here is my problem. I need to grab an object with my robotic arm, but I don't know the position of the object. The only thing I know is the angle between object and gripper. You will maybe better understand better from this image.

So my question is, how do I do that my robotic arm will be approaching the possible position of object in straight line? I tried inverse kinematic but it didn't work, because I don't know position of the object although I tried set the position of the object to end of the gripper. So I think IK is not the right way.

• It seems you're asking two questions. First, how the robot knows that it is approaching an object. The answer is you need some sort of sensors. Second, how to move the end-effector through straight line. The answer is first compute the equations that relate the position of the gripper to the joint angles. – CroCo Jan 28 '18 at 9:45
• How many DoF is your arm? Do you have an arbitrary vector in which you want the arm to travel, or is the vector formed by the last link as in your diagram? – Ben Jan 28 '18 at 19:57

First of all you should start to check 2 things:

1. the angle $\alpha$ is given by some sensor
2. the object and the path to the object (blue dotted line) both lie in the arm workspace

If 1. is not met, I suggest you to look in the literature of eye-in-hand servoing. If 2. is not met your object can not be reached ... you might still want to travel until the end of the workspace following the dotted line. From now I assume both are met.

Concerning the following of the dotted line, you where right in your attempt of using IK, but if you only specify the location of the object the IK which is composed of a pseudo-inverse/inverse react by not following the line you describe because the inversion can be seen as least square in the joint space, so it will minimize the joint motion. If you want to follow the line, you need to generate a trajectory from you current end-effector position to somewhere further along the line (if you know where is the ground plane you can gp up to it). Then this trajectory can be fed to the IK and if it lies inside the robotic arm limits it will follow it.

Further consideration, based on the number of DoFs of your robot and if you go in 6D space, you might or might not be able to follow the line with any given orientation of the gripper. In your drawing for example a part of the line can be followed with the desired orientation, while an other part can be followed but only if the orientation is let free, i.e. follows the robot arm constraints.