Lab 9: Inverse Kinematics

Lead TAs:Eric West Brian Pilnick


Introduction:

The "flip side" of Lab 8. This is more often the required approach when dealing with robot arm or snake motion planning. You do inverse kinematics when you can describe the location of a point in Cartesian (or polar) coordinates, and want to drive your robot to get there.

The purpose of this lab is to combine your knowledge of inverse kinematics and motion planning

Reading:

P. J. McKerrow, Introduction to Robotics, pp 201--207.

Challenge Statement:

In this lab you will use the two-link manipulator you built in Lab 8 to navigate through a given world with an obstacle.

The total size of the world is 14" x 8" and is subdivided into .5"x.5" squares. A rectangular obstacle with dimentions 4"x2.5" will be placed inside the world. The corners of the obstacle will be at coordinates (-2,5.5), (2, 5.5), (-2,8), (2, 8). The shoulder of the first link of your robotic arm will coincide with the origin in the X,Y plane

You will create a configuration space for your two link manipulator in the Theta1, Theta2 coordinate space. The space will have Theta1 values along the x-axis and will range from 0 deg. to 180 deg. The Theta2 values will be along the y-axis and will range from -90 deg to 90 deg. The Theta1, Theta2 configuration space will be subdivided into 10 deg. x 10 deg squares. You will figure out, by hand, what the configuration space is for the given world and your robot, and hard code it into the source code

You will then be given a start and end position for your robot in (x,y) coordinate world. You will use inverse kinematics to drive your robot to the start point. You will then compute the path from the start point to the end point using your wavefront planner.

More Details:

Step 1:
Use the same arm from Lab 8 to demonstrate inverse kinematics.

Step 2:
Determine your robots configuration space

Step 3:
Write a function that takes a start point in the X,Y coordinate world and a end point in the X,Y coordinate world. Uses inverse kinematics to derive the angle values of the links for the start (S) and end (E) points.

Step 4:
Find the closest point, S', in your configuration space to the actual start point, S. Find the closest point, E', in your configuration space to the actual end point, E. Use wavefront algorithm to determine a path from S' to E'

Step 5:
Drive arm to start, S, point and stop. Wait for the start button to be pressed again -- to give time to put a mark down at the start point

Step 6:
Entering the path: Move robot arm from S to S' and start following the path your wavefront planner computed. Since the configuration space is in terms of Theta1, Theta2, you can use the code you wrote for the forward kinematics lab drive your arm

Step 7:
Leaving the path: After your arm has reached the end point of your wavefront path, E', leave the path and move to the actual end point, E. Place a mark at the end point.

Hint: Minimizing the amount of times the arm stops or changes direction helps reduce accumulated error

IC Bugs: (Check this)

1) 1.0 ^ x gives an error

2) 0.0 ^ x gives an error

3) (negative number) ^ (odd power) gives a positive number.

Evaluation:

Hand in a copy of your configuration space. On that copy draw the path your robot would take if your start point was S = (5,3) and your end point was E = (-4,4)

Gets to the start point? Follows the wavefront path around obstacle? Reaches end point?

Lab Times and Grading

Computing arcsine and arccos

The Handyboard has an arctangent function, which is nice. You can approximate the arcsine and arccosine with a Taylor series expansion. To the right, we placed just the first few terms of the expansion; you will probably only need these, but you can expand on these as needed. To compute the arcsine of (x), simply plug in a value for x into the above polynomial expression and you are good to go.