Harvey Mudd College
Computer Science 154 - Robotics
Assignment D

The Manipulator

More and more, going online is a first choice for people looking for answers, and this project sets out to make this even more common by providing an as-yet untapped source of answers to the internet community. The primary task in this assignment is to create an internet-accessible Ouija resource. In fact, the online part of this effort has already been done -- last semester a group of CS121 (software engineering) students set up a web interface to the lab's camera. The Ouija part remains, however. Thus, the goal is to program the Robix arm to use a Ouija board effectively, so that people will not be limited to virtual divination just because they're interacting with the virtual world.

We have a Robix manipulator, which is a modular arm consisting of up to six servo motors. While robotics is typically concerned with the connections between hardware devices and their control via software, this project intends in addition to make a somewhat more ethereal connection.



Part 1 -- Design

The first piece of this project is to build a robot arm. The robix manual offers two possibilities: a three-axis (three-motor) example called the "drawer" and a six-axis arm named "the chemist." You may choose to use one of those two designs or create a design on your own. However, because you will be modeling your arm precisely in the next part of the lab, I would suggest reading through the next parts before finalizing your robotic manipulator.

Keep in mind that your arm will need to

The first point argues for the use of a gripper, though other solutions (e.g., a magnetic end effector) are possible, which would leave you an additional servo motor to use elsewhere. The second and third points suggest that the arm needs to have considerable ability to move in the plane of the table. In addition, keep in mind that the more motors you use in the arm, the more complicated it will be to model mathematically, the subject of the next section.



Part 2 -- Kinematics

The difficulty in robot manipulation boils down to the different coordinate systems for specifying the location of interesting items, such as the robot's gripper. To an observer, the most natural specification of the gripper's location might be relative to some external reference point, e.g., the center of the robot or the corner of the Ouija board.

To the robot and its control program, however, the most natural representation of the gripper's location is in terms of the angle that each motor has attained in the chain from robot base to robot fingertip. For example, the first motor might be holding a position oriented 25 degrees clockwise from its original pose. The second motor in the arm (further toward the gripper) might be rotated 10 degrees counter-clockwise from its own origin... and so on.

The area of study that characterizes the geometric relationship between such coordinate systems is kinematics, and so this part of the assignment is to obtain a kinematic model of where the robot's end effector is, given that each of the arm's angles is known.

As an example for those (brave) lab groups working before we cover kinematics in class, consider the simple two-link arm below.



Example of a two-link manipulator.

In this example, the first joint of a two-link robot is the red point, where a Cartesian coordinate system has been attached. The length of this first link is A and the joint angle that the first motor has currently achieved is alpha. At the end of A, a second link is attached (the green point, if you're looking at this in color). This second link is of length B and is oriented at an angle beta from the first link. The end effector of the arm is indicated by the last point (blue in the color diagram). Finding this robot's kinematics is the problem of finding the location of this end effector in (x,y)-coordinates, given alpha and beta, A, B,

In general, the strategy is to work from the origin outward toward the end of the arm. For example, the coordinates of the green point at the base of link B are

( A*cos(alpha) , A*sin(alpha) )

For this part of the assignment, first find the kinematics of the arm depicted above. Then, given your arm design from part 1 of the assignment, first choose a 3d Cartesian coordinate system (one whose center is at the center of rotation of the first arm motor is often a good choice). Then, compute the location of the end effector in your chosen Cartesian coordinate system in terms of the joint angles of the arm.

In general, a description of the kinematics of a robot would include the orientation, as well as the position, of the gripper or end effector. In this problem, you will want that orientation to be relatively constant in order to hold the planchette appropriately. As a result, do not worry about representing the final orientation of the "hand." Also, you may be able to simplify your task by decomposing the manipulator into groups of links that affect only planar positioning and/or depth positioning.

Part 3 -- Inverse Kinematics

Your results from Part 2 only provide half of the story -- they take joint angles and return a 3d position, but they don't indicate what joint angles are required to achieve a desired 3d position. Because you can measure the position of the Ouija board's letters in a Cartesian coordinate system attached to the board, it is the inverse kinematics that you will need to tell you what joint angles will achieve a desired position.

Finding the inverse kinematics amounts to solving the problem from Part 2 backwards: in terms of the known values for the (x,y) coordinates of the end effector and known link lengths A and B, what is an expression for the unknown joint angles alpha and beta.

For this part of the assignment, find the inverse kinematics of the manipulator depicted above. Next, find the inverse kinematics of your arm. One caveat: the inverse kinematics of an arbitrary manipulator is not guaranteed to have a closed-form solution. In that case, a look-up table can be built that tells the joint angles corresponding to a number of Cartesian points. Finer resolution can be obtained by interpolating within that table. In all likelihood, your arm will have an analytic, closed-form expression for its inverse kinematics. A useful technique is to separate the pieces of the arm that perform positioning in different directions. For example, if there are only a couple of motors that affect the height of the gripper/end effector, they are the only joint angles that will contribute to the z coordinate of the endpoint. Alternatively, you may choose to fix the position of some of the motors -- in order to keep the planchette level, perhaps -- and then they will not factor into the inverse kinematics of the arm.

Part 4 -- the finale -- connecting to "other frames of reference"

Even with both the kinematics and the inverse kinematics, the relationship is only known between the arm's joint angles and a particular Cartesian coordinate system. The Ouija board will be placed somewhere in that coordinate system, and the letters are most naturally expressed relative to the board edges, rather than in a robot-centered frame of reference. As a result, in order for the manipulator to be commanded to go to a specific letter, the offset of the board (and of the planchette window, too) must be accounted for. These are simply 2d transformations and so should not pose much problem.

With all of these transformations modeled, create an interface that allows a user to type a question and then responds to that question by directing the arm to spell out a word chosen as the answer. (The web interface is not a formal requirement of the project, but I'm hoping that some combination of efforts will get it going at some point during the semester.)

To get from one point to another, the manipulator will create a straight line in joint space. This will probably not correspond to a straight line in Cartesian space. Although real straight-line motion is possible (by interpolating intermediate objectives between the starting and finishing points), it is probably not needed for this application. How many times does the planchette beeline to its destination in a typical Ouija application?

Write-up

In your write-up of this project be sure to include (at least) the following things:
Results