Lesson plan

Robot kinematics lesson plan

The geometry of robots that move: frames and transforms, differential drive and odometry on a 2WD rover, forward and inverse kinematics on a two-link arm, trajectories, and an arm that draws.

3 chapters, 7 lessons, about 7 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Frames and angles, two wheels turned into a speed and a turn rate, and a pose counted from encoder edges.
  • Joint angles to the claw and back, both elbows, the workspace, and moves that draw the line.
  • A four-servo arm that holds a pen and draws on the table.

Materials for the whole unit

  • Arduino Uno R3
  • Hobby servo x 2
  • Motor driver, L9110S
  • Robot arm, 4 servos
  • Robot car chassis, 2WD
  • Servo driver, PCA9685 16-channel

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 2 h 50 min

Wheeled robots

Frames and angles, two wheels turned into a speed and a turn rate, and a pose counted from encoder edges.

LessonTimeWhat students do
Frames and anglesThe world frame and the robot frame, and the rotation that moves a point between them. atan2 instead of atan, angles wrapped to plus or minus 180, range and bearing to a target, and a sensor reading carried through two frames to the floor.60 min
  1. Run it
  2. atan2, not atan
  3. Wrap the angle
  4. Robot frame to world frame
  5. Range and bearing
  6. Two frames in a chain
Differential driveTwo wheels and no steering: wheel speeds to a forward speed and a turn rate, a spin on the spot, the turning radius, and the other way around, an arc turned into two wheel speeds, a pivot, and what to do when the outer wheel cannot go that fast.60 min
  1. Two wheels, one speed
  2. Spin on the spot
  3. The turning radius
  4. From an arc to two wheels
  5. Pivot on one wheel
  6. When a wheel cannot keep up
OdometryCount encoder edges into a pose with the midpoint method. Drive and turn by odometry, compare it with where the car really is, close a square, and watch a Monte Carlo of wheel slip show error growing faster than the distance.50 min
  1. Count the floor
  2. Turn by counting
  3. Close the square
  4. Error grows faster than distance
  5. Better tires

Materials

  • Arduino Uno R3
  • Motor driver, L9110S
  • Robot car chassis, 2WD

Check for understanding

Each student finishes "Odometry" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Better tires".

Chapter 2. About 2 h 50 min

Arms

Joint angles to the claw and back, both elbows, the workspace, and moves that draw the line.

LessonTimeWhat students do
Forward kinematicsA two-link arm of two servos: joint angles to the claw by adding two vectors, the closest the claw can come with joint limits, and the Jacobian’s first idea, how far the claw moves for one degree at each joint.60 min
  1. Run it
  2. Add two vectors
  3. Work one out
  4. One degree, how far?
  5. The workspace
  6. A longer forearm
Inverse kinematicsSay where the claw should go and solve for the joints: the law of cosines for the elbow, both elbow solutions, targets out of reach and too close, targets that only break a joint limit, and a round trip through forward kinematics.60 min
  1. Two answers
  2. The other elbow
  3. Out of reach
  4. Reachable is not enough
  5. The round trip
  6. A longer upper arm
TrajectoriesGetting from here to there: a joint-space move that bows 36 mm off the line, a Cartesian move that stays within a tenth of a millimeter, a cubic time scaling that starts and ends at rest, and a singularity where the joints have to race.50 min
  1. Joint space draws a curve
  2. Cartesian space draws the line
  3. Start and stop at rest
  4. A singularity
  5. Fewer waypoints

Materials

  • Arduino Uno R3
  • Hobby servo x 2

Check for understanding

Each student finishes "Trajectories" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Fewer waypoints".

Chapter 3. About 1 h 20 min

Boss build

A four-servo arm that holds a pen and draws on the table.

LessonTimeWhat students do
Boss: an arm that drawsThe gallery’s four-servo arm on a PCA9685 holds a pen and draws on the table: the base angle from above, two-link IK from the side, a line solved every 5 mm, the edge of the workspace, a circle of chords, and a whole drawing.80 min
  1. Run it
  2. Hold the pen
  3. Two views, one answer
  4. Draw a line
  5. The edge of the table
  6. A circle of chords
  7. The whole drawing
  8. Fewer chords

Materials

  • Arduino Uno R3
  • Robot arm, 4 servos
  • Servo driver, PCA9685 16-channel

Check for understanding

Each student finishes "Boss: an arm that draws" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Fewer chords".

Your class

Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.