Robot Head Following a Path

Hello,

I have an arduino controlled robot arm which uses DC motors with optical encoders and i can successfully program it to “go to point X” by programming each motors individual movement for example “move motor 1 8000 encoder pulses at PWM speed X” but the next stage of development is to make the robot follow a specific path.

I’m not necessarily looking for code at this stage but more some insight on how to approach the problem. Let’s say i want the “hand” of the robot arm to follow a curved path through space, for now just a 2D path, how do i go about this?

You break the path into a number of very short steps, then you implement the movement of each small path.

This is exactly the same sort of problem you have when you set the pixels on a screen to draw any path be it curved or straight line. For straight line look at the method:- https://en.wikipedia.org/wiki/Bresenham's_line_algorithm

And by extension this is how an XY plotter works.

Unlike a pixel display or XY plotter output, the "head" of the arm will depend on the combined positions of all joints (motors). If your path is given in XY coordinates, you'll need "inverse kinematics" to translate the given path coordinates into joint angles. No such complicated calculations are required if you define your path in joint angles instead of Cartesian (XYZ) coordinates.

I would disagree. At the end of the day you are in Cartesian coordinates, so the move must be made in that. At each small step you convert the Cartesian coordinates into the motor movement required to reach those points. There is no need for any inverse kinematics.

The required calculations depend on the mechanical design of the arm. A typical robot arm with two joints (motors) does not move the arm head (hand) in XY coordinates, instead every motor controls the angle of its joint. Trigonometric functions are required to convert the angles and limb lengths into XY coordinates - that’s kinematics. Inverse kinematics allows to convert XY coordinates into the corresponding angles.