illiRobot
Automated retrieval of objects in 3-D space by a robot arm
Bharath Krishnan - May '03


Documentation:

Narrative Description:

Goal
:

My goal was to create and automate a robot arm in OpenGL, with 4 degrees of freedom, so that it can automatically move its 'claw' to pre-defined coordinates and pick up objects at that location.

 
The Arm:

The arm consists of three joints of equal length, pivoted about a base. The end of the third joint has a claw attached to it for grabbing objects. The arm can rotate clockwise or counter-clockwise about the base. It can also bend ‘up’ or ‘down’ about the three hinges connecting the joints of the arm.  There is no limit on the angles by which the robot arm can rotate or bend. The joints are made of solid rectangles and the claw is a cone attached to the end of the arm. 

 

Implementation:

There are different ways in which the motion of the robot arm can be controlled. I am using a method called forward kinematics as opposed to inverse kinematics.


Forward Kinematics:

A method for controlling the movements of an object comprised of several joints and links, in which the movement of one part affects all of the links and joints along the chain between it and the free end of the last link. The free end's motion is the accumulation of all the motions of the upstream links. For example, in a model of the arm, a rotation of the upper arm about the shoulder joint is propagated down through the forearm and wrist to the finger tips.

 

Inverse Kinematics:


A method of controlling the motions of an object comprised of many joined movable parts or links, in which the position of the free end of a chain of links, is specified and its motion affects the position and orientation of one or more links upstream along the chain. For example, in a model of the arm, any specified motion of a finger tip is propagated up through the finger joints, hand, wrist, and forearm. 



Automating the arm:

 

The main challenge in automating the arm is to find the angles by which the joints need to rotate  in order for the claw to be positioned over the object. The angles by which the various joints must either rotate or bend is calculated using the coordinates of the hinges of the arm and the predefined coordinates of the objects. The coordinates of the objects are stored in a two-dimensional array. 

 

Calculating the angles by which to rotate:

 

All points of the robot arm lie in a single plane initially (it is constructed that way). The joints can only bend up or down in this plane. Initially, the robot arm is rotated about the base so that the object also lies in the robot arm’s plane. Hence we have the object and all the hinges and joints of the robot arm in a single plane.

 

We then rotate the joint closest to the base such that that joint lies along the line connecting the base of the robot arm to the object. Finally, a point 'P' at a distance 'd' (equal to the length of one joint) from the endpoint of the 1st joint and the object is found. The robot arm is rotated so that the endpoint of the second joint lies at point 'P' and the claw is at the target.

 

 The robot arm in its initial starting position. The goal is the red ball at the right bottom of the picture.


Joint closest to base lies along the line connecting the base of the robot arm to the object. 


Final Step: The other two joints are bent at angles so that the claw is at the goal (red ball)

 

Error associated with automating the arm:

 

When calculating the angle using floating point values and math functions, some error is introduced into the arm motion at every stage. This error propagates and increases as the angle of each of the joints is calculated one after the other. I have tried to introduce some sort of error correction mechanism, but the robot does not always get to the exact coordinates of the target. Also, in some cases, the error correction actually seems to make the robot arm move farther away from the goal. I am trying to find a more generic and better way of doing the error correction and will hopefully be able to minimize any error.

Operating Instructions:

 

Manual operation of the robot arm:


The robot arm can be rotated about its base by pressing the ‘a’ or ‘d’ keys. ‘a’ rotates the robot arm counter-clockwise about the base and ‘d’ rotates it clockwise. ‘w’, ‘s’ and ‘x’ can be used to rotate the individual joints up or down as required.

 
Automation modes:

While automating the arm, there are two different modes:

 

1)      The ‘(g)rab’ mode: When the robot is in grab mode, it will grab the ball into the claw as soon as the claw reaches the object.

2)      The ‘rotate’ mode: Changed by pressing ‘j’/’J’. When in the 'rotate all joints' mode, pressing ‘1’ will cause the robot arm to first rotate about the base, then the joint closest to the base is rotated and so on till the last joint is rotated so that the claw is at the target.
In the 'rotate joint-by-joint' mode, the robot arm rotates one joint and then waits till the user presses the next joint number to rotate. ‘1’ rotates about the base, ‘2’ rotates the first joint up or down, ‘3’ rotates the second joint up or down and ‘4’ rotates the third joint up or down.

  

Once a ball is grabbed, the arm can be rotated and the ball can be released at the current position of the claw by pressing ‘e’.

 

For example: Set the mode to 'rotate all (j)oints' and '(g)rab' mode. Then hit ‘1’. Once the robot arm has reached the target and grabbed the object, r(e)lease the object at some location of your choice by pressing 'e' after rotating manually to required location. Hit ‘z’ to zap the arm and hit ‘1’ again to pick up the next object.

  

Source Code:

If you wish to take a look at the illiRobotArm or my openGL source code for the illiRobot, please email me at bkrishnn@uiuc.edu or bharath100@yahoo.com .

References:

 

1)      This project is based on the illiSkel by George Francis, Glenn Chappell and Chris Hartman

 

2)      http://www.cs.ubc.ca/spider/gslee/Rasp/html/raspApp1.htm for giving me an initial insight into what kind of robot arm I should try to build

 

3)      http://www.wse.jhu.edu/JH_Engineer/images/Spring2002/18_22.pdf for giving me valuable information on robot motion in general

 

4)      http://www.isd.mel.nist.gov/documents/lee/Loc_85.pdf which is a very good source of information on robot arm control

 

5)      http://www.olympus.net/personal/mortenson/preview/definitionsf/forwardkine.html provides information on Forward and Inverse Kinematics

 

Acknowledgements:

 

I would like to thank Professor George Francis for helping out at every stage of my project and providing valuable tips and ideas which helped me complete my version of a basic robot arm.


Go to my NCSA Homepage or read the abstract for the robot arm here