No Title

22C:161 Introduction to Robotics Spring 1995

Homework 3 - Due Monday , February 20

In this homework assignment, you will implement robot kinematics computations corresponding to the material covered in Chapter 3 of the book. Specifically, you will write routines that will read essential robot kinematic parameters from a file and store them. Then, your program should accept joint variable value input from the keyboard (or fancier means using Motif/mouse), compute the position and orientation of each link, display the robot configuration in the graphics window, and print out the {wrist} to {station} 4x4 transformation.

Robot data

As discusssed in class, Denavit-Hartenberg parameters don't give you all of the information you'll need to draw your robot. The do give you enough information to compute the relative link transformations - that is, the transformations relating frame {i} and {i - 1}. To draw the robot you need additional information: (1) the transformation relating frame {0} and the station or world reference frame {s}, and (2) the transformations relating the actual link frame (for our parallelpipeds/cuboids this is at the center of mass each object), called {li} for link i, to frame {i}, and (3) the dimensions of each link.

So, we will use a robot specification file in the following format:

NUMBER N

LINK 0
DIMENSIONS x y z
TRANSFORM a b c d
          e f g h
          i j k l
          m n o p
D-H-PARAMETERS a alpha d theta

LINK 1
DIMENSIONS x y z
TRANSFORM a b c d
          e f g h
          i j k l
          m n o p
D-H-PARAMETERS a alpha d theta

...

LINK N
DIMENSIONS x y z
TRANSFORM a b c d
          e f g h
          i j k l
          m n o p
D-H-PARAMETERS a alpha d theta

JOINT 1 type                             (where type is R for revolute, or P for prismmatic)

JOINT 2 type 
...

JOINT n type

BASE-TO-STATION-TRANSFORM  a b c d
                           e f g h
                           i j k l
                           m n o p
Or click here for a sample of an actual data file (example 3.3 in Craig).
  1. Write routines that read a robot specification file and store the information in appropriate data structures. For each link i, 1 <= i <= n, you will want to maintain a data structure that stores the relevant input data plus a 4x4 transformation that will describe the relationship between frame {i} and {i - 1}.
  2. Write routines that set the link transformations based on the link D-H-PARAMETERS.
  3. Write routines that draw each link by calculating the appropriate transformation for that link. For link i, you need to call the drawing library routine using a transformation that describes frame {li} with respect to {s}. This can be computed as T(li,s) = T(0,s) * T(1,0) ... T(i,i-1) * T(li,i) (where T(b,a) is the transformation describing frame {b} relative to frame {a}).
  4. Write a routine that will print out T(w,s) where {w} is the wrist frame (which is also frame n if there are n links).
  5. Write routines that read joint variable values you enter from the keyboard (or via Mouse/Motif) and then draw the robot.

Specific solutions to turn in:
  1. Write a robot specification file for the robot of example 3.3 in the book. Choose any reasonable values for l1 and l2. Choose very simple transformations relating frame {li} to frame {i} for each link. Choose a very simple transformations relating {0} to {s}. Test your code by entering different joint angles and verifying that the resulting picture (and wrist->state frame) looks correct.
  2. Assign coordinate frames and derive D-H parameters a robot of the form figure 3.37. Choose link lengths, link dimensions in any reasonable way. Create the corresponding robot specification file and test your code on it.
  3. We will supply a specification file for a Puma 560 style robot. We will test your code on it. You might want to prepare for this by making your own Puma specification file using the Puma D-H parameters shown in Figure 3.21. You would just need to choose some reasonable {li} to {i} transformations to be able to complete the specification file and enable drawing and positioning of the robot.

Where to find sample code and data (on farm.cs -- the CSEL machines):
  1. Two samples files are also located in the directory ~stevenso/pub/data.
  2. The executable of a working version of homework #3 is located in the directory ~stevenso/pub/bin.
  3. The C files and makefile used to make the libRobotics.a library are now available in the directory ~stevenso/pub/lib.

class - Jim Cremer
Wed Jan 25 13:14:01 CST 1995